Skip to content

Commit

Permalink
sagemathgh-37446: Add dependency groups to pyproject.toml
Browse files Browse the repository at this point in the history
    
<!-- ^^^^^
Please provide a concise, informative and self-explanatory title.
Don't put issue numbers in there, do this in the PR body below.
For example, instead of "Fixes sagemath#1234" use "Introduce new method to
calculate 1+1"
-->
<!-- Describe your changes here in detail -->

Following [PEP 735](https://peps.python.org/pep-0735/#canonical-names-
of-dependencies-and-dev-el-split-packages), add a few groups of
dependencies that one usually needs while developing sage (e.g. for
tests or docs).

This info will then be used to generate the conda lock files and once
support for PEP 735 is more widespread other tools will be able to use
the metadata as well. Eg, once pypa/pip#12963
is implemented one can install all test dependencies with `pip install
--groups test`.

<!-- Why is this change required? What problem does it solve? -->
<!-- If this PR resolves an open issue, please link to it here. For
example "Fixes sagemath#12345". -->
<!-- If your change requires a documentation PR, please link it
appropriately. -->

### 📝 Checklist

<!-- Put an `x` in all the boxes that apply. -->
<!-- If your change requires a documentation PR, please link it
appropriately -->
<!-- If you're unsure about any of these, don't hesitate to ask. We're
here to help! -->
<!-- Feel free to remove irrelevant items. -->

- [ ] The title is concise, informative, and self-explanatory.
- [ ] The description explains in detail what this PR is about.
- [ ] I have linked a relevant issue or discussion.
- [ ] I have created tests covering the changes.
- [ ] I have updated the documentation accordingly.

### ⌛ Dependencies

<!-- List all open PRs that this PR logically depends on
- sagemath#12345: short description why this is a dependency
- sagemath#34567: ...
-->


<!-- If you're unsure about any of these, don't hesitate to ask. We're
here to help! -->
    
URL: sagemath#37446
Reported by: Tobias Diez
Reviewer(s): Dima Pasechnik
  • Loading branch information
Release Manager committed Dec 8, 2024
2 parents 8a972c4 + d6e03cf commit 23be4e3
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@ platforms = [
'osx-64', 'linux-64', 'linux-aarch64', 'osx-arm64'
]

[external]
# External dependencies in the format proposed by https://peps.python.org/pep-0725
[external]
build-requires = [
"virtual:compiler/c",
"virtual:compiler/cpp",
Expand Down Expand Up @@ -152,4 +152,23 @@ dependencies = [
"pkg:generic/tachyon",
"pkg:generic/sagemath-polytopes-db",
"pkg:generic/sagemath-elliptic-curves",
"pkg:generic/sagemath-graphs",
]

[dependency-groups]
test = [
"pytest",
"pytest-xdist",
"coverage",
]
docs = [
"sphinx",
"sphinx-inline-tabs",
"furo",
]
lint = [
"relint",
"ruff",
"pycodestyle",
"flake8-rst-docstrings",
]

0 comments on commit 23be4e3

Please sign in to comment.