-
Notifications
You must be signed in to change notification settings - Fork 7
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 #70 from tlambert03/linting
style: update pre-commit
- Loading branch information
Showing
10 changed files
with
47 additions
and
31 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,7 +14,7 @@ license = { text = "BSD 3-Clause License" } | |
authors = [ | ||
{ email = "[email protected]", name = "Draga Doncila Pop" }, | ||
{ email = "[email protected]", name = "Caroline Malin-Mayor" }, | ||
{ email = "[email protected]", name = "Morgan Schwartz"} | ||
{ email = "[email protected]", name = "Morgan Schwartz" }, | ||
] | ||
classifiers = [ | ||
"Development Status :: 3 - Alpha", | ||
|
@@ -33,7 +33,7 @@ dependencies = [ | |
"networkx", | ||
"pandas", | ||
"tifffile", | ||
"imagecodecs", # required for ctc tiffs | ||
"imagecodecs", # required for ctc tiffs | ||
"scikit-image", | ||
"tqdm", | ||
"typer", | ||
|
@@ -44,7 +44,13 @@ dependencies = [ | |
# extras | ||
# https://peps.python.org/pep-0621/#dependencies-optional-dependencies | ||
[project.optional-dependencies] | ||
test = ["pytest>=6.0", "pytest-cov", "pytest-benchmark", "pytest-timeout", "tabulate"] | ||
test = [ | ||
"pytest>=6.0", | ||
"pytest-cov", | ||
"pytest-benchmark", | ||
"pytest-timeout", | ||
"tabulate", | ||
] | ||
dev = [ | ||
"black", | ||
"ipython", | ||
|
@@ -66,7 +72,7 @@ docs = [ | |
"nbsphinx-link", | ||
"sphinx-click", | ||
"ipython", | ||
"docutils~=0.16.0" | ||
"docutils~=0.16.0", | ||
# had to pin versions because of sphinx list rendering bug | ||
# https://stackoverflow.com/questions/67542699/readthedocs-sphinx-not-rendering-bullet-list-from-rst-file | ||
] | ||
|
@@ -83,7 +89,7 @@ traccuracy = "traccuracy.cli:main" | |
include-package-data = true | ||
|
||
[tool.setuptools.packages.find] | ||
where = ['src'] # list of folders that contain packages | ||
where = ['src'] # list of folders that contain packages | ||
include = ['traccuracy*'] | ||
|
||
[tool.setuptools_scm] # Necessary to enable setuptools_scm for dynamic versioning from tags | ||
|
@@ -106,14 +112,15 @@ extend-select = [ | |
"E", # style errors | ||
"W", # style warnings | ||
"F", # flakes | ||
# "D", # pydocstyle | ||
"I", # isort | ||
"U", # pyupgrade | ||
# "S", # bandit | ||
"C", # flake8-comprehensions | ||
"UP", # pyupgrade | ||
"C4", # flake8-comprehensions | ||
"B", # flake8-bugbear | ||
"A001", # flake8-builtins | ||
"RUF", # ruff-specific rules | ||
"TID", # tidy imports | ||
"TCH", # type checking | ||
# "D", # pydocstyle | ||
] | ||
# I do this to get numpy-style docstrings AND retain | ||
# D417 (Missing argument descriptions in the docstring) | ||
|
@@ -137,7 +144,8 @@ convention = "google" | |
[tool.ruff.per-file-ignores] | ||
"tests/*.py" = ["D", "S"] | ||
"setup.py" = ["D"] | ||
"src/traccuracy/cli.py" = ["B008"] # Ignore typer functions in function definitions | ||
# Ignore typer functions in function definitions | ||
"src/traccuracy/cli.py" = ["B008"] | ||
|
||
# https://docs.pytest.org/en/6.2.x/customize.html | ||
[tool.pytest.ini_options] | ||
|
@@ -147,9 +155,7 @@ filterwarnings = [ | |
"error", | ||
"ignore:Numba not installed, falling back to slower:UserWarning", | ||
] | ||
addopts = [ | ||
"--benchmark-min-rounds=1" | ||
] | ||
addopts = ["--benchmark-min-rounds=1"] | ||
|
||
# https://mypy.readthedocs.io/en/stable/config_file.html | ||
[tool.mypy] | ||
|
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
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