forked from iiasa/ixmp
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
180 lines (169 loc) · 4.8 KB
/
Copy pathpyproject.toml
File metadata and controls
180 lines (169 loc) · 4.8 KB
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
[build-system]
requires = ["build", "setuptools-scm"]
[project]
dynamic = ["version"]
name = "ixmp"
description = "The ix modeling platform"
authors = [{ name = "IIASA Energy, Climate, and Environment (ECE) program" }]
maintainers = [
{ name = "Paul Natsuo Kishimoto", email = "mail@paul.kishimoto.name" },
{ name = "Fridolin Glatter", email = "glatter@iiasa.ac.at" },
]
license = "Apache-2.0"
readme = "README.md"
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"Natural Language :: English",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Programming Language :: R",
"Topic :: Scientific/Engineering",
"Topic :: Scientific/Engineering :: Information Analysis",
]
requires-python = ">=3.10"
dependencies = [
"click",
"genno >= 1.20",
"JPype1 >= 1.2.1",
"JPype1 <= 1.4.0; python_version < '3.11'",
"openpyxl",
"pandas >= 1.2",
"pint",
"PyYAML",
"xarray",
]
[project.urls]
Documentation = "https://docs.messageix.org/ixmp"
"Release notes" = "https://docs.messageix.org/projects/ixmp/en/stable/whatsnew.html"
Repository = "https://github.com/iiasa/ixmp"
"Issue tracker" = "https://github.com/iiasa/ixmp/issues"
[project.optional-dependencies]
docs = [
"ixmp[tests]",
"genno >= 1.26", # For sphinx extensions; see doc/conf.py
"GitPython",
"numpydoc",
"sphinx >= 3.0",
"sphinx_rtd_theme",
"sphinxcontrib-bibtex",
]
ixmp4 = [
"ixmp4 >= 0.14, < 0.15",
"gamsapi[core,transfer] >= 45.7.0",
]
report = ["genno[compat,graphviz]"]
tutorial = ["jupyter"]
tests = [
"ixmp[ixmp4,report,tutorial]",
"memory_profiler",
"nbclient >= 0.5",
"pytest >= 9",
"pytest-benchmark",
"pytest-cov",
"pytest-httpserver",
"pytest-rerunfailures",
"pytest-xdist",
]
[project.scripts]
ixmp = "ixmp.cli:main"
[tool.coverage.report]
exclude_also = [
# Imports only used by type checkers
"if TYPE_CHECKING:",
]
omit = [
".venv/*",
"ixmp/types.py",
"ixmp/util/sphinx_linkcode_github.py",
]
[tool.mypy]
files = [
"doc",
"ixmp",
]
# The following are roughly equivalent to `mypy --strict`; see `mypy --help`
# and https://mypy.rtfd.io/en/stable/command_line.html#cmdoption-mypy-strict.
# "Extra" are additional settings.
check_untyped_defs = true
disallow_any_generics = true
disallow_any_unimported = true # Extra
disallow_incomplete_defs = true
disallow_subclassing_any = true
disallow_untyped_calls = true
disallow_untyped_decorators = true
disallow_untyped_defs = true
extra_checks = true
no_implicit_reexport = true
show_error_codes = true # Extra
strict_bytes = true
strict_equality = true
warn_redundant_casts = true
warn_return_any = true
warn_unreachable = true # Extra
warn_unused_configs = true
warn_unused_ignores = true
[[tool.mypy.overrides]]
# Packages/modules for which no type hints are available.
module = [
"gams.*",
"ixmp.reporting.*",
"ixmp.utils",
"jpype",
"memory_profiler",
"pyam",
"xdist",
]
ignore_missing_imports = true
[tool.pytest]
addopts = [
'-m "not rixmp and not performance"',
# Disable faulthandler plugin on Windows to prevent spurious console noise; see
# - https://github.com/jpype-project/jpype/issues/561
# - https://github.com/iiasa/ixmp/issues/229
# - https://github.com/iiasa/ixmp/issues/247
"-p no:faulthandler",
"--benchmark-skip",
"--cov=ixmp",
"--cov-report=",
]
# Parallel to .util.ixmp4.configure_logging_and_warnings(), prevent warnings
# from appearing in the test output
filterwarnings = [
"ignore:Accessing the 'model_fields' :DeprecationWarning:ixmp4.db.filters",
# NB The following don't work if a message regex is added
# NB This is SettingWithCopyWarning(Warning), removed in pandas 3.0.0.
"ignore:::ixmp4.data.db.base",
"ignore::DeprecationWarning:sqlalchemy.sql.schema",
]
markers = [
"rixmp: test of the ixmp R interface.",
"performance: ixmp performance test.",
"jdbc: tests exclusive to JDBCBackend or not (yet) implemented on IXMP4Backend.",
"ixmp4: tests exclusive to IXMP4Backend.",
"ixmp4_never: tests that ixmp4 will never implement",
"ixmp4_not_yet: tests that ixmp4 does not yet support"
]
minversion = "9.0"
strict_config = true
strict_markers = true
tmp_path_retention_policy = "none"
usefixtures = ["tmp_env"]
[tool.ruff.lint]
select = ["C9", "E", "F", "I", "W"]
# FIXME the following exceed this limit
# .backend.io.s_read_excel: 22
# .backend.jdbc.JDBCBackend.item_get_elements: 18
# .core.scenario.Scenario.add_par: 15
# .core.scenario.Scenario.add_set: 18
mccabe.max-complexity = 13
[tool.setuptools.packages]
find = {}
[tool.setuptools_scm]