-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
93 lines (74 loc) · 2.13 KB
/
pyproject.toml
File metadata and controls
93 lines (74 loc) · 2.13 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
[project]
name = "tensor-network-code"
version = "0.2.0" # finished all from Lecture 1.1 to 5.2
description = "Tensor Network Code"
readme = "README.md"
requires-python = ">=3.12"
dependencies = [
"einops",
"numpy>=2.2.3",
"scikit-learn>=1.6.1",
"scipy>=1.15.2",
]
[project.optional-dependencies]
mlx = ["mlx>=0.28.0"]
[dependency-groups]
torch = ["torch>=2.9.0", "torchmetrics>=1.8.0", "torchvision>=0.24.0"]
dev = [
"dowhen>=0.1.0",
"nbdev>=2.3.37",
"poethepoet>=0.33.1",
"pre-commit>=4.2.0",
"pytest>=8.3.5",
"ruff>=0.11.5",
"safetensors>=0.5.3",
]
notebook = [
"matplotlib>=3.10.1",
"ipywidgets>=8.1.5",
"jupyterlab>=4.3.6",
"tqdm>=4.67.1",
]
ref-code-deps = ["opencv-python>=4.11.0.86"]
mlx = [
"mlx>=0.28.0",
"mlxx>=0.3.2",
]
[tool.uv.sources]
einops = { git = "https://github.com/ifsheldon/einops", branch = "mlx-backend" }
torch = [
{ index = "torch-cpu", marker = "platform_system == 'Darwin'" },
{ index = "torch-gpu", marker = "platform_system == 'Linux'" },
]
[[tool.uv.index]]
name = "torch-cpu"
url = "https://download.pytorch.org/whl/cpu"
explicit = true
[[tool.uv.index]]
name = "torch-gpu"
url = "https://download.pytorch.org/whl/cu130"
explicit = true
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.build.targets.wheel]
only-include = ["tensor_network"]
[tool.hatch.build.targets.sdist]
only-include = ["tensor_network"]
[tool.uv]
# include dev, notebook, and ref-code-deps in the default groups for running the notebooks
default-groups = ["dev", "notebook", "ref-code-deps", "mlx", "torch"]
[tool.ruff]
extend-exclude = ["tensor_network", "setup.py"]
line-length = 100
[tool.ruff.lint]
ignore = ["E402", "E741", "F401", "F811", "F402"]
[tool.poe.tasks]
format = "uv run ruff format"
sync = "uv run nbdev_export"
check_tensor_network = "uv run ruff check tensor_network"
check = "uv run ruff check --exclude reference_code"
check_all = ["check", "check_tensor_network"]
precommit = ["format", "sync", "check_all"]
lab = "uv run jupyter lab"
count = "uvx pygount tensor_network --generated=\"(?i).*AUTOGENERATED\" --format summary"