-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Use Ruff and pyproject.toml Replace isort and Flake8 with ruff, and move black and pytest config to pyproject.toml. * Add a pre-commit action * Use pre-commit.ci but disable fixes * Use pre-commit to format pyproject.toml * Ruff fixes
- Loading branch information
Showing
11 changed files
with
118 additions
and
76 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
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
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
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,61 @@ | ||
|
||
[tool.black] | ||
line-length = 100 | ||
skip-string-normalization = true | ||
|
||
[tool.pytest.ini_options] | ||
log_cli = true | ||
log_level = "INFO" | ||
addopts = "--cov=./ --cov-report=xml --verbose" | ||
|
||
[tool.ruff] | ||
select = [ | ||
"B", # flake8-bugbear | ||
"C", | ||
"E", # pycodestyle | ||
"F", # Pyflakes | ||
"I", # isort | ||
"W", # pycodestyle | ||
# "T4", | ||
"B9", | ||
] | ||
ignore = [ | ||
# "E203", | ||
# "E266", | ||
"E501", | ||
# "W503", | ||
"E722", | ||
"E402", | ||
"C901", | ||
] | ||
line-length = 100 | ||
|
||
[tool.ruff.mccabe] | ||
# Unlike Flake8, default to a complexity level of 10. | ||
max-complexity = 18 | ||
|
||
[tool.ruff.isort] | ||
combine-as-imports = true | ||
known-first-party = ["xpublish"] | ||
known-third-party = [ | ||
"cachey", | ||
"dask", | ||
"fastapi", | ||
"numcodecs", | ||
"numpy", | ||
"pandas", | ||
"pkg_resources", | ||
"pluggy", | ||
"pydantic", | ||
"pytest", | ||
"setuptools", | ||
"sphinx_autosummary_accessors", | ||
"starlette", | ||
"uvicorn", | ||
"xarray", | ||
"zarr", | ||
] | ||
|
||
[tool.ruff.flake8-bugbear] | ||
# Allow fastapi.Depends and other dependency injection style function arguments | ||
extend-immutable-calls = ["fastapi.Depends", "fastapi.Query"] |
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 +1 @@ | ||
from .common import dataset_collection_router | ||
from .common import dataset_collection_router # noqa: F401 |
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