Skip to content

Switch to dependency groups #626

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
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
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
python3 -m venv venv
source venv/bin/activate
python -m pip install --upgrade pip wheel setuptools
python -m pip install --upgrade -r requirements/doc.txt
python -m pip install --upgrade --group doc
python -m pip list
- save_cache:
key: pip-cache
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
- name: Install
run: |
python -m pip install .[test,doc]
python -m pip install . --group test --group doc
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

May be worth separating this in two steps, to show that one deals with installing dependencies, the other with the library. No big deal, though.

pip list
- name: Run test suite
Expand Down Expand Up @@ -95,7 +95,7 @@ jobs:
- name: Install
run: |
python -m pip install .[test,doc]
python -m pip install . --group test --group doc
pip list
- name: Run test suite
Expand Down
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
15 changes: 4 additions & 11 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,15 @@ build:
# nodejs: "19"
# rust: "1.64"
# golang: "1.19"
jobs:
install:
- python -m pip install --upgrade pip wheel setuptools
- python -m pip install . --group doc

# Build documentation in the "doc/" directory with Sphinx
sphinx:
configuration: doc/conf.py

# Optionally build your docs in additional formats such as PDF and ePub
# formats:
# - pdf
# - epub

# Optional but recommended, declare the Python requirements required
# to build your documentation
# See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
python:
install:
- method: pip
path: .
extra_requirements:
- doc
1 change: 0 additions & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ include MANIFEST.in
include *.txt
include *.rst
recursive-include doc *
recursive-include requirements *
recursive-include numpydoc *

# Exclude what we don't want to include
Expand Down
6 changes: 4 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,12 @@ file = 'LICENSE.txt'
Homepage = 'https://numpydoc.readthedocs.io'
Source = 'https://github.com/numpy/numpydoc/'

[project.optional-dependencies]
developer = [
[dependency-groups]
dev = [
'pre-commit>=3.3',
"tomli; python_version < '3.11'",
{ include-group = "doc" },
{ include-group = "test" }
]
doc = [
'numpy>=1.22',
Expand Down
4 changes: 0 additions & 4 deletions requirements/default.txt

This file was deleted.

4 changes: 0 additions & 4 deletions requirements/developer.txt

This file was deleted.

7 changes: 0 additions & 7 deletions requirements/doc.txt

This file was deleted.

5 changes: 0 additions & 5 deletions requirements/test.txt

This file was deleted.

39 changes: 0 additions & 39 deletions tools/generate_requirements.py

This file was deleted.

Loading