-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathpyproject.toml
More file actions
116 lines (104 loc) · 4.24 KB
/
pyproject.toml
File metadata and controls
116 lines (104 loc) · 4.24 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
[build-system]
requires = [
"setuptools>=61.0",
"setuptools-scm>=8", # Sets the package version based on git tags
]
build-backend = "setuptools.build_meta"
[project]
name = "pyoframe"
authors = [{ name = "Bravos Power", email = "dev@bravospower.com" }]
description = "Blazing fast linear program interface"
readme = "README.md"
requires-python = ">=3.9"
dynamic = ["version"]
license = "MIT"
classifiers = [
"Programming Language :: Python :: 3",
"Operating System :: OS Independent",
"Development Status :: 3 - Alpha",
"Natural Language :: English",
]
dependencies = [
"polars~=1.0",
"pyarrow",
"pandas<3",
"pyoptinterface==0.5.1", # pinned to avoid broken versions
]
[project.optional-dependencies]
highs = ["highsbox<=1.13.1"]
ipopt = [
"pyoptinterface[nlp]",
"llvmlite<=0.46.0", # Capped to prevent breaking changes in pyoptinterface. See https://github.com/metab0t/PyOptInterface/issues/56
]
dev = [
"ruff==0.12.11", # code formatter
"polars>=1.32.3", # constrain since previous versions have changes that break testing
"pytest==8.4.1",
"pytest-cov==6.2.1",
"sybil[pytest]==9.3.0", # allows running tests on documentation code
"pre-commit==4.3.0", # pre-commit hooks
"gurobipy==12.0.3", # used for testing against the gurobi library
"coverage==7.10.6", # code coverage
"ipykernel==6.30.1", # add support for jupyter notebooks
# Automatically install as many solvers as possible
# (we don't pin since we want to test against the latest)
"highsbox<=1.13.1",
"pyoptinterface[nlp]",
"numpy", # for testing with np.nan, don't pin so that two versions of Python are possible
]
# We split out docs because mkdocs-awesome-nav is not compatible with Python 3.9
docs = [
"mkdocs-material~=9.6.18",
"mkdocstrings[python]~=0.30.0", # used to generate API documentation
"mkdocs-git-revision-date-localized-plugin~=1.4.7", # displays the update date in documentation
"mkdocs-git-committers-plugin-2~=2.5.0", # displays who contributed in documentation
"mkdocs-gen-files~=0.5.0", # allows running custom scripts during doc generation
"mkdocs-section-index~=0.3.10", # allows sections to be clickable pages
"mkdocs-awesome-nav~=3.1.2", # allows use of .nav.yml files
"doccmd==2025.4.8", # allows running ruff formatter on documentation code
"mkdocs-table-reader-plugin~=3.1.0", # allows displaying .csv files in documentation
"markdown-katex==202406.1035", # allows rendering LaTeX math in documentation
"mike==2.1.3", # allows versioned documentation
"ruff==0.12.11", # needed by mkdocstrings_handlers for formatting signatures
]
[tool.ruff.lint]
select = [
"E4",
"E7",
"E9",
"F",
"I",
"W292",
"W291",
"D",
"UP", # Ensures consistency with Union vs | for type hinting (and similar)
"TC", # Forces type imports into a TYPE_CHECKING block
]
ignore = [
"D105", # magic method docstring
"D107", # __init__ docstring
]
[tool.ruff.lint.per-file-ignores]
"{docs,tests,scripts,benchmarks}/**" = ["D101", "D102", "D103", "D104"]
"conftest.py" = ["D"]
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.ruff.format]
docstring-code-format = true
[tool.coverage.run]
include = ["src/pyoframe/*"]
[tool.pytest.ini_options]
pythonpath = "src" # https://stackoverflow.com/a/50156706/5864903
addopts = "--doctest-modules --ignore=scripts --ignore=benchmarks"
filterwarnings = ["error"] # treat all warnings as errors
doctest_optionflags = "NORMALIZE_WHITESPACE"
[tool.setuptools_scm]
version_file = "src/pyoframe/_version.py"
local_scheme = "no-local-version"
[tool.setuptools.package-dir]
pyoframe = "src/pyoframe"
[project.urls]
Homepage = "https://bravos-power.github.io/pyoframe/latest"
documentation = "https://bravos-power.github.io/pyoframe/latest"
repository = "https://github.com/Bravos-Power/pyoframe/"
Issues = "https://github.com/Bravos-Power/pyoframe/issues"