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

Add requirements files for testing, linting, and documentation #37461

Closed
wants to merge 26 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
2e2c641
Specify all dependencies of sagelib in pyproject.toml
tobiasdiez Feb 24, 2024
2e024df
Add runtime dependencies
tobiasdiez Feb 24, 2024
7f347b2
Add requirements files for testing, linting, and documentation
tobiasdiez Feb 25, 2024
8178c18
Add update-lock.py script to compile requirements using pip-tools
tobiasdiez Feb 25, 2024
50ca3a5
Add linting dependencies to pyproject.toml
tobiasdiez Feb 25, 2024
810cf36
Merge branch 'develop' into requirements-update
tobiasdiez Feb 25, 2024
81ce482
Merge branch 'develop' into requirements-files
tobiasdiez Feb 25, 2024
6dd0151
Merge branch 'develop' into pyproject-sagelib
tobiasdiez Feb 25, 2024
2f9b2dd
Add sagemath-graphs as dependency
tobiasdiez Feb 27, 2024
f294eaa
Merge branch 'develop' into requirements-files
tobiasdiez Mar 10, 2024
46f89a6
Merge branch 'develop' into pyproject-sagelib
tobiasdiez Mar 10, 2024
13991ba
Merge branch 'develop' into requirements-update
tobiasdiez Mar 10, 2024
744da89
Merge branch 'develop' into pyproject-sagelib
tobiasdiez Apr 11, 2024
934f0fe
Merge branch 'develop' into requirements-update
tobiasdiez Apr 28, 2024
b153f9d
Merge branch 'develop' into requirements-files
tobiasdiez Apr 28, 2024
e8a5733
Merge branch 'develop' into pyproject-sagelib
tobiasdiez Apr 28, 2024
927831a
Merge branch 'develop' into requirements-update
dimpase Aug 30, 2024
49e68c6
Merge branch 'develop' into requirements-update
tobiasdiez Oct 3, 2024
a3b0318
Merge remote-tracking branch 'upstream/develop' into pr/tobiasdiez/37446
tobiasdiez Oct 28, 2024
c7beb90
readd comment
tobiasdiez Oct 28, 2024
ef83b03
Merge branch 'pr/tobiasdiez/37463' into pr/tobiasdiez/37461
tobiasdiez Oct 28, 2024
749e6c3
Merge remote-tracking branch 'upstream/develop' into pr/tobiasdiez/37461
tobiasdiez Oct 28, 2024
fd4411c
Merge branch 'pr/tobiasdiez/37446' into pr/tobiasdiez/37461
tobiasdiez Oct 28, 2024
b7da4b4
Add docs
tobiasdiez Oct 28, 2024
5ea446f
Use requirements files at more points in the ci
tobiasdiez Oct 28, 2024
ab7bb3f
Merge branch 'develop' into requirements-files
tobiasdiez Nov 29, 2024
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
6 changes: 3 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ jobs:
# The following command checks that all modules can be imported.
# The output also includes a long list of modules together with the number of tests in each module.
# This can be ignored.
./sage -python -m pip install pytest-xdist
./sage -python -m pip install -r requirements/test-requirements.txt
./sage -python -m pytest -c tox.ini -qq --doctest --collect-only || true
shell: sh .ci/docker-exec-script.sh BUILD /sage {0}

Expand Down Expand Up @@ -453,7 +453,7 @@ jobs:
rm -rf /sage/.coverage
ln -s $(pwd)/.coverage /sage/
cd /sage
./sage -python -m pip install coverage
./sage -python -m pip install -r requirements/test-requirements.txt
./sage -python -m coverage run --rcfile=src/tox.ini src/bin/sage-runtests --force-lib --long -p4 --format github --random-seed=286735480429121101562228604801325644303 ${{ matrix.tests }}
shell: sh .ci/docker-exec-script.sh BUILD . {0}

Expand Down Expand Up @@ -580,7 +580,7 @@ jobs:
rm -rf /sage/.coverage
ln -s $(pwd)/.coverage /sage/
cd /sage
./sage -python -m pip install coverage
./sage -python -m pip install -r requirements/test-requirements.txt
./sage -python -m coverage combine --rcfile=src/tox.ini .coverage/coverage-*/.coverage
./sage -python -m coverage xml --rcfile=src/tox.ini --omit="/tmp/*"
mkdir -p .coverage/coverage-report
Expand Down
20 changes: 19 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,22 @@ 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",
"pycodestyle",
"flake8-rst-docstrings",
]
1 change: 1 addition & 0 deletions requirements/ .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.in
64 changes: 64 additions & 0 deletions requirements/docs-requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
#
# This file is autogenerated by pip-compile with Python 3.11
# by the following command:
#
# pip-compile --no-build-isolation --output-file=requirements/docs-requirements.txt requirements/docs.in
#
alabaster==0.7.16
# via sphinx
babel==2.14.0
# via sphinx
beautifulsoup4==4.12.3
# via furo
certifi==2024.2.2
# via requests
charset-normalizer==3.3.2
# via requests
docutils==0.20.1
# via sphinx
furo==2024.1.29
# via -r requirements/docs.in
idna==3.6
# via requests
imagesize==1.4.1
# via sphinx
jinja2==3.1.3
# via sphinx
markupsafe==2.1.5
# via jinja2
packaging==23.2
# via sphinx
pygments==2.17.2
# via
# furo
# sphinx
requests==2.31.0
# via sphinx
snowballstemmer==2.2.0
# via sphinx
soupsieve==2.5
# via beautifulsoup4
sphinx==7.2.6
# via
# -r requirements/docs.in
# furo
# sphinx-basic-ng
# sphinx-inline-tabs
sphinx-basic-ng==1.0.0b2
# via furo
sphinx-inline-tabs==2023.4.21
# via -r requirements/docs.in
sphinxcontrib-applehelp==1.0.8
# via sphinx
sphinxcontrib-devhelp==1.0.6
# via sphinx
sphinxcontrib-htmlhelp==2.0.5
# via sphinx
sphinxcontrib-jsmath==1.0.1
# via sphinx
sphinxcontrib-qthelp==1.0.7
# via sphinx
sphinxcontrib-serializinghtml==1.1.10
# via sphinx
urllib3==2.2.1
# via requests
36 changes: 36 additions & 0 deletions requirements/lint-requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
#
# This file is autogenerated by pip-compile with Python 3.11
# by the following command:
#
# pip-compile --no-build-isolation --output-file=requirements/lint-requirements.txt requirements/lint.in
#
docutils==0.20.1
# via restructuredtext-lint
flake8==7.0.0
# via flake8-rst-docstrings
flake8-rst-docstrings==0.3.0
# via -r requirements/lint.in
markdown-it-py==3.0.0
# via rich
mccabe==0.7.0
# via flake8
mdurl==0.1.2
# via markdown-it-py
pycodestyle==2.11.1
# via
# -r requirements/lint.in
# flake8
pyflakes==3.2.0
# via flake8
pygments==2.17.2
# via
# flake8-rst-docstrings
# rich
pyyaml==6.0.1
# via relint
relint==3.1.0
# via -r requirements/lint.in
restructuredtext-lint==1.4.0
# via flake8-rst-docstrings
rich==13.7.0
# via relint
211 changes: 211 additions & 0 deletions requirements/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,211 @@
#
# This file is autogenerated by pip-compile with Python 3.11
# by the following command:
#
# pip-compile --no-build-isolation --output-file=requirements/requirements.txt pyproject.toml
#
alabaster==0.7.16
# via sphinx
asttokens==2.4.1
# via stack-data
babel==2.14.0
# via sphinx
certifi==2024.2.2
# via requests
charset-normalizer==3.3.2
# via requests
comm==0.2.1
# via
# ipykernel
# ipywidgets
contourpy==1.2.0
# via matplotlib
conway-polynomials==0.9
# via sagemath-standard (pyproject.toml)
cycler==0.12.1
# via matplotlib
cypari2==2.1.4
# via sagemath-standard (pyproject.toml)
cysignals==1.11.4
# via
# cypari2
# primecountpy
# sagemath-standard (pyproject.toml)
cython==3.0.8
# via
# memory-allocator
# primecountpy
# sagemath-standard (pyproject.toml)
debugpy==1.8.1
# via ipykernel
decorator==5.1.1
# via ipython
docutils==0.20.1
# via sphinx
executing==2.0.1
# via stack-data
fonttools==4.49.0
# via matplotlib
fpylll==0.6.1
# via sagemath-standard (pyproject.toml)
gmpy2==2.1.5
# via sagemath-standard (pyproject.toml)
idna==3.6
# via requests
imagesize==1.4.1
# via sphinx
importlib-metadata==7.0.1
# via sagemath-standard (pyproject.toml)
importlib-resources==6.1.1
# via sagemath-standard (pyproject.toml)
ipykernel==6.29.2
# via sagemath-standard (pyproject.toml)
ipython==8.22.1
# via
# ipykernel
# ipywidgets
# sagemath-standard (pyproject.toml)
ipywidgets==8.1.2
# via sagemath-standard (pyproject.toml)
jedi==0.19.1
# via ipython
jinja2==3.1.3
# via sphinx
jupyter-client==8.6.0
# via
# ipykernel
# sagemath-standard (pyproject.toml)
jupyter-core==5.7.1
# via
# ipykernel
# jupyter-client
# sagemath-standard (pyproject.toml)
jupyterlab-widgets==3.0.10
# via ipywidgets
kiwisolver==1.4.5
# via matplotlib
lrcalc==2.1
# via sagemath-standard (pyproject.toml)
markupsafe==2.1.5
# via jinja2
matplotlib==3.8.3
# via sagemath-standard (pyproject.toml)
matplotlib-inline==0.1.6
# via
# ipykernel
# ipython
memory-allocator==0.1.3
# via sagemath-standard (pyproject.toml)
mpmath==1.3.0
# via
# sagemath-standard (pyproject.toml)
# sympy
nest-asyncio==1.6.0
# via ipykernel
networkx==3.2.1
# via sagemath-standard (pyproject.toml)
numpy==1.26.4
# via
# contourpy
# matplotlib
# sagemath-standard (pyproject.toml)
# scipy
packaging==23.2
# via
# ipykernel
# matplotlib
# sphinx
parso==0.8.3
# via jedi
pexpect==4.9.0
# via
# ipython
# sagemath-standard (pyproject.toml)
pillow==10.2.0
# via
# matplotlib
# sagemath-standard (pyproject.toml)
platformdirs==4.2.0
# via jupyter-core
pplpy==0.8.9
# via sagemath-standard (pyproject.toml)
primecountpy==0.1.0
# via sagemath-standard (pyproject.toml)
prompt-toolkit==3.0.43
# via ipython
psutil==5.9.8
# via ipykernel
ptyprocess==0.7.0
# via
# pexpect
# sagemath-standard (pyproject.toml)
pure-eval==0.2.2
# via stack-data
pygments==2.17.2
# via
# ipython
# sphinx
pyparsing==3.1.1
# via matplotlib
python-dateutil==2.8.2
# via
# jupyter-client
# matplotlib
pyzmq==25.1.2
# via
# ipykernel
# jupyter-client
requests==2.31.0
# via
# sagemath-standard (pyproject.toml)
# sphinx
scipy==1.11.4
# via sagemath-standard (pyproject.toml)
six==1.16.0
# via
# asttokens
# python-dateutil
# sagemath-standard (pyproject.toml)
snowballstemmer==2.2.0
# via sphinx
sphinx==7.2.6
# via sagemath-standard (pyproject.toml)
sphinxcontrib-applehelp==1.0.8
# via sphinx
sphinxcontrib-devhelp==1.0.6
# via sphinx
sphinxcontrib-htmlhelp==2.0.5
# via sphinx
sphinxcontrib-jsmath==1.0.1
# via sphinx
sphinxcontrib-qthelp==1.0.7
# via sphinx
sphinxcontrib-serializinghtml==1.1.10
# via sphinx
stack-data==0.6.3
# via ipython
sympy==1.12
# via sagemath-standard (pyproject.toml)
tornado==6.4
# via
# ipykernel
# jupyter-client
traitlets==5.14.1
# via
# comm
# ipykernel
# ipython
# ipywidgets
# jupyter-client
# jupyter-core
# matplotlib-inline
typing-extensions==4.9.0
# via sagemath-standard (pyproject.toml)
urllib3==2.2.1
# via requests
wcwidth==0.2.13
# via prompt-toolkit
widgetsnbextension==4.0.10
# via ipywidgets
zipp==3.17.0
# via importlib-metadata
22 changes: 22 additions & 0 deletions requirements/test-requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#
# This file is autogenerated by pip-compile with Python 3.11
# by the following command:
#
# pip-compile --no-build-isolation --output-file=requirements/test-requirements.txt requirements/test.in
#
coverage==7.4.3
# via -r requirements/test.in
execnet==2.0.2
# via pytest-xdist
iniconfig==2.0.0
# via pytest
packaging==23.2
# via pytest
pluggy==1.4.0
# via pytest
pytest==8.0.2
# via
# -r requirements/test.in
# pytest-xdist
pytest-xdist==3.5.0
# via -r requirements/test.in
Loading
Loading