-
Notifications
You must be signed in to change notification settings - Fork 1
/
pyproject.toml
156 lines (136 loc) · 3.73 KB
/
pyproject.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
[project]
name = "cosmology"
version = "0.1.0"
description = "Cosmology Library"
readme = "README.rst"
requires-python = ">=3.9"
license = {file = "LICENSE"}
keywords = ["cosmology", "API"]
authors = [
{name = "Nathaniel Starkman", email = "[email protected]"},
{name = "Nicolas Tessore", email = "[email protected]"}
]
maintainers = [
{name = "Nathaniel Starkman", email = "[email protected]"},
{name = "Nicolas Tessore", email = "[email protected]"}
]
classifiers = [
"Intended Audience :: Science/Research",
"Intended Audience :: Developers",
"License :: OSI Approved :: BSD License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
]
dependencies = [
"cosmology.api >= 0.1.0",
]
[project.optional-dependencies]
all = [
"cosmology.api >= 0.1.0", # is this needed?
]
test = [
"coverage[toml]",
"numpy>=1.20",
"pytest",
"pytest-cov",
"sybil",
"typing_extensions",
]
docs = [
"furo",
"numpydoc",
"sphinx",
"sphinx-copybutton",
"sybil",
"tomli",
"typing_extensions",
]
[project.urls]
homepage = "https://cosmology.readthedocs.org"
repository = "https://github.com/cosmology-api/cosmolog"
documentation = "https://cosmology.readthedocs.org"
[build-system]
requires = [
"mypy>=0.991",
"setuptools>=45.0",
"setuptools_scm[toml]>=6.3.1",
"wheel",
]
build-backend = 'setuptools.build_meta'
[tool.setuptools]
package-dir = {"" = "src"}
[tool.setuptools_scm]
[tool.coverage.run]
omit = ["tests/*"]
[tool.coverage.report]
exclude_lines = [
# Have to re-enable the standard pragma
# and branches that don't pertain to this version of Python
"pragma: no cover",
"pragma: py{ignore_python_version}",
# Don't complain if tests don't hit defensive assertion code:
"raise AssertionError",
"raise NotImplementedError",
# Don't complain if non-runnable code isn't run
"if __name__ == .__main__.:",
# Don't complain about abstract methods, they aren't run:
'@(abc\.)?abstractmethod',
# Exclude type check blocks and Protocol contents, they aren't run:
"if TYPE_CHECKING:",
'\.\.\.',
# Don't complain about IPython completion helper
"def _ipython_key_completions_",
]
[tool.mypy]
python_version = 3.9
namespace_packages = true
explicit_package_bases = true
mypy_path = "$MYPY_CONFIG_FILE_DIR/src"
strict = true
disallow_subclassing_any = false
disallow_untyped_defs = true
no_implicit_optional = true
warn_return_any = true
warn_redundant_casts = true
warn_unused_configs = true
warn_unreachable = true
exclude = '''(^|/)tests/|(^/)docs/|(^/)conftest\.py'''
[[tool.mypy.overrides]]
module = [
"tests/*",
"docs/*",
]
ignore_errors = true
[[tool.mypy.overrides]]
module = [
"tomli.*",
"sybil.*",
]
ignore_missing_imports = true
[tool.ruff]
target-version = "py39"
line-length = 88
select = ["ALL"]
ignore = [
"ANN101", # Missing type annotation for {name} in method # TODO: report to Ruff
"ANN102",
"ANN401",
"ARG001", # Unused function argument
"ARG002", # Unused method argument
"COM812", # trailing-comma-missing
"D105", # Missing docstring in magic method
"D107", # Missing docstring in __init__
"D203", # 1 blank line required before class docstring
"D213", # Multi-line docstring summary should start at the second line
"FBT003", # Boolean positional value in function call
"PD", # pandas-vet
"RET505", "RET506", "RET507",
]
[tool.ruff.per-file-ignores]
"docs/*.py" = ["INP001"]
"tests/*.py" = [
"ANN",
"PLR0913", # Too many arguments to function call
"TID252",
]
"test_*.py" = ["ANN", "D", "S101"]