-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from bandophahita/update_package_installer
update package to use pyproject.toml
- Loading branch information
Showing
15 changed files
with
1,774 additions
and
26 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 |
---|---|---|
@@ -0,0 +1,31 @@ | ||
[flake8] | ||
exclude = | ||
.github, | ||
.pytest_cache, | ||
.venv, | ||
venv, | ||
dockerfiles, | ||
docs, | ||
.coverage, | ||
.coveragerc, | ||
.env, | ||
.env.example, | ||
.flake8, | ||
.gitignore, | ||
alembic.ini, | ||
bandit.yaml, | ||
Makefile, | ||
mkdocks.yml, | ||
mypy.ini, | ||
poetry.lock, | ||
pyproject.toml, | ||
pytest.ini, | ||
README.md, | ||
.idea, | ||
|
||
max-line-length = 88 | ||
extend-ignore = | ||
# See https://github.com/PyCQA/pycodestyle/issues/373 | ||
E203, | ||
|
||
per-file-ignores = conf.py:E501 |
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,45 @@ | ||
name: Lint | ||
|
||
on: | ||
push: | ||
pull_request: | ||
workflow_dispatch: | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
lint: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: ["3.8", "3.9", "3.10", "3.11"] | ||
os: [ubuntu-latest] | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install dependencies | ||
shell: bash | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install -e .[dev-all] | ||
- name: Lint with black | ||
run: | | ||
black --check --diff screenpy_requests | ||
- name: Lint with isort | ||
run: | | ||
isort --check-only --diff screenpy_requests | ||
- name: Lint with flake8 | ||
run: | | ||
flake8 --exit-zero screenpy_requests | ||
- name: Lint with mypy | ||
run: | | ||
mypy screenpy_requests | ||
- name: Lint with pylint | ||
run: | | ||
pylint screenpy_requests |
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,39 @@ | ||
name: Poetry | ||
|
||
on: | ||
push: | ||
pull_request: | ||
workflow_dispatch: | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
run-tests: | ||
name: Python ${{ matrix.python-version }} ${{ matrix.os }} | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
max-parallel: 9 | ||
fail-fast: false | ||
matrix: | ||
python-version: ["3.8", "3.9", "3.10", "3.11"] | ||
os: [ubuntu-latest] | ||
poetry-version: ["1.3.2"] | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Setup Poetry | ||
uses: abatilo/actions-poetry@v2 | ||
with: | ||
poetry-version: ${{ matrix.poetry-version }} | ||
|
||
- name: Check toml structure | ||
run: poetry check | ||
|
||
- name: Check lock file | ||
run: poetry lock --check |
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,33 @@ | ||
# adapted from https://packaging.python.org/en/latest/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/ | ||
# with changes from https://blog.pypi.org/posts/2023-04-20-introducing-trusted-publishers/ | ||
|
||
name: Publish to PyPI | ||
|
||
on: push | ||
|
||
jobs: | ||
build-and-pypi-publish: | ||
name: Build and upload release to PyPI | ||
runs-on: ubuntu-latest | ||
permissions: | ||
id-token: write | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.x" | ||
- name: Install Poetry | ||
run: >- | ||
python -m | ||
pip install | ||
poetry | ||
--user | ||
- name: Build ScreenPy Requests | ||
run: >- | ||
python -m | ||
poetry | ||
build | ||
- name: Publish distribution to PyPI # only on new tag push | ||
if: startsWith(github.ref, 'refs/tags') | ||
uses: pypa/gh-action-pypi-publish@release/v1 |
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,35 @@ | ||
name: Tests | ||
|
||
on: | ||
push: | ||
pull_request: | ||
workflow_dispatch: | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
run-tests: | ||
name: Python ${{ matrix.python-version }} ${{ matrix.os }} | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
max-parallel: 9 | ||
fail-fast: false | ||
matrix: | ||
python-version: ["3.8", "3.9", "3.10", "3.11"] | ||
os: [ubuntu-latest] | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Install dev dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install tox tox-gh-actions | ||
- name: Test with tox | ||
run: tox |
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 @@ | ||
[settings] | ||
line_length = 88 | ||
multi_line_output = 3 | ||
include_trailing_comma = True | ||
use_parentheses = True | ||
src_paths = screenpy_requests,tests |
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
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,15 @@ | ||
[MASTER] | ||
ignore-paths=^.*/tests/.*$ | ||
disable= | ||
arguments-renamed, | ||
duplicate-code, | ||
import-error, | ||
invalid-name, | ||
logging-format-interpolation, | ||
logging-fstring-interpolation, | ||
no-member, | ||
super-init-not-called, | ||
too-few-public-methods, | ||
unused-argument, | ||
useless-super-delegation, | ||
wrong-import-order, |
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,17 @@ | ||
# shortcuts to help manage flipping between branches with different dependencies | ||
sync: | ||
poetry install --extras dev_all --sync | ||
|
||
update_lock_only: | ||
poetry update --lock | ||
|
||
update: update_lock_only | ||
poetry install --extras dev_all | ||
|
||
check: | ||
poetry check | ||
|
||
requirements: | ||
poetry export --without-hashes --with dev -f requirements.txt > requirements.txt | ||
|
||
.PHONY: sync update_lock_only update check requirements |
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 |
---|---|---|
|
@@ -78,5 +78,4 @@ | |
html_static_path = ['_static'] | ||
|
||
# Other HTML settings | ||
autodoc_member_order = "bysource" | ||
add_module_names = False |
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 |
---|---|---|
@@ -1,2 +1,13 @@ | ||
[mypy] | ||
show_error_codes = True | ||
exclude = (?x)( | ||
setup\.py | ||
; | tests/ | ||
| docs/ | ||
) | ||
|
||
[mypy-screenpy_requests.*] | ||
disallow_untyped_defs = True | ||
|
||
[mypy-tests.*] | ||
ignore_missing_imports = True |
Oops, something went wrong.