@@ -62,22 +62,9 @@ classifiers = [
6262dependencies = []
6363
6464# https://peps.python.org/pep-0621/#dependencies-optional-dependencies
65- # "extras" (e.g. for `pip install .[test]`)
66- [project.optional-dependencies]
67- # add dependencies used for testing here
68- test = ["pytest", "pytest-cov"]
69- # add anything else you like to have in your dev environment here
70- dev = [
71- "ipython",
72- {% - if use_mypy %}
73- "mypy",{% - endif %}
74- "pdbpp", # https://github.com/pdbpp/pdbpp
75- {% - if use_pre_commit %}
76- "pre-commit",{% - endif %}
77- "rich", # https://github.com/Textualize/rich
78- {% - if use_ruff %}
79- "ruff",{% - endif %}
80- ]
65+ # add dependencies for "extra" features here. Not dev dependencies.
66+ # [project.optional-dependencies]
67+ # name = ["dependency"]
8168
8269[project.urls]
8370{% if github_username -%}
@@ -97,14 +84,35 @@ repository = "https://github.com/{{github_username}}/{{project_name}}"
9784# [project.entry-points."some.group"]
9885# tomatoes = "{{module_name}}:main_tomatoes"
9986
87+ # https://peps.python.org/pep-0735/
88+ # setup with `uv sync` or `pip install -e . --group dev`
89+ [dependency-groups]
90+ test = ["pytest", "pytest-cov"]
91+ dev = [
92+ { include-group = "test" },
93+ "ipython",
94+ {% - if use_mypy %}
95+ "mypy",{% - endif %}
96+ "pdbpp", # https://github.com/pdbpp/pdbpp
97+ {% - if use_pre_commit %}
98+ "pre-commit-uv",{% - endif %}
99+ "rich", # https://github.com/Textualize/rich
100+ {% - if use_ruff %}
101+ "ruff",{% - endif %}
102+ ]
103+
104+ [tool.uv.sources]
105+ {{project_name}} = { workspace = true }
106+
100107{% if use_ruff -%}
101108# https://docs.astral.sh/ruff
102109[tool.ruff]
103110line-length = 88
104111target-version = "py3{{ minimum_python }}"
105112src = ["src"]
113+ fix = true
114+ # unsafe-fixes = true
106115
107- # https://docs.astral.sh/ruff/rules
108116[tool.ruff.lint]
109117pydocstyle = { convention = "numpy" }
110118select = [
@@ -119,7 +127,7 @@ select = [
119127 "B", # flake8-bugbear
120128 "A001", # flake8-builtins
121129 "RUF", # ruff-specific rules
122- "TCH", # flake8-type-checking
130+ "TC", # flake8-type-checking
123131 "TID", # flake8-tidy-imports
124132]
125133ignore = [
@@ -128,6 +136,7 @@ ignore = [
128136
129137[tool.ruff.lint.per-file-ignores]
130138"tests/*.py" = ["D", "S"]
139+ "docs/*.py" = ["D", "A"]
131140
132141# https://docs.astral.sh/ruff/formatter/
133142[tool.ruff.format]
@@ -136,6 +145,13 @@ skip-magic-trailing-comma = false # default is false
136145{% - endif -%}
137146{% - if use_mypy %}
138147
148+ # https://docs.pytest.org/
149+ [tool.pytest.ini_options]
150+ minversion = "7.0"
151+ addopts = ["--color=yes"]
152+ testpaths = ["tests"]
153+ filterwarnings = ["error"]
154+
139155# https://mypy.readthedocs.io/en/stable/config_file.html
140156[tool.mypy]
141157files = "src/**/"
@@ -144,19 +160,14 @@ disallow_any_generics = false
144160disallow_subclassing_any = false
145161show_error_codes = true
146162pretty = true
163+ # plugins = ["pydantic.mypy"]
147164
148165# # module specific overrides
149166# [[tool.mypy.overrides]]
150167# module = ["numpy.*",]
151168# ignore_errors = true
152169{% - endif %}
153170
154- # https://docs.pytest.org/
155- [tool.pytest.ini_options]
156- minversion = "7.0"
157- testpaths = ["tests"]
158- filterwarnings = ["error"]
159-
160171# https://coverage.readthedocs.io/
161172[tool.coverage.report]
162173show_missing = true
@@ -165,6 +176,7 @@ exclude_lines = [
165176 "if TYPE_CHECKING:",
166177 "@overload",
167178 "except ImportError",
179+ "raise AssertionError",
168180 "\\.\\.\\.",
169181 "raise NotImplementedError()",
170182 "pass",
@@ -181,4 +193,9 @@ ignore = [
181193 ".pre-commit-config.yaml",
182194 ".ruff_cache/**/*",
183195 "tests/**/*",
196+ "uv.lock",
184197]
198+
199+ # https://github.com/crate-ci/typos/blob/master/docs/reference.md
200+ [tool.typos.default]
201+ extend-ignore-identifiers-re = []
0 commit comments