Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make regenerating requirements unnecessary #564

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,6 @@ repos:
args: ["--fix", "--show-fixes", "--exit-non-zero-on-fix"]
- id: ruff-format

- repo: local
hooks:
- id: generate_requirements.py
name: generate_requirements.py
language: system
entry: python tools/generate_requirements.py
files: "pyproject.toml|requirements/.*\\.txt|tools/generate_requirements.py"

ci:
autofix_prs: false
autofix_commit_msg: |
Expand Down
6 changes: 1 addition & 5 deletions requirements/default.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1 @@
# Generated via tools/generate_requirements.py and pre-commit hook.
# Do not edit this file; modify pyproject.toml instead.
sphinx>=6
tabulate>=0.8.10
tomli>=1.1.0;python_version<'3.11'
.[default]
5 changes: 1 addition & 4 deletions requirements/developer.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
# Generated via tools/generate_requirements.py and pre-commit hook.
# Do not edit this file; modify pyproject.toml instead.
pre-commit>=3.3
tomli; python_version < '3.11'
.[developer]
8 changes: 1 addition & 7 deletions requirements/doc.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1 @@
# Generated via tools/generate_requirements.py and pre-commit hook.
# Do not edit this file; modify pyproject.toml instead.
numpy>=1.22
matplotlib>=3.5
pydata-sphinx-theme>=0.13.3
sphinx>=7
intersphinx_registry
.[doc]
6 changes: 1 addition & 5 deletions requirements/test.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1 @@
# Generated via tools/generate_requirements.py and pre-commit hook.
# Do not edit this file; modify pyproject.toml instead.
pytest
pytest-cov
matplotlib
.[test]
2 changes: 1 addition & 1 deletion tools/generate_requirements.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

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


def main() -> None:
Expand Down
Loading