Skip to content

Commit 5d62f6d

Browse files
committed
reincorporated cc-uv pyproject.toml elements
1 parent dcdaa61 commit 5d62f6d

File tree

2 files changed

+520
-682
lines changed

2 files changed

+520
-682
lines changed

pyproject.toml

Lines changed: 119 additions & 122 deletions
Original file line numberDiff line numberDiff line change
@@ -1,102 +1,86 @@
1+
[build-system]
2+
requires = ["setuptools >= 70.1", "setuptools_scm[toml] ~= 8.1"]
3+
build-backend = "setuptools.build_meta"
4+
5+
[dependency-groups]
6+
dev = [
7+
"deptry>=0.23.0",
8+
"mkdocs-material>=8.5.10",
9+
"mkdocs>=1.4.2",
10+
"mkdocstrings[python]>=0.26.1",
11+
"mypy>=0.991",
12+
"pre-commit>=2.20.0",
13+
"pytest-cov>=4.0.0",
14+
"pytest>=7.2.0",
15+
"ruff>=0.11.5",
16+
"tox-uv>=1.11.3",
17+
"ty>=0.0.1a16"
18+
]
19+
120
[project]
221
name = "biocommons-example"
322
authors = [
4-
{ name = "biocommons contributors", email = "[email protected]" },
23+
{name = "biocommons contributors", email = "[email protected]"}
524
]
625
description = "biocommons.example package (namespaced)"
726
readme = "README.md"
827
license = "MIT"
928
requires-python = ">=3.10"
1029
classifiers = [
11-
"Programming Language :: Python :: 3",
12-
"Programming Language :: Python :: 3.10",
13-
"Programming Language :: Python :: 3.11",
14-
"Programming Language :: Python :: 3.12",
15-
"Operating System :: OS Independent",
30+
"Programming Language :: Python :: 3",
31+
"Programming Language :: Python :: 3.10",
32+
"Programming Language :: Python :: 3.11",
33+
"Programming Language :: Python :: 3.12",
34+
"Operating System :: OS Independent"
1635
]
17-
dynamic = ["version"]
1836
dependencies = ["coloredlogs ~= 15.0", "pyyaml ~= 6.0"]
19-
20-
[project.optional-dependencies]
21-
dev = [
22-
"build ~= 0.8",
23-
"ipython ~= 8.4",
24-
"pre-commit ~= 3.4",
25-
"ruff == 0.4.4",
26-
]
27-
tests = [
28-
"pytest-cov ~= 4.1",
29-
"pytest ~= 7.1",
30-
"vcrpy",
31-
"tox ~= 4.15",
32-
]
33-
docs = ["mkdocs"]
37+
dynamic = ["version"]
3438

3539
[project.scripts]
3640
marvin-quote = "biocommons.example.__main__:main"
3741

3842
[project.urls]
39-
"Homepage" = "https://github.com/biocommons/biocommons.example"
40-
"Bug Tracker" = "https://github.com/biocommons/biocommons.example/issues"
43+
Homepage = "https://biocommons.github.io/python-package/"
44+
Issues = "https://github.com/biocommons/python-package/issues"
45+
Repository = "https://github.com/biocommons/python-package"
46+
Documentation = "https://biocommons.github.io/python-package/"
4147

48+
[tool.coverage]
4249

43-
[build-system]
44-
requires = ["setuptools >= 70.1", "setuptools_scm[toml] ~= 8.1"]
45-
build-backend = "setuptools.build_meta"
46-
47-
48-
[tool.setuptools]
49-
include-package-data = true
50-
51-
[tool.setuptools.packages.find]
52-
where = ["src"]
53-
exclude = ["__pycache__", "*.pyc"]
54-
namespaces = true
55-
56-
[tool.setuptools.package-data]
57-
"*" = ["*.gz", "*.json", "*.yaml"]
58-
59-
60-
[tool.setuptools_scm]
50+
[tool.coverage.report]
51+
show_missing = true
52+
skip_empty = true
53+
exclude_lines = [
54+
# Have to re-enable the standard pragma
55+
"pragma: no cover",
56+
# Don't complain about missing debug-only code:
57+
"def __repr__",
58+
"if self.debug",
59+
# Don't complain if tests don't hit defensive assertion code:
60+
"raise AssertionError",
61+
"raise NotImplementedError",
62+
# Don't complain if non-runnable code isn't run:
63+
"if __name__ == .__main__.:"
64+
]
6165

66+
[tool.coverage.run]
67+
branch = true
68+
omit = ["*_test.py", "*/test/*", "*/tests/*"]
69+
source = ["src"]
6270

6371
# https://docs.pytest.org/en/6.2.x/customize.html#pyproject-toml
6472
[tool.pytest.ini_options]
6573
addopts = "-s -v -x --strict-markers -m 'not extra' --doctest-modules --cov=src"
6674
doctest_optionflags = [
67-
"ALLOW_BYTES",
68-
"ALLOW_UNICODE",
69-
"ELLIPSIS",
70-
"IGNORE_EXCEPTION_DETAIL",
71-
"NORMALIZE_WHITESPACE",
75+
"ALLOW_BYTES",
76+
"ALLOW_UNICODE",
77+
"ELLIPSIS",
78+
"IGNORE_EXCEPTION_DETAIL",
79+
"NORMALIZE_WHITESPACE"
7280
]
7381
markers = [
74-
"network: tests that require network connectivity",
75-
"slow: slow tests that should be run infrequently",
76-
]
77-
78-
79-
[tool.coverage.run]
80-
branch = true
81-
omit = ["*_test.py", "*/test/*", "*/tests/*"]
82-
83-
84-
[tool.coverage.report]
85-
show_missing = true
86-
exclude_lines = [
87-
# Have to re-enable the standard pragma
88-
"pragma: no cover",
89-
90-
# Don't complain about missing debug-only code:
91-
"def __repr__",
92-
"if self.debug",
93-
94-
# Don't complain if tests don't hit defensive assertion code:
95-
"raise AssertionError",
96-
"raise NotImplementedError",
97-
98-
# Don't complain if non-runnable code isn't run:
99-
"if __name__ == .__main__.:",
82+
"network: tests that require network connectivity",
83+
"slow: slow tests that should be run infrequently"
10084
]
10185

10286
[tool.ruff]
@@ -105,60 +89,73 @@ line-length = 100
10589

10690
[tool.ruff.lint]
10791
select = [
108-
"F", # https://docs.astral.sh/ruff/rules/#pyflakes-f
109-
"E",
110-
"W", # https://docs.astral.sh/ruff/rules/#pycodestyle-e-w
111-
"I", # https://docs.astral.sh/ruff/rules/#isort-i
112-
"N", # https://docs.astral.sh/ruff/rules/#pep8-naming-n
113-
"UP", # https://docs.astral.sh/ruff/rules/#pyupgrade-up
114-
"YTT", # https://docs.astral.sh/ruff/rules/#flake8-2020-ytt
115-
"S", # https://docs.astral.sh/ruff/rules/#flake8-bandit-s
116-
"B", # https://docs.astral.sh/ruff/rules/#flake8-bugbear-b
117-
"A", # https://docs.astral.sh/ruff/rules/#flake8-builtins-a
118-
"C4", # https://docs.astral.sh/ruff/rules/#flake8-comprehensions-c4
119-
"DTZ", # https://docs.astral.sh/ruff/rules/#flake8-datetimez-dtz
120-
"EM", # https://docs.astral.sh/ruff/rules/#flake8-errmsg-em
121-
"LOG", # https://docs.astral.sh/ruff/rules/#flake8-logging-log
122-
"G", # https://docs.astral.sh/ruff/rules/#flake8-logging-format-g
123-
"PIE", # https://docs.astral.sh/ruff/rules/#flake8-pie-pie
124-
"PT", # https://docs.astral.sh/ruff/rules/#flake8-pytest-style-pt
125-
"RSE", # https://docs.astral.sh/ruff/rules/#flake8-raise-rse
126-
"RET", # https://docs.astral.sh/ruff/rules/#flake8-return-ret
127-
"SIM", # https://docs.astral.sh/ruff/rules/#flake8-simplify-sim
128-
"ARG", # https://docs.astral.sh/ruff/rules/#flake8-unused-arguments-arg
129-
"PTH", # https://docs.astral.sh/ruff/rules/#flake8-use-pathlib-pth
130-
"PL", # https://docs.astral.sh/ruff/rules/#pylint-pl
131-
"TRY", # https://docs.astral.sh/ruff/rules/#tryceratops-try
132-
"PERF", # https://docs.astral.sh/ruff/rules/#perflint-perf
133-
"RUF", # https://docs.astral.sh/ruff/rules/#ruff-specific-rules-ruf
92+
"F", # https://docs.astral.sh/ruff/rules/#pyflakes-f
93+
"E",
94+
"W", # https://docs.astral.sh/ruff/rules/#pycodestyle-e-w
95+
"I", # https://docs.astral.sh/ruff/rules/#isort-i
96+
"N", # https://docs.astral.sh/ruff/rules/#pep8-naming-n
97+
"UP", # https://docs.astral.sh/ruff/rules/#pyupgrade-up
98+
"YTT", # https://docs.astral.sh/ruff/rules/#flake8-2020-ytt
99+
"S", # https://docs.astral.sh/ruff/rules/#flake8-bandit-s
100+
"B", # https://docs.astral.sh/ruff/rules/#flake8-bugbear-b
101+
"A", # https://docs.astral.sh/ruff/rules/#flake8-builtins-a
102+
"C4", # https://docs.astral.sh/ruff/rules/#flake8-comprehensions-c4
103+
"DTZ", # https://docs.astral.sh/ruff/rules/#flake8-datetimez-dtz
104+
"EM", # https://docs.astral.sh/ruff/rules/#flake8-errmsg-em
105+
"LOG", # https://docs.astral.sh/ruff/rules/#flake8-logging-log
106+
"G", # https://docs.astral.sh/ruff/rules/#flake8-logging-format-g
107+
"PIE", # https://docs.astral.sh/ruff/rules/#flake8-pie-pie
108+
"PT", # https://docs.astral.sh/ruff/rules/#flake8-pytest-style-pt
109+
"RSE", # https://docs.astral.sh/ruff/rules/#flake8-raise-rse
110+
"RET", # https://docs.astral.sh/ruff/rules/#flake8-return-ret
111+
"SIM", # https://docs.astral.sh/ruff/rules/#flake8-simplify-sim
112+
"ARG", # https://docs.astral.sh/ruff/rules/#flake8-unused-arguments-arg
113+
"PTH", # https://docs.astral.sh/ruff/rules/#flake8-use-pathlib-pth
114+
"PL", # https://docs.astral.sh/ruff/rules/#pylint-pl
115+
"TRY", # https://docs.astral.sh/ruff/rules/#tryceratops-try
116+
"PERF", # https://docs.astral.sh/ruff/rules/#perflint-perf
117+
"RUF" # https://docs.astral.sh/ruff/rules/#ruff-specific-rules-ruf
134118
]
135119
fixable = [
136-
"F401",
137-
"F541",
138-
"I",
139-
"D",
140-
"UP",
141-
"B",
142-
"C4",
143-
"EM",
144-
"PIE",
145-
"PT",
146-
"RSE",
147-
"RET",
148-
"SIM",
149-
"PERF",
150-
"RUF",
120+
"F401",
121+
"F541",
122+
"I",
123+
"D",
124+
"UP",
125+
"B",
126+
"C4",
127+
"EM",
128+
"PIE",
129+
"PT",
130+
"RSE",
131+
"RET",
132+
"SIM",
133+
"PERF",
134+
"RUF"
151135
]
152136
ignore = [
153-
# ignore for compatibility with formatter
154-
"W191",
155-
"E111",
156-
"E114",
157-
"E117",
158-
"S321",
159-
# other
160-
"PLR0913",
137+
# ignore for compatibility with formatter
138+
"W191",
139+
"E111",
140+
"E114",
141+
"E117",
142+
"S321",
143+
# other
144+
"PLR0913"
161145
]
162146

163147
[tool.ruff.lint.per-file-ignores]
164148
"tests/*" = ["S101"]
149+
150+
[tool.setuptools]
151+
include-package-data = true
152+
153+
[tool.setuptools.package-data]
154+
"*" = ["*.gz", "*.json", "*.yaml"]
155+
156+
[tool.setuptools.packages.find]
157+
where = ["src"]
158+
exclude = ["__pycache__", "*.pyc"]
159+
namespaces = true
160+
161+
[tool.setuptools_scm]

0 commit comments

Comments
 (0)