forked from iiasa/message-ix-models
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
197 lines (183 loc) · 5.46 KB
/
pyproject.toml
File metadata and controls
197 lines (183 loc) · 5.46 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
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
[build-system]
requires = ["build", "setuptools-scm"]
[project]
dynamic = ["version"]
name = "message-ix-models"
description = "Tools for the MESSAGEix-GLOBIOM family of models"
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" },
]
readme = "README.rst"
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",
]
license = "Apache-2.0"
requires-python = ">=3.10"
dependencies = [
"click",
"colorama",
# When the minimum is greater than the minimum via message_ix. Currently:
# - message_ix >= 3.8.0 → ixmp >= 3.8.0 → genno >= 1.16"
# - message_ix >= 3.8.0 → genno >= 1.18.1"
"genno >= 1.25",
"iam_units >= 2023.9.11",
"message_ix >= 3.8",
"pooch",
"pyam-iamc >= 0.6",
"pyarrow",
"pycountry",
"PyYAML",
"sdmx1 >= 2.22.0",
"tqdm",
"pyxlsb >= 1.0.10",
]
[project.urls]
Documentation = "https://docs.messageix.org/models"
"Release notes" = "https://docs.messageix.org/projects/models/en/stable/whatsnew.html"
Repository = "https://github.com/iiasa/message-ix-models"
"Issue tracker" = "https://github.com/iiasa/message-ix-models/issues"
[project.optional-dependencies]
buildings = ["jaydebeapi"]
docs = [
# sphinx.ext.autosummary covers the test suite, so all test requirements
"message_ix_models[tests]",
"sphinx >= 4",
"sphinx_rtd_theme",
"sphinxcontrib-bibtex",
]
iea-web = ["dask[dataframe]"]
material = ["xlrd"]
migrate = [
"git-filter-repo",
"GitPython",
]
report = ["plotnine", "xlsxwriter"]
tests = [
"message-ix[tests]",
"message_ix_models[buildings,material,report,transport]",
"pytest",
"pytest-cov",
"pytest-timeout",
"pytest-xdist",
# On RTD, pip tries to build this version from .tar.gz, but
# it contains packaging errors that cause the job to error.
"gamsapi > 47.6.0",
]
transport = [
"message-ix-models[iea-web,report]",
"requests-cache",
"transport-energy",
"xarray",
]
[project.scripts]
mix-models = "message_ix_models.cli:main"
[tool.coverage.report]
exclude_also = [
# Don't complain about abstract methods, they aren't run
"@(abc\\.)?abstractmethod",
# Imports only used by type checkers
"if TYPE_CHECKING:",
# Requires message_data
"if HAS_MESSAGE_DATA:",
]
[tool.coverage.run]
omit = [
"message_ix_models/project/ssp/script/*",
# The single existing test is far from enough
"message_ix_models/report/legacy/*",
"message_ix_models/util/migrate.py",
]
[tool.mypy]
files = [
"doc",
"message_ix_models",
]
[[tool.mypy.overrides]]
module = [
# TODO Satisfy mypy in the following
"message_ix_models.model.material.build",
"message_ix_models.model.material.data_ammonia",
"message_ix_models.model.material.data_generic",
"message_ix_models.model.material.data_petro",
"message_ix_models.model.material.data_steel",
"message_ix_models.model.material.data_util",
"message_ix_models.model.material.demand.*",
"message_ix_models.model.material.util",
"message_ix_models.model.water.*",
# Legacy codes that may not be type hinted
"message_ix_models.report.legacy.*",
"message_ix_models.tools.messagev",
"message_ix_models.util.compat.message_data.*",
]
ignore_errors = true
[[tool.mypy.overrides]]
# Packages/modules for which no type hints are available
module = [
"colorama",
"message_data.*",
"plotnine",
"pooch",
"pycountry",
# Indirectly via message_ix
# This should be a subset of the list in message_ix's pyproject.toml
"matplotlib.*",
"pandas.*",
"pyam",
# Indirectly via ixmp
# This should be a subset of the list in ixmp's pyproject.toml
"dask.*",
"jpype",
"memory_profiler",
"scipy",
"sklearn",
]
ignore_missing_imports = true
[tool.pytest.ini_options]
# Default options for invoking pytest
# - Skip tests with the "ece_db" marker
# - Disable faulthandler plugin on Windows to prevent spurious console noise
# - No coverage report
addopts = """
-m "not ece_db"
-p no:faulthandler
--cov=message_ix_models --cov-report="""
filterwarnings = "ignore:distutils Version classes.*:DeprecationWarning"
markers = [
"ece_db: Tests requiring access to IIASA ECE internal databases",
"slow: Tests that typically take more than ~45 seconds wall time",
"snapshot: Slow tests using the public MESSAGEix-GLOBIOM baseline snapshot",
]
[tool.ruff]
exclude = [
"doc/_static/png_source_files/Land-use_emulator_figures.ipynb",
"message_ix_models/model/material/report/Historical Power Sector Stock Reporting-.ipynb",
"message_ix_models/report/legacy/",
"message_ix_models/util/compat/message_data/",
]
[tool.ruff.lint]
select = ["C9", "E", "F", "I", "W"]
# Exceptions:
# 13 .project.navigate.workflow.generate()
# 30 .project.ssp.script.util.shares.main()
# 12 .tools.wb.assign_income_groups()
# 13 .util.sdmx.as_codes()
mccabe.max-complexity = 11
[tool.setuptools]
packages = ["message_ix_models"]
[tool.setuptools_scm]