-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
102 lines (89 loc) · 2.87 KB
/
pyproject.toml
File metadata and controls
102 lines (89 loc) · 2.87 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
[build-system]
requires = ["setuptools>=80.9.0", "wheel"]
build-backend = "setuptools.build_meta"
[project]
name = "flowzero"
version = "0.1.0"
description = "AlphaZero-style RL agent for Flow Free"
authors = [{ name = "Hershraj Niranjani", email = "hershraj@berkeley.edu" }]
readme = "README.md"
license = { file = "LICENSE" }
requires-python = ">=3.12.2,<3.13"
dependencies = [
"cloudpickle==3.1.1",
"colorama==0.4.6",
"Farama-Notifications==0.0.4",
"filelock==3.18.0",
"fsspec==2025.5.1",
"gymnasium==1.2.0",
"Jinja2==3.1.6",
"MarkupSafe==3.0.2",
"mpmath==1.3.0",
"networkx==3.5",
"numpy==2.3.1",
"packaging==25.0",
"Pygments==2.19.2",
"PyYAML==6.0.2",
"sympy==1.14.0",
"torch==2.7.1",
"tqdm==4.67.1",
"typing_extensions==4.14.1",
]
# --- Extra groups ---
[project.optional-dependencies]
dev = [
# testing / linting
"pytest==8.4.1",
"ruff==0.12.2",
"pluggy==1.6.0",
"iniconfig==2.1.0",
]
# --- Tool configs (optional but handy) ---
[tool.pytest.ini_options]
addopts = "-q"
[tool.ruff]
line-length = 100
src = ["flowzero_src", "tests"]
show-fixes = true
fix = true
unsafe-fixes = true
extend-select = [
"I", # isort — import order
"B", # bugbear — common bugs & anti-patterns
"UP", # pyupgrade — modernises syntax
"N", # pep8-naming — function & class naming
"D", # pydocstyle — doc-string formatting
"ANN", # flake8-annotations — require type hints
"S", # bandit — basic security lint checks
"C4", # flake8-comprehensions
"ARG", # flake8-unused-arguments
"TCH", # flake8-type-checking — keep heavy imports inside if TYPE_CHECKING
"SIM", # flake8-simplify — simplify if/else, etc.
"PERF", # perflint — micro-optimisation gotchas
"RUF", # Ruff-specific rules
]
# ------------------------------------------------------------------------------
# Ignores & tweaks
# ------------------------------------------------------------------------------
extend-ignore = [
"D203", # one-blank-line before class doc-string (conflicts with D211)
"D212", # multi-line summary should start on first line
"D401", # first word should be imperative (annoying for ML “Returns”)
"ANN101", # don’t require type hints on `self`
"ANN102", # don’t require type hints on `cls`
"S101"
]
[tool.ruff.isort]
# Keep standard lib, third-party, and first-party groups with a blank line.
combine-as-imports = true
known-first-party = ["flowzero_src"]
[tool.ruff.pydocstyle]
convention = "google"
[tool.ruff.flake8-annotations]
# Treat missing *return* annotation as an error.
mypy-init-return = true
suppress-none-returning = false
suppress-dummy-args = true # allow `_` without type
[tool.ruff.per-file-ignores]
"tests/**/*.py" = ["ANN201", "ANN202", "ANN204", "ANN205", "D103", "S101"]
"tests/*.py" = ["ANN201", "ANN202", "ANN204", "ANN205", "D103", "S101"]