-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathpyproject.toml
More file actions
130 lines (115 loc) · 3.42 KB
/
Copy pathpyproject.toml
File metadata and controls
130 lines (115 loc) · 3.42 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
# https://peps.python.org/pep-0517/
[build-system]
requires = ["hatchling", "hatch-vcs"]
build-backend = "hatchling.build"
# https://hatch.pypa.io/latest/config/metadata/
[tool.hatch.version]
source = "vcs"
# https://peps.python.org/pep-0621/
[project]
name = "ilpy"
description = "Unified API for ILP solvers."
readme = "README.md"
requires-python = ">=3.9"
license = { text = "MIT" }
authors = [
{ email = "funkej@janelia.hhmi.org", name = "Jan Funke" },
{ email = "talley.lambert@gmail.com", name = "Talley Lambert" },
]
dynamic = ["version"]
classifiers = [
"Development Status :: 3 - Alpha",
"License :: OSI Approved :: BSD License",
"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 :: Python :: 3.14",
"Typing :: Typed",
]
dependencies = [
# pyscipopt is not technically required if gurobipy is present...
# but it's nice to have something always work, and pyscipopt
# only depends on numpy, and builds wheels for all platforms we support
"pyscipopt",
]
# extras
# https://peps.python.org/pep-0621/#dependencies-optional-dependencies
[project.optional-dependencies]
gurobi = ["gurobipy"]
scip = ["pyscipopt"]
cuopt = [
"cuopt-cu12; python_version >= '3.10'",
"numpy; python_version >= '3.10'",
"scipy; python_version >= '3.10'",
]
[dependency-groups]
test = ["ilpy[gurobi, scip]", "pytest", "pytest-cov", "numpy"]
dev = [{ "include-group" = "test" }, "ipython", "mypy", "prek", "ruff"]
docs = ["numpy", "zensical", "mkdocstrings-python"]
[project.urls]
homepage = "https://github.com/funkelab/ilpy"
repository = "https://github.com/funkelab/ilpy"
# uv: route `cuopt-cu12` to NVIDIA's index so `uv sync --extra cuopt`
# resolves without needing `--extra-index-url` on the command line.
[[tool.uv.index]]
name = "nvidia"
url = "https://pypi.nvidia.com"
[tool.uv.sources]
cuopt-cu12 = { index = "nvidia" }
# https://docs.astral.sh/ruff
[tool.ruff]
target-version = "py39"
src = ["src"]
# https://docs.astral.sh/ruff/rules
[tool.ruff.lint]
pydocstyle = { convention = "numpy" }
select = [
"E", # style errors
"W", # style warnings
"F", # flakes
"D417", # Missing argument descriptions in Docstrings
"I", # isort
"UP", # pyupgrade
"C4", # flake8-comprehensions
"B", # flake8-bugbear
"A001", # flake8-builtins
"RUF", # ruff-specific rules
"TC", # flake8-type-checking
"TID", # flake8-tidy-imports
]
[tool.ruff.lint.per-file-ignores]
"tests/*.py" = ["D", "S"]
# https://docs.astral.sh/ruff/formatter/
[tool.ruff.format]
docstring-code-format = true
skip-magic-trailing-comma = false # default is false
# https://mypy.readthedocs.io/en/stable/config_file.html
[tool.mypy]
files = "src/**/"
strict = true
disallow_any_generics = false
disallow_subclassing_any = false
show_error_codes = true
pretty = true
# https://docs.pytest.org/
[tool.pytest.ini_options]
minversion = "7.0"
testpaths = ["tests"]
filterwarnings = ["error"]
# https://coverage.readthedocs.io/
[tool.coverage.report]
show_missing = true
exclude_lines = [
"pragma: no cover",
"if TYPE_CHECKING:",
"@overload",
"except ImportError",
"\\.\\.\\.",
"raise NotImplementedError()",
"pass",
]
[tool.coverage.run]
source = ["ilpy"]