-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
I have never been a fan of poetry, but since this project is already using it, let's keep it this way. What we have to do though is to make sure we use the up-to-date poetry configuration and best practices. This patch moves dependency definitions out from tox.ini to pyproject.toml (poetry groups). This should help us to maintain dependencies in one place only.
- Loading branch information
1 parent
cf0a583
commit 4cfaa67
Showing
3 changed files
with
24 additions
and
16 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 |
---|---|---|
|
@@ -49,4 +49,4 @@ jobs: | |
if: matrix.os == 'macos-latest' | ||
|
||
- name: Run pytest | ||
run: pipx run tox -e py3 | ||
run: pipx run tox -e test |
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 |
---|---|---|
@@ -1,17 +1,16 @@ | ||
[tox] | ||
envlist = py3, lint | ||
envlist = lint, test | ||
|
||
[testenv] | ||
deps = poetry | ||
allowlist_externals = poetry | ||
skip_install = true | ||
commands = | ||
poetry install -v | ||
poetry run pytest -vv | ||
|
||
[testenv:test] | ||
commands_pre = poetry install --with test | ||
commands = poetry run pytest -vv {posargs:.} | ||
|
||
[testenv:lint] | ||
skip_install = true | ||
deps = | ||
ruff >= 0.4.2, < 0.5.0 | ||
commands_pre = poetry install --only lint | ||
commands = | ||
ruff check {args:.} | ||
ruff format --check --diff {args:.} | ||
ruff check {posargs:.} | ||
ruff format --check --diff {posargs:.} |