-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpyproject.toml
More file actions
117 lines (100 loc) · 2.91 KB
/
pyproject.toml
File metadata and controls
117 lines (100 loc) · 2.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
[build-system]
requires = ["setuptools>=64", "setuptools_scm[toml]>=8"]
build-backend = "setuptools.build_meta"
[project]
name = "dpdt"
dynamic = ["version"]
authors = [
{ name="Hector Kohler", email="hector.kohler@polytechnique.edu" },
]
description = "Dynamic Programming Decision Trees"
readme = "README.md"
requires-python = ">=3.10"
dependencies = [
"scikit-learn>=1.6",
]
classifiers = [
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"License :: OSI Approved :: BSD License",
"Operating System :: POSIX",
"Operating System :: Unix",
"Operating System :: MacOS",
"Operating System :: Microsoft :: Windows",
]
[project.urls]
Homepage = "https://github.com/scikit-learn-contrib/project-template"
Issues = "https://github.com/scikit-learn-contrib/project-template/issues"
[tool.setuptools_scm]
version_file = "dpdt/_version.py"
[tool.pixi.workspace]
channels = ["conda-forge"]
platforms = ["win-64", "linux-64", "osx-64", "osx-arm64"]
[tool.pixi.dependencies]
python = ">=3.10"
scikit-learn = ">=1.6"
[tool.pixi.pypi-dependencies]
dpdt = { path=".", editable=true }
[tool.pixi.feature.lint.dependencies]
# The version below should be aligned with the one of `.pre-commit-config.yaml`
black = "23.3.0"
pre-commit = "3.7.1"
ruff = "0.4.2"
[tool.pixi.feature.lint.tasks]
black = { cmd = "black --check --diff dpdt && black --check --diff examples" }
ruff = { cmd = "ruff check --fix --output-format=full dpdt && ruff check --fix --output-format=full examples" }
lint = { depends-on = ["black", "ruff"]}
[tool.pixi.feature.test.dependencies]
pytest = "*"
pytest-cov = "*"
[tool.pixi.feature.test.target.osx.dependencies]
libgfortran = "*"
[tool.pixi.feature.test.tasks]
test = { cmd = "pytest -vsl --cov=dpdt --cov-report=xml dpdt" }
[tool.pixi.environments]
lint = ["lint"]
test = ["test"]
dev = ["lint", "test"]
[tool.black]
line-length = 88
target_version = ['py310']
preview = true
exclude = '''
/(
\.eggs # exclude a few common directories in the
| \.git # root of the project
| \.vscode
)/
'''
force-exclude = "dpdt/_version.py"
[tool.ruff]
# max line length for black
line-length = 88
target-version = "py310"
exclude=[
".git",
"__pycache__",
"dist",
"build",
"dpdt/_version.py",
]
[tool.ruff.lint]
# all rules can be found here: https://beta.ruff.rs/docs/rules/
select = ["E", "F", "W", "I"]
ignore=[
# space before : (needed for how black formats slicing)
"E203",
# do not assign a lambda expression, use a def
"E731",
# do not use variables named 'l', 'O', or 'I'
"E741",
]
[tool.ruff.lint.per-file-ignores]
# It's fine not to put the import at the top of the file in the examples
# folder.
"examples/*"=["E402"]
[tool.pytest.ini_options]
addopts = "--doctest-modules --color=yes"
doctest_optionflags = "NORMALIZE_WHITESPACE"