-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
139 lines (133 loc) · 4.38 KB
/
pyproject.toml
File metadata and controls
139 lines (133 loc) · 4.38 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
[build-system]
build-backend = "hatchling.build"
requires = [ "hatchling" ]
[project]
name = "dev-pylcm"
version = "0.1.0"
description = "Pixi workspace for pylcm, dags, and lcm-paper."
requires-python = ">=3.14"
classifiers = [
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.14",
]
[tool.ruff]
fix = true
unsafe-fixes = false
[tool.ruff.lint]
select = [ "ALL" ]
extend-ignore = [
"COM812", # Conflicts with ruff-format
"D", # Docstrings (workspace-level conftest only)
"EM101", # Exception must not use a string literal
"EM102", # Exception must not use an f-string literal
"FIX002", # Line contains TODO
"ISC001", # Conflicts with ruff-format
"PLR0913", # Too many arguments in function definition
"TC001", # Move application import into a type-checking block
"TC002", # Move third-party import into a type-checking block
"TC003", # Move standard library import into a type-checking block
"TRY003", # Long messages outside exception class
]
per-file-ignores."conftest.py" = [
"ANN", # Annotations (conftest fixtures)
"INP001", # Implicit namespace package
]
pydocstyle.convention = "google"
[tool.pyproject-fmt]
column_width = 88
max_supported_python = "3.14"
table_format = "long"
collapse_tables = [ "tool.hatch", "tool.pytest", "tool.pytask", "tool.ty" ]
expand_tables = [
"tool.pixi.dependencies",
"tool.pixi.environments",
"tool.pixi.feature.test.tasks",
"tool.pixi.feature.ty.tasks",
"tool.pixi.pypi-dependencies",
"tool.pixi.tasks",
"tool.pixi.workspace",
]
[tool.pytest]
ini_options.addopts = [ "--pdbcls=pdbp:Pdb", "--import-mode=importlib" ]
ini_options.filterwarnings = [
"ignore:.*XMLParser*:DeprecationWarning",
"ignore:.*'tree.iter()'*:PendingDeprecationWarning",
"ignore:.*Sorting*:FutureWarning",
"ignore:The TerminalReporter.writer attribute is",
"ignore:Repeated execution of the test suite",
"ignore:Using or importing the ABCs from 'collections'",
"ignore:Explicitly requested dtype .*64 requested in zeros_like",
]
ini_options.markers = [
"wip: Tests that are work-in-progress.",
"unit: Flag for unit tests which target mainly a single function.",
"integration: Flag for integration tests which may comprise of multiple unit tests.",
"end_to_end: Flag for tests that cover the whole program.",
"slow: Tests that take a long time to run and are skipped in continuous integration.",
"illustrative: Tests are designed for illustrative purposes",
]
[tool.yamlfix]
line_length = 88
none_representation = "null"
sequence_style = "block_style"
[tool.pixi.dependencies]
cloudpickle = ">=3.1.2,<4"
ipykernel = "*"
jupyterlab = "*"
memory_profiler = "*"
numpy = ">=2.4"
plotly = ">=6.5"
prek = "*"
pybaum = "*"
python = "~=3.14.0"
pytest-xdist = "*"
scipy = ">=1.16"
snakeviz = "*"
[tool.pixi.environments]
py314 = [ "test" ]
py314-cuda = [ "test", "cuda" ]
py314-jax = [ "test", "jax" ]
py314-metal = [ "test", "metal" ]
ty = [ "ty" ]
[tool.pixi.feature.cuda]
platforms = [ "linux-64" ]
system-requirements = { cuda = "13" }
[tool.pixi.feature.cuda.target.linux-64.dependencies]
cuda-nvcc = "~=13.0"
[tool.pixi.feature.cuda.target.linux-64.pypi-dependencies]
jax = { version = ">=0.8", extras = [ "cuda13" ] }
[tool.pixi.feature.jax]
platforms = [ "linux-64", "osx-arm64", "win-64" ]
[tool.pixi.feature.jax.pypi-dependencies]
jax = ">=0.8"
[tool.pixi.feature.metal]
platforms = [ "osx-arm64" ]
[tool.pixi.feature.metal.target.osx-arm64.pypi-dependencies]
jax = ">=0.8"
jax-metal = ">=0.1.1"
[tool.pixi.feature.test.dependencies]
matplotlib = "*"
pandas-stubs = "*"
pytest = "*"
pytest-cov = "*"
scipy-stubs = "*"
[tool.pixi.feature.test.tasks]
tests = { depends-on = [ "tests-dags", "tests-pylcm" ] }
tests-dags = { cmd = "pytest tests", cwd = "dags" }
tests-pylcm = { cmd = "pytest tests", cwd = "pylcm" }
[tool.pixi.feature.ty.pypi-dependencies]
ty = "*"
types-networkx = "*"
[tool.pixi.feature.ty.tasks]
ty = { depends-on = [ "ty-dags", "ty-pylcm" ] }
ty-dags = { cmd = "ty check", cwd = "dags" }
ty-pylcm = { cmd = "ty check", cwd = "pylcm" }
[tool.pixi.pypi-dependencies]
dags = { path = "dags", editable = true }
pdbp = "*"
pylcm = { path = "pylcm", editable = true }
[tool.pixi.tasks]
lint-all = { cmd = 'for d in dags pylcm lcm-paper quant-econ-book; do echo "=== $d ===" && (cd $d && prek run --all-files) || exit 1; done' }
[tool.pixi.workspace]
channels = [ "conda-forge" ]
platforms = [ "linux-64", "osx-arm64", "win-64" ]