-
Notifications
You must be signed in to change notification settings - Fork 148
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move to new PEP 517 standard with poetry and more "meta" package upda…
…tes (#270) * Move to new PEP 517 standard with poetry Switching to Poetry (the new defacto standard), compliant with PEP 517, for improved dependency handling, deterministic build process, and easier maintainability. * Fix files according to pre commit hooks * Remove VERSION file, the version can be read via importlib * Auto reformat README * Update publishing instructions * Add prettier pre commit hook for better README file * Update github actions * Improve upon pre commit hooks
- Loading branch information
Showing
23 changed files
with
1,333 additions
and
370 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,26 +16,23 @@ jobs: | |
fail-fast: false | ||
matrix: | ||
# python-version: ["3.7", "3.8", "3.9", "3.10"] | ||
python-version: ["3.7", "3.10"] | ||
python-version: ["3.7", "3.11"] | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Setup Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v4 | ||
with: | ||
cache: pip | ||
cache-dependency-path: setup.cfg | ||
python-version: "${{ matrix.python-version }}" | ||
- name: Install Poetry | ||
uses: abatilo/actions-poetry@v2 | ||
- name: Lint with pre-commit | ||
uses: pre-commit/[email protected] | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install . | ||
run: poetry install --no-dev | ||
- name: Run demo.py | ||
run: python demo.py | ||
run: poetry run python demo.py | ||
- name: Install dependencies tests | ||
run: | | ||
pip install .[tests] | ||
run: poetry install | ||
- name: Run tests | ||
run: pytest | ||
run: poetry run pytest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ | |
|
||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.2.0 | ||
rev: v4.4.0 | ||
hooks: | ||
- id: check-added-large-files | ||
- id: check-ast | ||
|
@@ -13,50 +13,54 @@ repos: | |
- id: check-merge-conflict | ||
- id: check-symlinks | ||
- id: check-yaml | ||
- id: check-json | ||
- id: check-toml | ||
- id: check-vcs-permalinks | ||
- id: debug-statements | ||
# - id: destroyed-symlinks | ||
# - id: double-quote-string-fixer | ||
- id: end-of-file-fixer | ||
exclude: tests/test_changes/ | ||
files: \.(py|sh|rst|yml|yaml)$ | ||
# - id: name-tests-test | ||
- id: mixed-line-ending | ||
- id: trailing-whitespace | ||
files: \.(py|sh|rst|yml|yaml)$ | ||
# - id: requirements-txt-fixer | ||
- repo: https://github.com/asottile/setup-cfg-fmt | ||
rev: v1.20.1 | ||
hooks: | ||
- id: setup-cfg-fmt | ||
- repo: https://github.com/asottile/pyupgrade | ||
rev: v2.32.0 | ||
rev: v3.3.2 | ||
hooks: | ||
- id: pyupgrade | ||
- repo: https://github.com/psf/black | ||
rev: 22.3.0 | ||
rev: 23.3.0 | ||
hooks: | ||
- id: black | ||
- repo: https://github.com/pycqa/isort | ||
rev: 5.11.5 | ||
hooks: | ||
- id: isort | ||
- repo: https://github.com/PyCQA/flake8 | ||
rev: 4.0.1 | ||
args: ["--profile", "black", "--filter-files"] | ||
- repo: https://github.com/charliermarsh/ruff-pre-commit | ||
rev: "v0.0.263" | ||
hooks: | ||
- id: flake8 | ||
- id: ruff | ||
- repo: https://github.com/nbQA-dev/nbQA | ||
rev: 1.3.1 | ||
rev: 1.5.3 | ||
hooks: | ||
- id: nbqa-black | ||
- id: nbqa-pyupgrade | ||
args: [--py37-plus] | ||
args: [--py38-plus] | ||
- id: nbqa-isort | ||
- repo: https://github.com/pre-commit/mirrors-mypy | ||
rev: v0.950 | ||
rev: v1.2.0 | ||
hooks: | ||
- id: mypy | ||
files: ^pixivpy3/ | ||
additional_dependencies: | ||
- types-requests | ||
# - ..._ | ||
args: [--strict] | ||
args: [--show-error-codes, --pretty, --strict] | ||
- repo: https://github.com/pre-commit/mirrors-prettier | ||
rev: "v2.7.1" | ||
hooks: | ||
- id: prettier | ||
types_or: [markdown, toml] | ||
args: [--prose-wrap=always] | ||
additional_dependencies: | ||
- "[email protected]" | ||
- "[email protected]" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
printWidth: 120 | ||
proseWrap: always | ||
overrides: | ||
- files: "*.md" | ||
options: | ||
printWidth: 80 |
Oops, something went wrong.