-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update instance repo from cookiecutter template
- Loading branch information
1 parent
b90c1d0
commit 973c8cc
Showing
3 changed files
with
96 additions
and
109 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,134 +1,120 @@ | ||
[build-system] | ||
build-backend = "hatchling.build" | ||
requires = ["hatchling"] | ||
requires = [ "hatchling" ] | ||
|
||
[project] | ||
name = "cookiecutter-scverse-instance" | ||
version = "0.0.1" | ||
description = "An example repo generated from the `cookiecutter-scverse` template. Feel free to look around this repo and check out the docs to find out if the template works for you!" | ||
readme = "README.md" | ||
requires-python = ">=3.10" | ||
license = {file = "LICENSE"} | ||
authors = [ | ||
{name = "scverse community"}, | ||
] | ||
license = { file = "LICENSE" } | ||
maintainers = [ | ||
{name = "scverse community", email = "core-team@scverse.org"}, | ||
{ name = "scverse community", email = "core-team@scverse.org" }, | ||
] | ||
# https://docs.pypi.org/project_metadata/#project-urls | ||
urls.Documentation = "https://cookiecutter-scverse-instance.readthedocs.io/" | ||
urls.Source = "https://github.com/scverse/cookiecutter-scverse-instance" | ||
urls.Homepage = "https://github.com/scverse/cookiecutter-scverse-instance" | ||
dependencies = [ | ||
"anndata", | ||
# for debug logging (referenced from the issue template) | ||
"session-info", | ||
authors = [ | ||
{ name = "scverse community" }, | ||
] | ||
|
||
[project.optional-dependencies] | ||
dev = [ | ||
"pre-commit", | ||
"twine>=4.0.2", | ||
requires-python = ">=3.10" | ||
classifiers = [ | ||
"Programming Language :: Python :: 3 :: Only", | ||
"Programming Language :: Python :: 3.10", | ||
"Programming Language :: Python :: 3.11", | ||
"Programming Language :: Python :: 3.12", | ||
] | ||
doc = [ | ||
"docutils>=0.8,!=0.18.*,!=0.19.*", | ||
"sphinx>=4", | ||
"sphinx-book-theme>=1.0.0", | ||
"myst-nb>=1.1.0", | ||
"sphinxcontrib-bibtex>=1.0.0", | ||
"setuptools", # Until pybtex >0.23.0 releases: https://bitbucket.org/pybtex-devs/pybtex/issues/169/ | ||
"sphinx-autodoc-typehints", | ||
"sphinxext-opengraph", | ||
# For notebooks | ||
"ipykernel", | ||
"ipython", | ||
"sphinx-copybutton", | ||
"pandas", | ||
dependencies = [ | ||
"anndata", | ||
# for debug logging (referenced from the issue template) | ||
"session-info", | ||
] | ||
test = [ | ||
"pytest", | ||
"coverage", | ||
optional-dependencies.dev = [ | ||
"pre-commit", | ||
"twine>=4.0.2", | ||
] | ||
|
||
[tool.coverage.run] | ||
source = ["cookiecutter_scverse_instance"] | ||
omit = [ | ||
"**/test_*.py", | ||
optional-dependencies.doc = [ | ||
"docutils>=0.8,!=0.18.*,!=0.19.*", | ||
"ipykernel", | ||
"ipython", | ||
"myst-nb>=1.1", | ||
"pandas", | ||
# Until pybtex >0.23.0 releases: https://bitbucket.org/pybtex-devs/pybtex/issues/169/ | ||
"setuptools", | ||
"sphinx>=4", | ||
"sphinx-autodoc-typehints", | ||
"sphinx-book-theme>=1", | ||
"sphinx-copybutton", | ||
"sphinxcontrib-bibtex>=1", | ||
"sphinxext-opengraph", | ||
] | ||
|
||
[tool.pytest.ini_options] | ||
testpaths = ["tests"] | ||
xfail_strict = true | ||
addopts = [ | ||
"--import-mode=importlib", # allow using test files with same name | ||
optional-dependencies.test = [ | ||
"coverage", | ||
"pytest", | ||
] | ||
# https://docs.pypi.org/project_metadata/#project-urls | ||
urls.Documentation = "https://cookiecutter-scverse-instance.readthedocs.io/" | ||
urls.Homepage = "https://github.com/scverse/cookiecutter-scverse-instance" | ||
urls.Source = "https://github.com/scverse/cookiecutter-scverse-instance" | ||
|
||
[tool.ruff] | ||
line-length = 120 | ||
src = ["src"] | ||
extend-include = ["*.ipynb"] | ||
src = [ "src" ] | ||
extend-include = [ "*.ipynb" ] | ||
|
||
[tool.ruff.format] | ||
docstring-code-format = true | ||
format.docstring-code-format = true | ||
|
||
[tool.ruff.lint] | ||
select = [ | ||
"F", # Errors detected by Pyflakes | ||
"E", # Error detected by Pycodestyle | ||
"W", # Warning detected by Pycodestyle | ||
"I", # isort | ||
"D", # pydocstyle | ||
"B", # flake8-bugbear | ||
"TID", # flake8-tidy-imports | ||
"C4", # flake8-comprehensions | ||
"BLE", # flake8-blind-except | ||
"UP", # pyupgrade | ||
"RUF100", # Report unused noqa directives | ||
lint.select = [ | ||
"B", # flake8-bugbear | ||
"BLE", # flake8-blind-except | ||
"C4", # flake8-comprehensions | ||
"D", # pydocstyle | ||
"E", # Error detected by Pycodestyle | ||
"F", # Errors detected by Pyflakes | ||
"I", # isort | ||
"RUF100", # Report unused noqa directives | ||
"TID", # flake8-tidy-imports | ||
"UP", # pyupgrade | ||
"W", # Warning detected by Pycodestyle | ||
] | ||
ignore = [ | ||
# line too long -> we accept long comment lines; formatter gets rid of long code lines | ||
"E501", | ||
# Do not assign a lambda expression, use a def -> lambda expression assignments are convenient | ||
"E731", | ||
# allow I, O, l as variable names -> I is the identity matrix | ||
"E741", | ||
# Missing docstring in public package | ||
"D104", | ||
# Missing docstring in public module | ||
"D100", | ||
# Missing docstring in __init__ | ||
"D107", | ||
# Errors from function calls in argument defaults. These are fine when the result is immutable. | ||
"B008", | ||
# __magic__ methods are often self-explanatory, allow missing docstrings | ||
"D105", | ||
# first line should end with a period [Bug: doesn't work with single-line docstrings] | ||
"D400", | ||
# First line should be in imperative mood; try rephrasing | ||
"D401", | ||
## Disable one in each pair of mutually incompatible rules | ||
# We don’t want a blank line before a class docstring | ||
"D203", | ||
# We want docstrings to start immediately after the opening triple quote | ||
"D213", | ||
lint.ignore = [ | ||
"B008", # Errors from function calls in argument defaults. These are fine when the result is immutable. | ||
"D100", # Missing docstring in public module | ||
"D104", # Missing docstring in public package | ||
"D105", # __magic__ methods are often self-explanatory, allow missing docstrings | ||
"D107", # Missing docstring in __init__ | ||
# Disable one in each pair of mutually incompatible rules | ||
"D203", # We don’t want a blank line before a class docstring | ||
"D213", # <> We want docstrings to start immediately after the opening triple quote | ||
"D400", # first line should end with a period [Bug: doesn’t work with single-line docstrings] | ||
"D401", # First line should be in imperative mood; try rephrasing | ||
"E501", # line too long -> we accept long comment lines; formatter gets rid of long code lines | ||
"E731", # Do not assign a lambda expression, use a def -> lambda expression assignments are convenient | ||
"E741", # allow I, O, l as variable names -> I is the identity matrix | ||
] | ||
lint.per-file-ignores."*/__init__.py" = [ "F401" ] | ||
lint.per-file-ignores."docs/*" = [ "I" ] | ||
lint.per-file-ignores."tests/*" = [ "D" ] | ||
lint.pydocstyle.convention = "numpy" | ||
|
||
[tool.ruff.lint.pydocstyle] | ||
convention = "numpy" | ||
[tool.pytest.ini_options] | ||
testpaths = [ "tests" ] | ||
xfail_strict = true | ||
addopts = [ | ||
"--import-mode=importlib", # allow using test files with same name | ||
] | ||
|
||
[tool.ruff.lint.per-file-ignores] | ||
"docs/*" = ["I"] | ||
"tests/*" = ["D"] | ||
"*/__init__.py" = ["F401"] | ||
[tool.coverage.run] | ||
source = [ "cookiecutter_scverse_instance" ] | ||
omit = [ | ||
"**/test_*.py", | ||
] | ||
|
||
[tool.cruft] | ||
skip = [ | ||
"tests", | ||
"src/**/__init__.py", | ||
"src/**/basic.py", | ||
"docs/api.md", | ||
"docs/changelog.md", | ||
"docs/references.bib", | ||
"docs/references.md", | ||
"docs/notebooks/example.ipynb", | ||
"tests", | ||
"src/**/__init__.py", | ||
"src/**/basic.py", | ||
"docs/api.md", | ||
"docs/changelog.md", | ||
"docs/references.bib", | ||
"docs/references.md", | ||
"docs/notebooks/example.ipynb", | ||
] |