forked from tardis-sn/tardis
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
194 lines (161 loc) · 5.5 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
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
[project]
name = "tardis"
authors = [{ name = "TARDIS Collaboration", email = "[email protected]" }]
license = { text = "BSD-3-Clause" }
classifiers = ["License :: OSI Approved :: BSD License"]
description = "TARDIS - Temperature And Radiative Diffusion In Supernovae"
readme = { file = "README.rst", content-type = "text/x-rst" }
requires-python = ">=3.7"
dependencies = ["astropy"]
dynamic = ["version"]
[project.optional-dependencies]
test = ["pytest-astropy"]
docs = ["sphinx-astropy"]
[project.scripts]
cmfgen2tardis = "tardis.scripts.cmfgen2tardis:main"
[project.urls]
Homepage = "https://tardis-sn.github.io/"
Documentation = "https://tardis-sn.github.io/tardis/"
Repository = "https://github.com/tardis-sn/tardis"
Issues = "https://github.com/tardis-sn/tardis/issues/"
Changelog = "https://tardis-sn.github.io/tardis/contributing/CHANGELOG.html"
[build-system]
requires = ["setuptools",
"setuptools_scm",
"wheel"]
build-backend = "setuptools.build_meta"
[tool.interrogate]
color = true
#exclude = ["docs", "build"]
#fail-under = 90
ignore-init-method = true
ignore-init-module = true
ignore-magic = true
ignore-module = true
ignore-nested-functions = false
ignore-nested-classes = true
ignore-private = true
ignore-property-decorators = true
ignore-regex = ["^test"]
ignore-semiprivate = true
ignore-setters = true
omit-covered-files = false
quiet = false
verbose = 0
#whitelist-regex = []
[tool.ruff]
line-length = 80
lint.select = ["ALL"]
exclude=[]
lint.ignore = [ # NOTE: non-permanent exclusions should be added to `.ruff.toml` instead.
# flake8-builtins (A) : shadowing a Python built-in.
# New ones should be avoided and is up to maintainers to enforce.
"A00",
# flake8-annotations (ANN)
"ANN101", # No annotation for `self`.
"ANN102", # No annotation for `cls`.
# flake8-bugbear (B)
"B008", # FunctionCallArgumentDefault
# flake8-commas (COM)
"COM812", # TrailingCommaMissing
"COM819", # TrailingCommaProhibited
# pydocstyle (D)
# Missing Docstrings
"D102", # Missing docstring in public method. Don't check b/c docstring inheritance.
"D105", # Missing docstring in magic method. Don't check b/c class docstring.
# Whitespace Issues
"D200", # FitsOnOneLine
# Docstring Content Issues
"D410", # BlankLineAfterSection. Using D412 instead.
"D400", # EndsInPeriod. NOTE: might want to revisit this.
# pycodestyle (E, W)
"E711", # NoneComparison (see unfixable)
"E741", # AmbiguousVariableName. Physics variables are often poor code variables
# flake8-fixme (FIX)
"FIX002", # Line contains TODO | notes for improvements are OK iff the code works
# ISC001 shouldn't be used with ruff format
# https://docs.astral.sh/ruff/formatter/#conflicting-lint-rules
"ISC001",
# pep8-naming (N)
"N803", # invalid-argument-name. Physics variables are often poor code variables
"N806", # non-lowercase-variable-in-function. Physics variables are often poor code variables
# pandas-vet (PD)
"PD",
# flake8-self (SLF)
"SLF001", # private member access
# flake8-todos (TD)
"TD002", # Missing author in TODO
# Ruff-specific rules (RUF)
"RUF005", # unpack-instead-of-concatenating-to-collection-literal -- it's not clearly faster.
]
[tool.ruff.lint.extend-per-file-ignores]
".github/workflows/*.py" = ["INP001"]
"test_*.py" = [
"B018", # UselessExpression
"D", # pydocstyle
"S101", # Use of assert detected
]
".pyinstaller/*.py" = ["INP001"] # Not a package.
"conftest.py" = ["INP001"] # Part of configuration, not a package.
"docs/*.py" = [
"INP001", # implicit-namespace-package. The examples are not a package.
]
[tool.ruff.lint.flake8-annotations]
ignore-fully-untyped = true
mypy-init-return = true
[tool.ruff.lint.flake8-comprehensions]
allow-dict-calls-with-keyword-arguments = true
[tool.ruff.lint.flake8-type-checking]
exempt-modules = []
[tool.ruff.lint.isort]
known-first-party = ["tardis", "carsus", "stardis"]
[tool.ruff.lint.pydocstyle]
convention = "numpy"
[tool.setuptools]
packages = ["tardis"]
license-files = ["LICENSE.rst", "licenses/*.rst"]
[tool.setuptools.package-data]
tardis = ["data/*"]
tardis_grid = ["tests/data/*", "./"]
tardis_io = [
"configuration/schemas/*",
"configuration/tests/data/*",
"model/readers/tests/data/*"
]
tardis_model_tests = ["data/*"]
tardis_montecarlo_tests = ["data/*"]
tardis_plasma_tests = ["data/*"]
tardis_scripts = ["debug/*"]
tardis_tests_integration_tests = ["**/*"]
tardis_visualization = ["tools/tests/data/*"]
[tool.pytest.ini_options]
testpaths = ["tardis"]
text_file_format = "rst"
markers = [
# continuum tests
"continuum",
]
[tool.tardis]
edit_on_github = false
[tool.git-cliff.changelog]
header = "## Changelog\n\n"
body = """
### {{version}} ({{ timestamp | date(format="%Y/%m/%d %H:%M", timezone="America/New_York") }})
{% for commit in commits %}
{%- if commit.github.pr_number -%}
- [{{commit.github.pr_number}}](https://github.com/tardis-sn/tardis/pull/{{commit.github.pr_number}}) {{ commit.github.pr_title | split(pat="\n") | first | trim }} ({{commit.github.pr_number}}) (@{{ commit.github.username }})
{% endif -%}
{%- endfor -%}
"""
trim = true
footer = "<!-- generated by git-cliff -->"
[tool.git-cliff.git]
conventional_commits = false
filter_unconventional = false
sort_commits = "newest"
[tool.git-cliff.remote.github]
owner = "tardis-sn"
repo = "tardis"
[tool.codespell]
skip = "*.png,*.ggb,*.jpg,*.gif,*.ico,docs/contributing/CHANGELOG.md,docs/tardis.bib"
quiet-level = 3