-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy pathpyproject.toml
162 lines (147 loc) · 4.98 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
[project]
name = "xbitinfo"
dynamic = ["version"]
description = "Retrieve information content and compress accordingly."
readme = "README.md"
requires-python = ">=3.9"
license = { text = "MIT license" }
keywords = ["xbitinfo"]
dependencies = [
"dask",
"xarray",
"tqdm",
"numcodecs>=0.10.0",
"matplotlib>=3.9.0",
"prefect>=3.3.0",
"zarr",
]
[dependency-groups]
viz = ["matplotlib<3.9.1", "cmcrameri"]
prefect = ["prefect>=3.3.0"]
io = ["netcdf4", "zarr"]
julia = ["julia"]
test = ["pytest", "pooch", "netcdf4", "dask", "zarr", "julia", "cmcrameri", "cfgrib", "prefect>=3.3.0", "prefect_dask"]
docs = [
"sphinx",
"sphinxcontrib-napoleon",
"sphinx-copybutton",
"sphinx_book_theme",
"myst-nb",
"matplotlib<3.9.1",
"nbconvert",
"cmcrameri",
"prefect>=3.3.0",
"netcdf4",
"ipykernel",
"s3fs",
"zarr",
"julia",
"pooch",
]
[tool.setuptools]
packages = ["xbitinfo", "xbitinfo.*"]
include-package-data = true
package-data = { "xbitinfo" = ["*.jl"] }
test-suite = "tests"
[tool.pytest]
addopts = "--ignore=setup.py"
[tool.pytest.ini_options]
norecursedirs = [
".git",
".github",
"docs",
]
[tool.ruff]
line-length = 120
target-version = "py38"
exclude = [".git", "asv_bench", "docs", "conftest.py"]
[tool.ruff.lint]
select = [
# https://pypi.org/project/pycodestyle
"E",
"W",
# https://pypi.org/project/pyflakes
"F",
# https://pypi.org/project/flake8-bandit
"S",
# https://docs.astral.sh/ruff/rules/#pyupgrade-up
"UP",
"I002", # Missing required imports
"UP008", # Super calls with redundant arguments passed.
"G010", # Deprecated log warn.
"PLR1722", # Use sys.exit() instead of exit() and quit().
"PT014", # pytest-duplicate-parametrize-test-cases.
"PT006", # Checks for the type of parameter names passed to pytest.mark.parametrize.
"PT007", # Checks for the type of parameter values passed to pytest.mark.parametrize.
"PT018", # Checks for assertions that combine multiple independent conditions.
]
extend-select = [
"I", # isort
"C4", # https://pypi.org/project/flake8-comprehensions
]
ignore = [
"S101", # Use of `assert` detected
"E203", # Whitespace-before-punctuation.
"E402", # Module-import-not-at-top-of-file.
"E731", # Do not assign a lambda expression, use a def.
"D100", # Missing docstring in public module.
"D101", # Missing docstring in public class.
"D102", # Missing docstring in public method.
"D103", # Missing docstring in public function.
"D104", # Missing docstring in public package.
"D105", # Missing docstring in magic method.
"D106", # Missing docstring in public nested class.
"D107", # Missing docstring in `__init__`.
"RET504", # Unnecessary variable assignment before `return` statement.
"S101", # Use of `assert` detected.
"S108",
"D203", # 1 blank line required before class docstring.
"D205", # 1 blank line required between summary line and description.
"D212", # Multi-line docstring summary should start at the first line.
"D213", # Multi-line docstring summary should start at the second line.
"D209", # Multi-line docstring closing quotes should be on a separate line.
"D400", # First line should end with a period.
"D413", # Missing blank line after last section of docstrings.
"D401", # First line of docstring should be in imperative mood.
"D415", # First line should end with a period, question mark, or exclamation point.
"D416", # Section name should end with a colon ("Attributes").
"D417", # Missing argument description in the docstring for argument "X".
"RUF100", # https://docs.astral.sh/ruff/rules/unused-noqa/
"C408",
"SIM118",
"RET506",
"TRY004",
"RET505",
"RET507",
"SIM108",
"SIM102",
"E501", # line too long
"E266",
"F403",
"F401",
"F841",
"RET",
"SIM",
"PT",
]
ignore-init-module-imports = true
[tool.ruff.lint.per-file-ignores]
"setup.py" = ["S101"]
"**/__init__.py" = ["F401", "F403", "F405", "F811", "F821", "E501", "SIM102"]
"tests/**" = [
"S605", # Starting a process with a shell: seems safe, but may be changed in the future; consider rewriting without `shell`
"S607", # Starting a process with a partial executable path
"RET504", # todo:Unnecessary variable assignment before `return` statement
"PT004", # Fixture `tmpdir_unittest_fixture` does not return anything, add leading underscore
"PT011", # `pytest.raises(ValueError)` is too broad, set the `match` parameter or use a more specific exception
"PT012", # `pytest.raises()` block should contain a single simple statement
"PT019", # Fixture `_` without value is injected as parameter, use `@pytest.mark.usefixtures` instead
"PT006" # Checks for the type of parameter names passed to pytest.mark.parametrize.
]
[tool.blackdoc]
exclude = "docs/index.rst"
[build-system]
requires = ["pdm-backend"]
build-backend = "pdm.backend"
[tool.pdm.version]
source = "scm"