-
Notifications
You must be signed in to change notification settings - Fork 1
/
pyproject.toml
200 lines (177 loc) · 4.29 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
195
196
197
198
199
200
[build-system]
build-backend = "setuptools.build_meta"
requires = ["setuptools"]
[project]
name = "plan-a-trip-to-mars"
version = "1.0.0"
description = "A playground for simple 2D orbital mechanics++"
authors = [{ name = "Eirik Rolland Enger", email = "[email protected]" }]
license = { file = "LICENSE" }
requires-python = ">=3.12"
dependencies = [
"matplotlib>=3.9.2",
"numpy>=2.1.1",
"returns>=0.23.0,<0.24",
"rich>=13.7.1",
]
[project.scripts]
plan-a-trip-to-mars = "plan_a_trip_to_mars.__main__:main"
simulation = "plan_a_trip_to_mars.simulation:main"
[project.optional-dependencies]
dev = [
"pydoclint>=0.5.9,<0.6",
"pydocstringformatter>=0.7.3,<0.8",
"ruff",
"pytest",
"pre-commit",
"pre-commit-hooks",
]
[tool.uv]
dev-dependencies = [
"ruff>=0.6.4",
"pre-commit>=3.5.0",
"pre-commit-hooks>=4.6.0",
"pytest>=8.3.2",
"mypy>=1.11.2",
"pydocstringformatter>=0.7.3",
"pydoclint>=0.5.9",
"pyqt6>=6.7.1",
]
[tool.pixi.project]
channels = ["conda-forge"]
platforms = ["win-64", "linux-64", "osx-64", "osx-arm64"]
[tool.pixi.pypi-dependencies]
plan-a-trip-to-mars = { path = ".", editable = true }
[tool.pixi.tasks]
hello = { cmd = "plan-a-trip-to-mars" }
simulation = { cmd = "python ./src/plan_a_trip_to_mars/simulation.py" }
[tool.pixi.feature.spyder.tasks]
spyder = { cmd = "spyder -p '.'" }
[tool.pixi.feature.spyder.dependencies]
spyder-kernels = ">=2.5.2,<3"
spyder = ">=5.5.1,<6"
[tool.pixi.feature.dev.dependencies]
ruff = ">=0.6.8,<0.7"
pre-commit = ">=3.8.0,<4"
pre-commit-hooks = ">=4.6.0,<5"
pytest = ">=8.3.3,<9"
[tool.pixi.environments]
spyder = ["spyder", "dev"]
[tool.isort]
combine_as_imports = true
force_grid_wrap = 0
include_trailing_comma = true
line_length = 88
multi_line_output = 3
profile = "black"
use_parentheses = true
[tool.mypy]
enable_incomplete_feature = ["NewGenericSyntax"]
allow_redefinition = false
check_untyped_defs = true
disallow_untyped_calls = false
files = ["src", "tests"]
ignore_errors = false
ignore_missing_imports = true
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.pydocstringformatter]
numpydoc-section-hyphen-length = true
split-summary-body = false
strip-whitespaces = true
style = ["pep257", "numpydoc"]
write = true
[tool.ruff]
# Exclude a variety of commonly ignored directories.
exclude = [
"*.pyi",
".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",
]
# Files that were downloaded
extend-exclude = []
# Same as Black.
line-length = 88
# Assume Python 3.12
target-version = "py312"
[tool.ruff.format]
preview = false
docstring-code-format = true
docstring-code-line-length = 88
[tool.ruff.lint]
preview = false
# Allow unused variables when underscore-prefixed.
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
# Allow fix for all enabled rules (when `--fix`) is provided.
fixable = ["ALL"]
# 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 = [
"CPY001",
"COM812",
"E501", # Line too long
"ERA001", # Uncommented code
"ISC001",
"T201", # `print` found
]
per-file-ignores = {}
select = [
"ALL",
# https://docs.astral.sh/ruff/rules/
]
unfixable = []
[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"
[tool.ruff.lint.flake8-quotes]
docstring-quotes = "double"
[tool.ruff.lint.isort]
case-sensitive = true
known-local-folder = ["src"]
[tool.ruff.lint.pydocstyle]
convention = "numpy"
ignore-decorators = ["typing.overload"]
[tool.setuptools.packages.find]
where = ["src"]
[tool.pyright]
exclude = [".venv"]
venvPath = "."
venv = ".venv"
[tool.basedpyright]
exclude = [".venv"]
venvPath = "."
venv = ".venv"