-
Notifications
You must be signed in to change notification settings - Fork 35
/
pyproject.toml
172 lines (158 loc) · 4.56 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
[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 = "[email protected]" },
{ name = "Fridolin Glatter", email = "[email protected]" },
]
readme = "README.rst"
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: Apache Software License",
"Natural Language :: English",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: R",
"Topic :: Scientific/Engineering",
"Topic :: Scientific/Engineering :: Information Analysis",
]
requires-python = ">=3.9"
dependencies = [
"click",
"colorama",
# When the minimum is greater than the minimum via message_ix; e.g.
# message_ix >= 3.4.0 → ixmp >= 3.4.0 → genno >= 1.6.0",
"genno >= 1.24.0",
"iam_units >= 2023.9.11",
"message_ix >= 3.4.0",
"pooch",
"pyam-iamc >= 0.6",
"pyarrow",
"pycountry",
"PyYAML",
"sdmx1 >= 2.13.1",
"tqdm",
"pyxlsb >= 1.0.10",
]
[project.urls]
homepage = "https://github.com/iiasa/message-ix-models"
repository = "https://github.com/iiasa/message-ix-models"
documentation = "https://docs.messageix.org/models"
[project.optional-dependencies]
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]"]
migrate = [
"git-filter-repo",
"GitPython",
]
report = ["plotnine", "xlsxwriter"]
tests = [
# For nbclient, thus nbformat
"ixmp[tests]",
"message_ix_models[report,transport]",
"pytest",
"pytest-cov",
"pytest-xdist",
]
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 = [
# The single existing test is far from enough
"message_ix_models/report/legacy/*",
# See https://github.com/iiasa/message-ix-models/issues/164
"message_ix_models/tools/iea/eei.py",
"message_ix_models/util/migrate.py",
]
[tool.mypy]
exclude = ["doc/", "message_ix_models/report/legacy/"]
[[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.mypy.overrides]]
# Work around iiasa/ixmp#465 and similar
module = ["ixmp.*"]
no_implicit_optional = false
[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:
# - .tools.wb.assign_income_groups(): 12 > 11
# - .util.sdmx.as_codes(): 13 > 11
mccabe.max-complexity = 11
[tool.setuptools.packages]
find = {}
[tool.setuptools_scm]