-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpyproject.toml
199 lines (167 loc) · 5.53 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
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
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
# ------------------------------------------------------------------
# | Project |
# ------------------------------------------------------------------
[project]
name = "pyorlib"
dynamic = ["version"]
description = "A powerful Python library for operations research. Define, solve, and interact with mathematical models in a standardized manner across different optimization packages."
requires-python = ">=3.10"
readme = "README.md"
license = "MIT"
authors = [
{ name = "Isaac Da Pena", email = "[email protected]" },
{ name = "Manuel Da Pena", email = "[email protected]" },
]
keywords = ["optimization", "optimization-modeling", "operation-research", "python"]
classifiers = [
"Intended Audience :: Education",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Topic :: Scientific/Engineering :: Mathematics",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Software Development :: Libraries",
"Topic :: Software Development",
"Typing :: Typed",
]
# ------------------------------------------------------------------
# | Project URLs |
# ------------------------------------------------------------------
[project.urls]
Homepage = "https://github.com/dapensoft/pyorlib"
Documentation = "https://dapensoft.github.io/pyorlib/"
Repository = "https://github.com/dapensoft/pyorlib"
Changelog = "https://dapensoft.github.io/pyorlib/release-notes"
[project.optional-dependencies]
cplex = ["cplex>=20.1.0.4", "docplex>=2.24.231"]
gurobi = ["gurobipy>=10.0.0"]
ortools = ["ortools>=9.6.2534"]
pulp = ["PuLP>=2.7.0"]
all = [
"pyorlib[cplex]",
"pyorlib[gurobi]",
"pyorlib[ortools]",
"pyorlib[pulp]",
]
# --------------------
# | Docs dependencies
# ----------
docs = [
"mkdocs-material>=9.5.17",
"mkdocstrings[python]>=0.24.0",
"mkdocs-git-revision-date-localized-plugin>=1.2.1",
"mkdocs-git-committers-plugin-2>=2.3.0",
"mkdocs-material[imaging]",
]
# --------------------
# | Tests dependencies
# ----------
tests = [
"pyorlib[all]",
"mypy>=1.7.1",
"black>=23.12.0",
"pytest>=7.4.0",
"coverage[toml]>=7.3.3",
]
# --------------------
# | Dev dependencies
# ----------
dev = [
"pyorlib[docs]",
"pyorlib[tests]",
"hatch>=1.8.1",
]
# ------------------------------------------------------------------
# | Project Version |
# ------------------------------------------------------------------
[tool.hatch.version]
path = "src/pyorlib/__init__.py"
# ------------------------------------------------------------------
# | Building Target |
# ------------------------------------------------------------------
[tool.hatch.build.targets.sdist]
include = [
"/src",
"/tests",
"/.gitignore",
"/pyproject.toml",
"/CITATION.cff",
"/README.md",
"/LICENSE",
]
[tool.hatch.build.targets.wheel]
packages = ["src/pyorlib"]
# ------------------------------------------------------------------
# | mypy configuration |
# ------------------------------------------------------------------
[tool.mypy]
files = ["src/pyorlib"]
namespace_packages = false
show_error_codes = true
warn_no_return = true
warn_unreachable = true
warn_unused_ignores = true
implicit_reexport = true
ignore_missing_imports = true
strict = true
# ------------------------------------------------------------------
# | Hatch tests environment |
# ------------------------------------------------------------------
[tool.hatch.envs.tests]
dependencies = ["pyorlib[tests]"]
[tool.hatch.envs.tests.scripts]
test = "pytest -v {args:tests}"
style = "black --check --diff {args:.}"
typing = "mypy"
cov = [
"coverage run -m pytest -v {args:tests}",
"- coverage combine",
"coverage report",
"coverage xml",
]
all = [
"style",
"typing",
"cov",
]
[[tool.hatch.envs.tests.matrix]]
python = ["3.10", "3.11"]
# ------------------------------------------------------------------
# | Hatch docs environment |
# ------------------------------------------------------------------
[tool.hatch.envs.docs]
dependencies = ["pyorlib[docs]"]
[tool.hatch.envs.docs.scripts]
build = "mkdocs build --clean --strict"
serve = "mkdocs serve --dev-addr localhost:8000"
# ------------------------------------------------------------------
# | Coverage |
# ------------------------------------------------------------------
[tool.coverage.run]
source_pkgs = ["pyorlib", "tests"]
parallel = true
omit = []
[tool.coverage.paths]
pyorlib = ["pyorlib"]
tests = ["tests"]
[tool.coverage.report]
exclude_lines = [
"no cov",
"if __name__ == .__main__.:",
"if TYPE_CHECKING:",
'@(abc\.)?abstractmethod',
]
# ------------------------------------------------------------------
# | Formatting |
# ------------------------------------------------------------------
[tool.black]
line-length = 120
target-version = ["py310"]