-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyproject.toml
177 lines (162 loc) · 4.17 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
[project]
name = "inscar"
version = "3.3.2"
description = "Calculate an incoherent scatter spectrum with arbitrary isotropic electron velocity distributions and radar pointing at oblique angles to the magnetic field"
authors = [{ name = "Eirik Enger", email = "[email protected]" }]
readme = "README.rst"
requires-python = ">= 3.9"
dependencies = [
"attrs>=23.2.0",
"numba>=0.58.1",
"scipy>=1.10.1",
"numpy>=2.0.0",
"contourpy>=1.1.1",
]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
]
[project.urls]
changelog = "https://github.com/engeir/inscar/releases"
homepage = "https://github.com/engeir/inscar"
repository = "https://github.com/engeir/inscar"
documentation = "https://inscar.readthedocs.io"
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool]
rye = { dev-dependencies = [
"lmfit>=1.2.2",
"mypy>=1.8.0",
"pre-commit-hooks>=4.5.0",
"pydocstringformatter>=0.7.3",
"pytest>=8.0.2",
"pytest-cov>=4.1.0",
"ruff>=0.4.9",
"tqdm>=4.66.2",
"types-attrs>=19.1.0",
"xdoctest>=1.1.3",
"matplotlib>=3.7.5",
"pre-commit>=3.5.0",
"sphinx-rtd-theme>=2.0.0",
"sphinx-autobuild>=2021.3.14",
"sphinx>=7.3.7",
"sphinx-autodoc-typehints>=2.2.0",
] }
[tool.mypy]
files = ["src", "tests", "assets"]
ignore_missing_imports = true
allow_redefinition = false
check_untyped_defs = true
ignore_errors = false
implicit_reexport = false
local_partial_types = true
no_implicit_optional = true
strict_equality = true
strict_optional = true
warn_no_return = true
warn_redundant_casts = true
warn_unreachable = true
warn_unused_configs = true
warn_unused_ignores = true
[tool.ruff]
# Exclude a variety of commonly ignored directories.
exclude = [
".bzr",
".direnv",
".eggs",
".git",
".git-rewrite",
".hg",
".mypy_cache",
".nox",
".pants.d",
".pytype",
".ruff_cache",
".svn",
".tox",
".venv",
"__pypackages__",
"_build",
"buck-out",
"build",
"dist",
"node_modules",
"venv",
]
# Same as Black.
line-length = 88
# Assume Python 3.9
target-version = "py39"
[tool.ruff.lint]
per-file-ignores = {}
# Allow unused variables when underscore-prefixed.
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
select = [ # https://docs.astral.sh/ruff/rules/
"B", # flake8-bugbear
"D", # pydocstyle
"E", # pycodestyle
"F", # pyflakes
"I", # isort
"PL", # pylint
"Q", # flake8-quotes
"UP", # pyupgrade
]
# Enable Pyflakes (`F`) and a subset of the pycodestyle (`E`) codes by default.
# Unlike Flake8, Ruff doesn't enable pycodestyle warnings (`W`) or
# McCabe complexity (`C901`) by default.
# select = ["E4", "E7", "E9", "F"] # These are the default
# https://docs.astral.sh/ruff/formatter/#conflicting-lint-rules
ignore = [
# "COM812", # Since we don't select COM, this is already ignored
# "COM819", # Since we don't select COM, this is already ignored
"D206",
"D300",
"E111",
"E114",
"E117",
"E266",
"E501",
# "ISC001", # Since we don't select ISC, this is already ignored
# "ISC002", # Since we don't select ISC, this is already ignored
"Q000",
"Q001",
"Q002",
"Q003",
# "W191", # Since we don't select W, this is already ignored
]
# Allow fix for all enabled rules (when `--fix`) is provided.
fixable = ["ALL"]
unfixable = []
[tool.ruff.lint.pydocstyle]
convention = "numpy"
ignore-decorators = ["typing.overload"]
[tool.ruff.lint.flake8-quotes]
docstring-quotes = "double"
[tool.ruff.lint.flake8-import-conventions]
[tool.ruff.lint.flake8-import-conventions.aliases]
# Declare the default aliases.
"matplotlib.pyplot" = "plt"
numpy = "np"
scipy = "sp"
xarray = "xr"
ensemble_run_analysis = "era"
[tool.isort]
multi_line_output = 3
include_trailing_comma = true
force_grid_wrap = 0
use_parentheses = true
case-sensitive = true
known-local-folder = ["src", "inscar"]
line_length = 88
profile = "black"
combine_as_imports = true
[tool.pydocstringformatter]
write = true
strip-whitespaces = true
split-summary-body = false
numpydoc-section-hyphen-length = false
style = ["pep257", "numpydoc"]