Skip to content

Commit 45e4e14

Browse files
committed
Make regenerating requirements unnecessary
Point back at pyproject.toml this might avoid a pre-commit and avoid out of sync things.
1 parent 58530b9 commit 45e4e14

File tree

6 files changed

+5
-30
lines changed

6 files changed

+5
-30
lines changed

.pre-commit-config.yaml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,6 @@ repos:
3131
args: ["--fix", "--show-fixes", "--exit-non-zero-on-fix"]
3232
- id: ruff-format
3333

34-
- repo: local
35-
hooks:
36-
- id: generate_requirements.py
37-
name: generate_requirements.py
38-
language: system
39-
entry: python tools/generate_requirements.py
40-
files: "pyproject.toml|requirements/.*\\.txt|tools/generate_requirements.py"
41-
4234
ci:
4335
autofix_prs: false
4436
autofix_commit_msg: |

requirements/default.txt

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1 @@
1-
# Generated via tools/generate_requirements.py and pre-commit hook.
2-
# Do not edit this file; modify pyproject.toml instead.
3-
sphinx>=6
4-
tabulate>=0.8.10
5-
tomli>=1.1.0;python_version<'3.11'
1+
.[default]

requirements/developer.txt

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1 @@
1-
# Generated via tools/generate_requirements.py and pre-commit hook.
2-
# Do not edit this file; modify pyproject.toml instead.
3-
pre-commit>=3.3
4-
tomli; python_version < '3.11'
1+
.[developer]

requirements/doc.txt

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1 @@
1-
# Generated via tools/generate_requirements.py and pre-commit hook.
2-
# Do not edit this file; modify pyproject.toml instead.
3-
numpy>=1.22
4-
matplotlib>=3.5
5-
pydata-sphinx-theme>=0.13.3
6-
sphinx>=7
7-
intersphinx_registry
1+
.[doc]

requirements/test.txt

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1 @@
1-
# Generated via tools/generate_requirements.py and pre-commit hook.
2-
# Do not edit this file; modify pyproject.toml instead.
3-
pytest
4-
pytest-cov
5-
matplotlib
1+
.[test]

tools/generate_requirements.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424
def generate_requirement_file(name: str, req_list: list[str]) -> None:
2525
req_fname = repo_dir / "requirements" / f"{name}.txt"
26-
req_fname.write_text("\n".join(header + req_list) + "\n")
26+
req_fname.write_text(f".[{name}]\n")
2727

2828

2929
def main() -> None:

0 commit comments

Comments
 (0)