forked from PyPSA/PyPSA
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpyproject.toml
186 lines (162 loc) · 4.93 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
[build-system]
requires = ["setuptools>=64", "setuptools_scm>=8"]
build-backend = "setuptools.build_meta"
[project]
name="pypsa"
dynamic = ["version"]
description="Python for Power Systems Analysis"
readme="README.md"
authors=[{name = "PyPSA Developers, see https://pypsa.readthedocs.io/en/latest/developers.html", email = "t.brown@tu-berlin.de"}]
license = { file = "LICENSE" }
classifiers=[
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Development Status :: 5 - Production/Stable",
"Environment :: Console",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: MIT License",
"Natural Language :: English",
"Typing :: Typed",
"Operating System :: OS Independent",
]
requires-python = ">=3.10"
dependencies = [
"numpy",
"scipy>=1.14.1; python_version >= '3.13'",
"scipy; python_version < '3.13'",
"pandas>=0.24",
"xarray",
"netcdf4",
"linopy>=0.4",
"matplotlib",
"geopandas>=0.9",
"networkx>=2",
"deprecation",
"validators",
"highspy",
]
[project.urls]
Homepage = "https://github.com/PyPSA/PyPSA"
Source = "https://github.com/PyPSA/PyPSA"
[project.optional-dependencies]
hdf5 = ["tables; python_version < '3.13'"]
cartopy = [
"cartopy>=0.16",
"requests",
]
gurobipy = ["gurobipy"]
cloudpath = ["cloudpathlib[all]"]
dev = [
"pytest",
"coverage",
"pypower",
"pandapower>=2.14.11; python_version < '3.13'",
"scikit-learn",
"pre-commit",
"ruff",
"mypy"
]
docs = [
"numpydoc==1.8.0",
"sphinx==8.0.2",
"sphinx-book-theme==1.1.3",
"pydata-sphinx-theme==0.15.4",
"sphinx-reredirects==0.1.5",
"nbsphinx==0.9.5",
"nbsphinx-link==1.3.0",
"scikit-learn==1.5.1",
"docutils==0.20.0", # Just temporarily until nbsphinx-link is updated (see https://github.com/vidartf/nbsphinx-link/issues/22)
"ipython==8.26.0",
"ipykernel==6.29.5",
]
# setuptools_scm settings
[tool.setuptools_scm]
version_scheme = "no-guess-dev"
[tool.setuptools.packages.find]
include = ["pypsa"]
[tool.setuptools.package-data]
"pypsa" = ["py.typed"]
# Pytest settings
[tool.pytest.ini_options]
filterwarnings = [
"error::DeprecationWarning", # Raise all DeprecationWarnings as errors
"error::FutureWarning", # Raise all FutureWarnings as errors
"ignore::matplotlib._api.deprecation.MatplotlibDeprecationWarning:pydev",
# See https://github.com/microsoft/debugpy/issues/1623
]
# Coverage settings
[tool.coverage.run]
branch = true
source = ["pypsa"]
omit = ["test/*"]
[tool.coverage.report]
exclude_also = [
"if TYPE_CHECKING:",
]
# Static type checker settings
[tool.mypy]
exclude = ['dev/*', 'examples/*', 'doc/*']
ignore_missing_imports = true
no_implicit_optional = true
warn_unused_ignores = true
show_error_code_links = true
# Maybe activate at later stage
# disallow_any_generics = true
# warn_return_any = true
[[tool.mypy.overrides]]
module = "pypsa.*"
disallow_untyped_defs = true
check_untyped_defs = true
# Formatter and linter settings
[tool.ruff]
extend-include = ['*.ipynb']
[tool.ruff.lint]
select = [
'F', # pyflakes
'E', # pycodestyle: Error
'W', # pycodestyle: Warning
'I', # isort
'D', # pydocstyle
'UP', # pyupgrade
'ANN', # flake-8 annotations
'TID', # flake8-tidy-imports
'NPY', # numpy
'RUF013', # ruff
]
ignore = [
'ANN401', # Dynamically typed expressions are forbidden
'E741', # ambiguous variable names
'D203', # 1 blank line required before class docstring
'D212', # Multi-line docstring summary should start at the second line
'D401', # First line should be in imperative mood
]
[tool.ruff.lint.per-file-ignores]
# pydocstyle ignores, which could be enabled in future when existing
# issues are fixed
"!**/{grouping.py,components/**}" = [
'E501', # line too long
'D100', # Missing docstring in public module
'D101', # Missing docstring in public class
'D102', # Missing docstring in public method
'D103', # Missing docstring in public function
'D105', # Missing docstring in magic method
'D107', # Missing docstring in __init__
'D200', # One-line docstring should fit on one line with quotes
'D202', # No blank lines allowed after function docstring
'D205', # 1 blank line required between summary line and description
'D400', # First line should end with a period
'D404', # First word of the docstring should not be "This
'D413', # Missing blank line after last section
'D415', # First line should end with a period, question mark, or exclamation point
'D417', # Missing argument descriptions in the docstring
# Include once available
# https://github.com/astral-sh/ruff/issues/2310
]
"{test,examples}/**"=[
'ANN' # flake8-annotations
]
[tool.ruff.lint.flake8-tidy-imports]
# Disallow all relative imports.
ban-relative-imports = "all"