-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathpyproject.toml
More file actions
287 lines (250 loc) · 6.91 KB
/
pyproject.toml
File metadata and controls
287 lines (250 loc) · 6.91 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
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"
[project]
name = "gamspy"
version = "1.23.0"
authors = [
{ name = "GAMS Development Corporation", email = "support@gams.com" },
]
readme = "README_PYPI.md"
description = "Python-based algebraic modeling interface to GAMS"
requires-python = ">=3.10"
license-files = ["LICENSE"]
keywords = ["Optimization", "GAMS"]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Environment :: Console",
"Topic :: Software Development",
"Topic :: Scientific/Engineering",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"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",
"Operating System :: POSIX",
"Operating System :: Unix",
"Operating System :: MacOS",
"Operating System :: Microsoft :: Windows",
]
dependencies = [
"gamsapi >= 53.1.0, < 54.0.0",
"gamspy_base >= 53.1.0, < 54.0.0",
"pandas >= 2.2.2, < 3.1",
"pydantic >= 2.0",
"requests >= 2.28.0",
"typer >= 0.16.0",
]
[project.urls]
homepage = "https://gams.com/sales/gamspy_facts/"
documentation = "https://gamspy.readthedocs.io/en/latest/user/index.html"
repository = "https://github.com/GAMS-dev/gamspy"
changelog = "https://github.com/GAMS-dev/gamspy/blob/develop/CHANGELOG.rst"
[project.optional-dependencies]
torch = ["torch>=2.7.0"]
[tool.uv]
exclude-newer = "7 days"
exclude-newer-package = { torch = false }
[tool.uv.sources]
torch = [{ index = "pytorch-cpu" }]
[[tool.uv.index]]
name = "pytorch-cpu"
url = "https://download.pytorch.org/whl/cpu"
explicit = true
[tool.ty.src]
exclude = ["src/gamspy/_backend/neos.py", "src/gamspy/_backend/engine.py"]
[tool.ty.rules]
unused-type-ignore-comment = "ignore"
[dependency-groups]
dev = [
"griffe>=1.15.0",
"mypy>=1.19.1",
"prek>=0.2.28",
"ruff>=0.14.11",
]
doc = [
"geopandas>=1.1.2",
"ipykernel>=7.1.0",
"kaleido>=0.2.1",
"matplotlib>=3.10.8",
"nbmake>=1.5.5",
"nbsphinx>=0.9.8",
"numpydoc>=1.10.0",
"openpyxl>=3.1.5",
"plotly>=6.5.1",
"pydata-sphinx-theme>=0.16.1",
"pytest>=9.0.2",
"sphinx>=8.1.3",
"sphinx-copybutton>=0.5.2",
"sphinx-design>=0.6.1",
"sphinx-favicon>=1.0.1",
"sphinx-tabs>=3.4.7",
"towncrier>=25.8.0",
]
test = [
"cerberus>=1.3.8",
"coverage[toml]>=7.13.1",
"networkx>=3.4.2",
"openpyxl>=3.1.5",
"pytest>=9.0.2",
"python-dotenv>=1.2.1",
"pyyaml>=6.0.3",
"scikit-learn>=1.7.2",
]
[project.scripts]
gamspy = "gamspy_cli.cli:main"
[tool.mypy]
warn_unused_configs = true
follow_imports = "skip"
follow_imports_for_stubs = true
disable_error_code = ["misc", "import-untyped"]
[tool.setuptools.packages.find]
where = ["src"]
[tool.setuptools.package-data]
"gamspy" = ["py.typed"]
[tool.towncrier]
package = "gamspy"
package_dir = "src"
filename = "CHANGELOG.rst"
directory = "changelog/"
title_format = "GAMSPy {version} ({project_date})"
template = "changelog/_template.rst"
# NOTE: we want to declare extra non-default types for clarity and flexibility.
[[tool.towncrier.type]]
# New behaviors, public APIs etc.
directory = "feature"
name = "New features"
showcontent = true
[[tool.towncrier.type]]
# New behaviors in existing features.
directory = "improvement"
name = "Improvements in existing functionality"
showcontent = true
[[tool.towncrier.type]]
# Something we deemed an improper undesired behavior that got corrected.
directory = "bugfix"
name = "Bug fixes"
showcontent = true
[[tool.towncrier.type]]
# Notable updates to the documentation.
directory = "doc"
name = "Improved documentation"
showcontent = true
[[tool.towncrier.type]]
# Declarations of future API removals and breaking changes in behavior.
directory = "deprecation"
name = "Deprecations"
showcontent = true
[[tool.towncrier.type]]
# Updates regarding dependencies.
directory = "dependency"
name = "Dependencies"
showcontent = true
[[tool.towncrier.type]]
# ci/cd related changes.
directory = "cicd"
name = "CI/CD changes"
showcontent = true
[[tool.towncrier.type]]
# Changes that are hard to assign to any of the above categories.
directory = "misc"
name = "Miscellaneous internal changes"
showcontent = true
[tool.coverage.run]
omit = ["*/gamspy_cli/*.py", "__main__.py", "*__init__.py", "*engine.py", "*neos.py"]
[tool.coverage.report]
exclude_also = ["pragma: no cover", "if TYPE_CHECKING:", "if typing.TYPE_CHECKING:", "def __repr__", "def __del__", "@property"]
[tool.ruff]
# Exclude a variety of commonly ignored directories.
exclude = [
".bzr",
".direnv",
".eggs",
".git",
".git-rewrite",
".hg",
".ipynb_checkpoints",
".mypy_cache",
".nox",
".pants.d",
".pyenv",
".pytest_cache",
".pytype",
".ruff_cache",
".svn",
".tox",
".venv",
".vscode",
"__pypackages__",
"_build",
"docs",
"buck-out",
"build",
"dist",
"node_modules",
"site-packages",
"venv",
]
# Same as black.
line-length = 88
indent-width = 4
# Assume Python 3.10
target-version = "py310"
[tool.ruff.lint]
select = [
"E", # pycodestyle error
"W", # pycodestyle warning
"F", # Pyflakes
"UP", # pyupgrade
"B", # flake8-bugbear
"SIM", # flake8-simplify
"I", # isort
"PIE", # flake8-pie
"PLR1714", # Consider merging multiple comparisons
"RUF", # Ruff-specific rules
"TC", # flake8-type-checking
"C4", # flake8-comprehensions
"PLC0206", # dict-index-missing-items
"PLC0207", # missing-maxsplit-arg
"PLC0208", # iteration-over-set
"PLE", # Pylint error rules
]
ignore = [
"E501", # line-too-long
"E741", # ambiguous-variable-name
"E743", # ambiguous-function-name
"SIM105", # suppressible-exception
"SIM117", # multiple-with-statements
"RUF005", # collection-literal-concatenation
"RUF022" # unsorted-dunder-all
]
# Allow fix for all enabled rules (when `--fix`) is provided.
fixable = ["ALL"]
unfixable = []
# Allow unused variables when underscore-prefixed.
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
[tool.ruff.format]
# Like Black, use double quotes for strings.
quote-style = "double"
# Like Black, indent with spaces, rather than tabs.
indent-style = "space"
# Like Black, respect magic trailing commas.
skip-magic-trailing-comma = false
# Like Black, automatically detect the appropriate line ending.
line-ending = "auto"
[tool.pytest.ini_options]
markers = [
"unit: unit tests",
"integration: integration tests",
"cli: cli tests",
"doc: doctests",
"engine: engine tests",
"neos: neos tests",
"model_library: run all model library",
"requires_license: tests that require license",
]