-
Notifications
You must be signed in to change notification settings - Fork 65
Expand file tree
/
Copy pathpyproject.toml
More file actions
182 lines (153 loc) · 3.98 KB
/
pyproject.toml
File metadata and controls
182 lines (153 loc) · 3.98 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
[project]
name = "temoa"
version = "4.0.0a1.dev20251113"
description = "Tools for Energy Model Optimization and Analysis"
readme = "README.md"
requires-python = ">=3.12"
license = { file = "LICENSE.txt" }
authors = [
{ name = "TemoaProject Team", email = "info@temoaproject.org" }
]
dependencies = [
"pyomo>=6.8.0",
"matplotlib==3.9.2",
"pandas>=2.2.2",
"numpy>=2.1.0",
"joblib",
"salib>=1.5.1",
"pydoe>=0.3.8",
"graphviz>=0.20.3",
"seaborn>=0.13.2",
"tabulate>=0.9.0",
"xlsxwriter>=3.2.0",
"pytest>=8.3.2",
"deprecated>=1.2.14",
"openpyxl>=3.1.5",
"networkx>=3.3",
"highspy>=1.7.2",
"scipy>=1.14.1",
"typer>=0.20.0",
"rich>=14.2.0",
"tomlkit>=0.12.0",
]
[project.scripts]
temoa = "temoa.cli:app"
[dependency-groups]
dev = [
"types-deprecated>=1.2.15.20250304",
"ruff>=0.2.0",
"mypy>=1.0.0",
"pre-commit",
"pytest",
"pytest-cov",
"pandas-stubs>=2.3.2.250926",
"types-networkx>=3.5.0.20251001",
]
[project.optional-dependencies]
docs = [
"sphinx>=7.4.7",
"sphinx-rtd-theme>=2.0.0",
"sphinxcontrib-htmlhelp>=2.1.0",
"sphinxcontrib-serializinghtml>=2.0.0",
"sphinxcontrib-bibtex>=2.6.2",
"myst-parser>=2.0.0",
]
plotting = [
"matplotlib>=3.9.2",
"seaborn>=0.13.2",
]
solver = [
"gurobipy>=12.0.3,<13",
]
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.build.targets.wheel]
include = [
"temoa",
]
package-data = { "temoa" = ["db_schema/*.sql", "tutorial_assets/*", "py.typed"] }
[tool.ruff]
line-length = 100
indent-width = 4
exclude = ["stubs",
"temoa/extensions/"
]
[tool.ruff.format]
quote-style = "single"
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"B", # flake8-bugbear
"N", # flake8-naming
"G004" # logging-f-string
]
ignore = [
"E501", # line too long temporarily ignored
]
[tool.ruff.lint.pep8-naming]
ignore-names = ["MGA", "SVMGA"] # Allow these names to violate naming conventions
[tool.pytest.ini_options]
testpaths = [
"tests",
]
filterwarnings = [
# Raise all warnings as errors except for the ones we specifically ignore
"error::DeprecationWarning",
"error::FutureWarning",
"error::RuntimeWarning",
"error::UserWarning",
]
[tool.mypy]
# Python version targeting
python_version = "3.12"
# Tell mypy to also look for stubs in this directory
mypy_path = "stubs"
# Exclude specific directories from type checking will try to add them back gradually
exclude = "(?x)(^temoa/extensions/|^temoa/utilities/|^stubs/)"
# Strict typing for our own code
disallow_untyped_defs = true
disallow_incomplete_defs = true
check_untyped_defs = true
disallow_untyped_decorators = true
no_implicit_optional = true
warn_redundant_casts = true
warn_unused_ignores = true
warn_no_return = true
warn_unreachable = true
strict_equality = true
# Handle external dependencies gracefully
ignore_missing_imports = false
# Be explicit about Any usage
disallow_any_generics = true
disallow_any_unimported = true
disallow_any_expr = false # temporarily false to ease transition
disallow_any_decorated = true
disallow_any_explicit = false # temporarily false to ease transition
# Enable strict checking for core modules
[[tool.mypy.overrides]]
module = [
"temoa.core.*",
"temoa.components.*",
"temoa._internal.*",
"temoa.data_io.*",
"temoa.model_checking.*",
]
disallow_untyped_defs = true
disallow_incomplete_defs = true
check_untyped_defs = true
# Less strict for type definitions (allow Any for stubs)
[[tool.mypy.overrides]]
module = "temoa.types.*"
disallow_any_explicit = false
# More lenient settings for test files to accommodate pytest decorators and test-specific patterns
[[tool.mypy.overrides]]
module = "tests.*"
disallow_any_decorated = false
[project.urls]
Homepage = "https://temoaproject.org"
Documentation = "https://temoaproject.github.io/temoa"
Repository = "https://github.com/TemoaProject/temoa"