-
Notifications
You must be signed in to change notification settings - Fork 6
/
pyproject.toml
165 lines (144 loc) · 4.15 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
[tool.poetry]
authors = [
"Max Wolschlager <[email protected]>",
"Fridolin Glatter <[email protected]>",
"Daniel Huppmann <[email protected]>",
"Philip Hackstock <[email protected]>",
]
name = "ixmp4"
version = "0.0.0"
description = "a data warehouse for scenario analysis"
license = "MIT"
readme = "README.md"
packages = [{ include = "ixmp4" }, { include = "ixmp4/py.typed" }]
homepage = "https://software.ece.iiasa.ac.at"
repository = "https://github.com/iiasa/ixmp4"
documentation = "https://docs.ece.iiasa.ac.at/projects/ixmp4"
[tool.poetry.dependencies]
PyJWT = ">=2.4.0"
SQLAlchemy = { extras = ["mypy"], version = ">=2.0.22" }
SQLAlchemy-Utils = ">=0.41.0"
alembic = ">=1.12.0"
fastapi = ">=0.100.0"
httpx = { extras = ["http2"], version = ">=0.25.0" }
openpyxl = ">=3.0.9"
# remove legacy-handling in timeseries- and meta-repositories when dropping pandas < 2.2
pandas = ">=2.1.0"
pandera = ">=0.17.0"
pydantic = ">=2.3.0"
python = ">=3.10, <3.14"
python-dotenv = ">=1.0.1"
typer = ">=0.9.0"
toml = ">=0.10.2"
psycopg = { extras = ["binary"], version = ">=3.1.12" }
pydantic-settings = ">=2.1.0"
rich = ">=13.5.2"
[tool.poetry.group.docs]
optional = true
[tool.poetry.group.docs.dependencies]
sphinx = ">=7.2.4"
sphinx-multiversion = ">=0.2.4"
sphinx-rtd-theme = ">=2.0.0"
sphinxcontrib-bibtex = ">=2.6.1"
sphinxcontrib-openapi = ">=0.8.1"
setuptools = ">=69.2.0"
[tool.poetry.group.server]
optional = true
[tool.poetry.group.server.dependencies]
uvicorn = { extras = ["standard"], version = ">=0.24.0" }
[tool.poetry.group.dev]
optional = true
[tool.poetry.group.dev.dependencies]
build = ">=1.0.3"
mypy = ">=1.13.0"
pandas-stubs = ">=2.0.0.230412"
pre-commit = ">=3.3.3"
ptvsd = ">=4.3.2"
pytest = ">=8.0.0"
pytest-benchmark = ">=4.0.0"
pytest-cov = ">=4.1.0"
ruff = ">=0.2.0"
snakeviz = ">=2.1.1"
types-toml = ">=0.10.8.7"
[tool.poetry.group.tutorial]
optional = true
[tool.poetry.group.tutorial.dependencies]
ipykernel = ">=6.27.1"
[tool.poetry.scripts]
ixmp4 = "ixmp4.__main__:app"
[build-system]
build-backend = "poetry_dynamic_versioning.backend"
requires = ["poetry-core>=1.2.0", "poetry-dynamic-versioning"]
[tool.mypy]
exclude = [
'^ixmp4\/db\/migrations\/',
]
disable_error_code = ['override']
show_error_codes = true
plugins = ['numpy.typing.mypy_plugin', 'pandera.mypy', 'pydantic.mypy', 'sqlalchemy.ext.mypy.plugin']
# The following are equivalent to --strict mypy as seen in
# https://mypy.readthedocs.io/en/stable/existing_code.html#introduce-stricter-options
warn_unused_configs = true
warn_redundant_casts = true
warn_unused_ignores = true
strict_equality = true
extra_checks = true
check_untyped_defs = true
disallow_subclassing_any = true
disallow_untyped_decorators = true
disallow_any_generics = true
disallow_untyped_calls = true
disallow_incomplete_defs = true
disallow_untyped_defs = true
#TODO enable this in a follow-up PR to satisfy --strict
# no_implicit_reexport = true
warn_return_any = true
# These are bonus, it seems:
disallow_any_unimported = true
no_implicit_optional = true
warn_unreachable = true
[[tool.mypy.overrides]]
# Removing this introduces several errors
module = ["uvicorn.workers"]
# Without this, mypy is still fine, but pyproject.toml complains
ignore_missing_imports = true
[tool.pydantic-mypy]
init_forbid_extra = true
init_typed = true
warn_required_dynamic_aliases = true
[tool.ruff]
exclude = [
".git",
"__pycache__",
"*.egg-info",
".pytest_cache",
".mypy_cache",
".venv",
"example.py",
"import.py",
]
line-length = 88
[tool.ruff.format]
# Enable reformatting of code snippets in docstrings.
docstring-code-format = true
[tool.ruff.lint]
select = ["C9", "E", "F", "I", "W"]
ignore = ["B008"]
[tool.ruff.lint.per-file-ignores]
# Ignore unused imports:
"__init__.py" = ["F401"]
"ixmp4/data/db/optimization/base.py" = ["F401"]
"ixmp4/data/db/iamc/base.py"= ["F401"]
# Ignore importing * and resulting possibly missing imports:
"ixmp4/db/__init__.py" = ["F403", "F405"]
[tool.ruff.lint.mccabe]
max-complexity = 10
[tool.coverage.report]
exclude_also = [
# Imports only used by type checkers
"if TYPE_CHECKING:",
]
[tool.poetry-dynamic-versioning]
enable = true
style = "pep440"
vcs = "git"