-
Notifications
You must be signed in to change notification settings - Fork 350
Add poethepoet config #1976
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
timrid
wants to merge
4
commits into
hbldh:develop
Choose a base branch
from
timrid:poethepoet
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Add poethepoet config #1976
Changes from 3 commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 |
|---|---|---|
|
|
@@ -59,6 +59,7 @@ test = [ | |
| "bumble==0.0.226", | ||
| ] | ||
| dev = [ | ||
| "poethepoet>=0.45.0", | ||
| { include-group = "docs" }, | ||
| { include-group = "lint" }, | ||
| { include-group = "test" }, | ||
|
|
@@ -83,6 +84,7 @@ python_version = "3.10" | |
| disable_error_code = ["import-not-found"] | ||
| exclude = "(.venv|kivy|recipes)/" | ||
| mypy_path = "typings" | ||
| packages = ["bleak", "tests", "examples"] | ||
|
|
||
| [tool.pyright] | ||
| typeCheckingMode = "strict" | ||
|
|
@@ -100,7 +102,76 @@ filterwarnings = [ | |
| ] | ||
|
|
||
| addopts = """ | ||
| --import-mode=importlib | ||
| --cov=bleak | ||
| --cov-branch | ||
| --cov-report html | ||
| """ | ||
|
|
||
|
|
||
|
|
||
| [tool.poe.executor] | ||
| type = "uv" | ||
| isolated = true | ||
|
|
||
| [tool.poe.tasks.test-py310] | ||
| help = "Run tests using Python 3.10" | ||
| cmd = "pytest tests -v $POE_EXTRA_ARGS" | ||
| executor = { python = "3.10", group = "test" } | ||
|
|
||
| [tool.poe.tasks.test-py311] | ||
| help = "Run tests using Python 3.11" | ||
| cmd = "pytest tests -v $POE_EXTRA_ARGS" | ||
| executor = { python = "3.11", group = "test" } | ||
|
|
||
| [tool.poe.tasks.test-py312] | ||
| help = "Run tests using Python 3.12" | ||
| cmd = "pytest tests -v $POE_EXTRA_ARGS" | ||
| executor = { python = "3.12", group = "test" } | ||
|
|
||
| [tool.poe.tasks.test-py313] | ||
| help = "Run tests using Python 3.13" | ||
| cmd = "pytest tests -v $POE_EXTRA_ARGS" | ||
| executor = { python = "3.13", group = "test" } | ||
|
|
||
| [tool.poe.tasks.test-py314] | ||
| help = "Run tests using Python 3.14" | ||
| cmd = "pytest tests -v $POE_EXTRA_ARGS" | ||
| executor = { python = "3.14", group = "test" } | ||
|
|
||
| [tool.poe.tasks.test-all] | ||
| help = "Run tests using all supported Python versions" | ||
| sequence = [ | ||
| "test-py310", | ||
| "test-py311", | ||
| "test-py312", | ||
| "test-py313", | ||
| "test-py314", | ||
| ] | ||
|
|
||
| [tool.poe.tasks.typecheck] | ||
| help = "Run type checkers (mypy, pyright)" | ||
|
|
||
| # We want always the latest version of pyright and mypy, to catch | ||
| # any breakage as soon as we can. That is why they are not dev | ||
| # dependencies in the pyproject.toml, because that would lock them to | ||
| # a specific version. Instead we install the latest version as tool. | ||
| sequence = [ | ||
| { cmd = "mypy", executor = { with = "mypy" } }, | ||
| { cmd = "pyright", executor = { with = "pyright" } }, | ||
| ] | ||
|
|
||
| [tool.poe.tasks.lint] | ||
| help = "Run code linters (isort, black, flake8)" | ||
| sequence = [ | ||
| { cmd = "isort . docs ${checkonly:+--check --diff}", executor = { group = "lint" } }, | ||
|
dlech marked this conversation as resolved.
Outdated
|
||
| { cmd = "black . ${checkonly:+--check --diff}", executor = { group = "lint" } }, | ||
| { cmd = "flake8 . --count --show-source --statistics", executor = { group = "lint" } }, | ||
| ] | ||
| args = [{ name = "checkonly", type = "boolean" }] | ||
| executor = { group = "lint" } | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If we have this here, do we need the same on each command in the sequence? |
||
|
|
||
| [tool.poe.tasks.docs] | ||
| help = "Build the documentation" | ||
| cmd = "sphinx-build -b html -W -d docs/_build/doctrees docs docs/_build/html" | ||
| executor = { python = "3.11", group = "docs" } | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does
poeinvokegit?