Skip to content

Commit

Permalink
Merge pull request #205 from dpguthrie/feat/set-cookie-and-crumb
Browse files Browse the repository at this point in the history
Set cookies and crumb
  • Loading branch information
dpguthrie authored Oct 28, 2023
2 parents cb5b2bd + 231a19c commit 5da0b49
Show file tree
Hide file tree
Showing 21 changed files with 1,632 additions and 267 deletions.
20 changes: 20 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# editorconfig.org

root = true

[*]
indent_style = space
indent_size = 4
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
end_of_line = lf

[Makefile]
indent_style = tab

[*.md]
trim_trailing_whitespace = false

[*.{yml,toml,yaml}]
indent_size = 2
12 changes: 12 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[flake8]
show-source = true
statistics = true
exclude =
.git

# These settings make flake8 compatible with Black:
# max-line-length: https://black.readthedocs.io/en/stable/the_black_code_style.html#line-length
# E203: https://black.readthedocs.io/en/stable/the_black_code_style.html#slices
# E503: https://black.readthedocs.io/en/stable/the_black_code_style.html#line-breaks-binary-operators
max-line-length = 88
ignore = E203, W503
26 changes: 26 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Build

on:
pull_request_target:
branches: [ master ]

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: "3.9"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install poetry
make install_dev
- name: Run tests and coverage
run: make test_cov
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v2
14 changes: 14 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Docs
on:
workflow_dispatch:

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: 3.x
- run: pip install mkdocs-material "mkdocstrings[python]" mike
- run: mkdocs gh-deploy --force
14 changes: 14 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Publish Yahooquery
on:
push:
tags:
- "v*.*.*"
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Build and publish to pypi
uses: JRubics/[email protected]
with:
pypi_token: ${{ secrets.PYPI_KEY }}
31 changes: 0 additions & 31 deletions .github/workflows/python-publish.yml

This file was deleted.

15 changes: 15 additions & 0 deletions .isort.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[settings]
import_heading_firstparty=first party
import_heading_future=future
import_heading_local=local
import_heading_stdlib=stdlib
import_heading_thirdparty=third party
known_third_party=sgqlc

# These settings makes isort compatible with Black:
# https://github.com/psf/black#how-black-wraps-lines
multi_line_output=3
include_trailing_comma=1
force_grid_wrap=0
use_parentheses=1
line_length=88
53 changes: 53 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
default_stages: [push]
default_language_version:
python: python3.9
repos:
- repo: local
hooks:
- id: isort
stages: [commit,push]
name: isort
entry: poetry run isort -rc
language: system
types: [python]
- id: black
stages: [commit,push]
name: black
entry: poetry run black -S .
language: system
types: [python]
- id: mypy
stages: [commit,push]
name: mypy
entry: poetry run mypy --ignore-missing-imports
language: system
types: [python]
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.1.0
hooks:
- id: trailing-whitespace
stages: [commit,push]
- id: check-added-large-files
- id: check-ast
stages: [commit,push]
- id: check-case-conflict
- id: check-byte-order-marker
- id: check-executables-have-shebangs
- id: check-docstring-first
stages: [commit,push]
- id: check-json
- id: check-merge-conflict
stages: [commit,push]
- id: check-symlinks
- id: check-vcs-permalinks
- id: check-xml
- id: check-yaml
- id: debug-statements
- id: detect-private-key
- id: flake8
stages: [commit,push]
- id: forbid-new-submodules
- id: no-commit-to-branch
stages: [commit,push]
args:
- --branch=main
21 changes: 0 additions & 21 deletions .travis.yml

This file was deleted.

5 changes: 0 additions & 5 deletions MANIFEST.in

This file was deleted.

24 changes: 24 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
PYTEST=poetry run pytest

install_dev:
poetry install

install:
poetry install --no-dev

lint:
poetry run black -S --check --diff .
poetry run isort --check-only --diff .
poetry run flake8 .
poetry run mypy . --ignore-missing-imports

test: lint
$(PYTEST)

test_cov:
# Run tests and prepare coverage report
$(PYTEST) --cov=./ --cov-report=xml

test_with_warnings:
# Run tests and show warnings
$(PYTEST) -W all
Loading

0 comments on commit 5da0b49

Please sign in to comment.