Skip to content

Commit

Permalink
Add requirements files for testing, linting, and documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
tobiasdiez authored Feb 25, 2024
1 parent 30b3d78 commit 7f347b2
Show file tree
Hide file tree
Showing 7 changed files with 339 additions and 5 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ jobs:
- name: Pytest
if: contains(github.ref, 'pytest')
run: |
../sage -python -m pip install coverage pytest-xdist
../sage -python -m pip install -r requirements/test-requirements.txt
../sage -python -m coverage run -m pytest -c tox.ini --doctest || true
working-directory: ./worktree-image/src
env:
Expand All @@ -197,7 +197,7 @@ jobs:
- name: Test all files (sage -t --all --long)
if: (success() || failure()) && steps.build.outcome == 'success'
run: |
./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 --all --long -p2 --format github --random-seed=286735480429121101562228604801325644303
working-directory: ./worktree-image

Expand Down
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
6 changes: 3 additions & 3 deletions src/tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ description =
# W391: blank line at end of file
# W605: invalid escape sequence ‘x’
# See https://pycodestyle.pycqa.org/en/latest/intro.html#error-codes
deps = pycodestyle
deps = -r{toxinidir}/../requirements/lint-requirements.txt
commands = pycodestyle --select E111,E21,E221,E222,E225,E227,E228,E25,E271,E303,E305,E306,E401,E502,E701,E702,E703,E71,E72,W291,W293,W391,W605 {posargs:{toxinidir}/sage/}
pycodestyle --select E111,E271,E301,E306,E401,E502,E703,E712,E713,E714,E72,W29,W391,W605, --filename *.pyx {posargs:{toxinidir}/sage/}
Expand All @@ -175,7 +175,7 @@ description =
(includes all patchbot pattern-exclusion plugins)
# https://github.com/codingjoe/relint
# The patterns are in .relint.yml
deps = relint
deps = -r{toxinidir}/../requirements/lint-requirements.txt
allowlist_externals = find
commands = find {posargs:{toxinidir}/sage/} \
-name "*\#*" -prune -o \
Expand Down Expand Up @@ -231,7 +231,7 @@ commands = codespell \
[testenv:rst]
description =
validate Python docstrings markup as reStructuredText
deps = flake8-rst-docstrings
deps = -r{toxinidir}/../requirements/lint-requirements.txt
commands = flake8 --select=RST {posargs:{toxinidir}/sage/}
[testenv:cython-lint]
Expand Down

0 comments on commit 7f347b2

Please sign in to comment.