-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathpyproject.toml
174 lines (152 loc) · 4.86 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
[build-system]
requires = ["hatchling>=1.27.0", "hatch-vcs>=0.4.0"]
build-backend = "hatchling.build"
[project]
name = "xcompact3d_toolbox"
description = "A set of tools for pre and postprocessing prepared for the high-order Navier-Stokes solver XCompact3d"
readme = "README.md"
requires-python = ">=3.9"
authors = [{ name = "Felipe N. Schuch", email = "[email protected]" }]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python",
"Topic :: Scientific/Engineering",
]
dynamic = ["version"]
dependencies = [
"dask[complete]>=2024.8",
"Deprecated>=1.2",
"ipywidgets>=8.1",
"loguru>=0.7",
"netcdf4>=1.7",
"numba>=0.60",
"numpy-stl>=3.2",
"numpy>=2.0",
"pandas>=2.2",
"scipy>=1.13",
"tqdm>=4.67",
"traitlets>=5.14",
"xarray>=2024.7",
]
[project.optional-dependencies]
visu = [
"bokeh>=2.3",
"datashader>=0.13",
"holoviews>=1.14",
"hvplot>=0.7",
"matplotlib>=3.2",
"panel>=0.12",
]
[project.urls]
Repository = "https://github.com/fschuch/xcompact3d_toolbox"
Changelog = "https://docs.fschuch.com/xcompact3d_toolbox/changelog.html"
Documentation = "https://docs.fschuch.com/xcompact3d_toolbox"
Issues = "https://github.com/fschuch/xcompact3d_toolbox/issues"
[tool.pytest.ini_options]
filterwarnings = [
# Internal deprecation warnings
"ignore:.*Call to deprecated method cumtrapz.*:FutureWarning",
"ignore:.*Call to deprecated method simps.*:FutureWarning",
]
# addopts = [
# "--doctest-modules",
# "--doctest-glob='*.md'",
# "--doctest-continue-on-failure",
# "--doctest-report=ndiff",
# ]
[tool.coverage.run]
branch = true
relative_files = true
source = ["xcompact3d_toolbox", "tests"]
omit = ["xcompact3d_toolbox/_version.py", "**/__init__.py"]
[tool.coverage.report]
show_missing = false
precision = 2
exclude_lines = ["no cov", "if __name__ == .__main__.:", "if TYPE_CHECKING:", "def __repr__"]
[tool.ruff]
extend = "ruff_defaults.toml"
extend-exclude = ["./docs/conf.py"]
[tool.ruff.lint]
extend-ignore = ["A003"]
[tool.ruff.lint.extend-per-file-ignores]
"*.ipynb" = [
"E402", # module level import not at top of file
"E712", # comparison to True should be 'if cond is True:' or 'if cond:'
"PLR2004", # Magic value used in comparison
"T201", # `print` found
]
"__init__.py" = ["F401"] # imported but unused
"xcompact3d_toolbox/parameters.py" = [
"N815", # variable in function should be lowercase, but they come from x3d
]
"xcompact3d_toolbox/sandbox.py" = [
"E712", # comparison to True should be 'if cond is True:' or 'if cond:'
]
[tool.ruff.lint.pydocstyle]
convention = "numpy"
[tool.mypy]
pretty = true
ignore_missing_imports = true
exclude = ["docs/conf.py"]
[tool.codespell]
skip = "docs/conf.py"
check-filenames = true
[tool.hatch.version]
source = "vcs"
[tool.hatch.build.hooks.vcs]
version-file = "xcompact3d_toolbox/_version.py"
[tool.hatch.envs.default]
description = "Base development environment"
dependencies = [
"coverage[toml]>=7.5.3",
"hypothesis>=6.103.1",
"pre-commit>=3.5.0",
"pytest-cov>=5.0.0",
"pytest>=8.2.2",
]
[tool.hatch.envs.default.scripts]
pre-commit-install = "pre-commit install {args}"
pre-commit-uninstall = "pre-commit uninstall {args}"
check = "pre-commit run {args} --all-files"
type = "check mypy {args}"
lint = "check ruff {args}"
format = "check ruff-format {args}"
test = "pytest --cov --cov-report=term --cov=xcompact3d_toolbox --cov=tests {args}"
test-no-cov = "test --no-cov {args}"
qa = ["check", "test", "echo '✅ QA passed'"]
[tool.hatch.envs.test]
description = "Extended test environment"
extra-dependencies = ["pytest-randomly", "pytest-rerunfailures", "pytest-xdist"]
[tool.hatch.envs.test.scripts]
extended = "test -n auto --reruns 7 --reruns-delay 1 {args}"
[[tool.hatch.envs.test.matrix]]
python = ["3.9", "3.10", "3.11", "3.12"]
[tool.hatch.envs.docs]
description = "Documentation environment"
features = ["visu"]
template = "docs"
install = true
python = "3.12"
dependencies = [
"docutils==0.20.1",
"ipykernel==6.29.4",
"jupyter-book==1.0.0",
"nbsphinx==0.9.4",
"pooch==1.8.1",
"sphinx-autobuild==2024.4.16",
"sphinx==7.3.7",
"sphinx-github-changelog==1.3.0",
]
[tool.hatch.envs.docs.scripts]
config = "jupyter-book config sphinx docs {args}"
build = ["config", "jupyter-book build docs --path-output build {args}"]
serve = ["config", "sphinx-autobuild docs build/_build/html --ignore='**/data/*' --watch xcompact3d_toolbox --open-browser {args}"]
clear = "rm -rf build/_build"
[tool.hatch.envs.hatch-static-analysis]
config-path = "ruff_defaults.toml"