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

build!: define dev deps through requirements.txt #179

Closed
wants to merge 20 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
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
18 changes: 8 additions & 10 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# cspell:ignore bdist noreply prereleased pypa sdist
# cspell:ignore bdist noreply prereleased pypa reqs sdist

name: CD

Expand All @@ -10,7 +10,7 @@ on:

jobs:
test:
name: Run pytest
name: Run pytest with unpinned dependencies
if: startsWith(github.ref, 'refs/tags')
runs-on: ${{ matrix.os }}
strategy:
Expand All @@ -19,11 +19,6 @@ jobs:
- macos-10.15
- ubuntu-18.04
python-version: [3.6, 3.7, 3.8]
exclude:
- os: macos-10.15
python-version: 3.6
- os: macos-10.15
python-version: 3.8
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
Expand All @@ -33,7 +28,8 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install .[test]
pip install -r .reqs/test.in
pip install .
- name: Test with pytest
env:
PYTEST_RUN_SLOW_TESTS: YES
Expand All @@ -52,7 +48,8 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install .[doc]
pip install -r .reqs/doc.txt
pip install .
sudo apt-get -y install pandoc graphviz
- name: Build documentation and run notebooks
working-directory: docs
Expand All @@ -76,7 +73,8 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install .[precommit]
pip install -r .reqs/sty.txt
pip install .
sudo npm install -g cspell pyright
- name: Perform style checks
run: pre-commit run -a
Expand Down
16 changes: 10 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# cspell:ignore unittests
# cspell:ignore reqs unittests

name: CI

Expand Down Expand Up @@ -31,7 +31,8 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install .[test]
pip install -r .reqs/test.txt
pip install .
- name: Test with pytest-cov
run: pytest -n auto --cov=tensorwaves --cov-report=xml
- uses: codecov/codecov-action@v1
Expand Down Expand Up @@ -65,9 +66,10 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install .[test]
pip install -r .reqs/test.txt
pip install .
- name: Test with pytest
run: pytest -n auto
run: pytest
- name: Test example scripts
working-directory: examples
run: python *.py # https://github.com/ComPWA/tensorwaves/issues/103
Expand All @@ -85,7 +87,8 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install .[doc]
pip install -r .reqs/doc.txt
pip install .
pip install tensorflow-cpu
sudo apt-get -y install pandoc graphviz
- name: Build documentation and run notebooks
Expand All @@ -110,7 +113,8 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install .[precommit]
pip install -r .reqs/sty.txt
pip install .
sudo npm install -g cspell pyright
- name: Perform style checks
run: pre-commit run -a
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/linkcheck.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# cspell:ignore reqs

name: Linkcheck

on:
Expand Down Expand Up @@ -25,7 +27,7 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install .[doc]
pip install -r .reqs/doc.txt
sudo apt-get -y install pandoc
- name: Check external links
working-directory: docs
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,5 @@ pyvenv*/
!environment.yml
!pyrightconfig.json

!docs/_static/*
!examples/intensity-recipe.yaml
2 changes: 1 addition & 1 deletion .gitpod.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
tasks:
- init: pip install -e .[dev]
- init: pip install -r requirements-dev.txt -e .

github:
prebuilds:
Expand Down
6 changes: 5 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ repos:
exclude: >
(?x)^(
cspell.json|
.*\.bib
.*\.bib|
.*\.svg
)$
- id: mixed-line-ending
- id: name-tests-test
Expand All @@ -38,6 +39,9 @@ repos:
- id: prettier
language_version: 12.18.2 # prettier does not specify node correctly

# The following tools have to be install locally, because they can also be
# used by code editors (e.g. linting and format-on-save).

- repo: local
hooks:
- id: black
Expand Down
3 changes: 2 additions & 1 deletion .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,6 @@ formats:
python:
version: 3.7
install:
- requirements: .reqs/doc.txt
- method: pip
path: .[doc]
path: .
10 changes: 10 additions & 0 deletions .reqs/dev.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
-r ../requirements.txt
-r doc.txt
-r test.txt
-r sty.txt

jupyterlab
jupyterlab-code-formatter
labels
pip-tools
tox >= 1.9 # for skip_install, use_develop
15 changes: 15 additions & 0 deletions .reqs/doc.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
-r ../requirements.txt

# Requirements to build documentation
graphviz
ipywidgets
jupyter
myst-nb
pydeps
Sphinx >= 3
sphinx-book-theme
sphinx-copybutton
sphinx-panels
sphinx-thebe
sphinx-togglebutton
sphobjinv
149 changes: 149 additions & 0 deletions .reqs/doc.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,149 @@
#
# This file is autogenerated by pip-compile
# To update, run:
#
# pip-compile .reqs/doc.in
#
absl-py==0.11.0 # via -r .reqs/../requirements.txt, tensorboard, tensorflow
alabaster==0.7.12 # via sphinx
amplitf==0.0.1a2 # via -r .reqs/../requirements.txt
argon2-cffi==20.1.0 # via notebook
astunparse==1.6.3 # via -r .reqs/../requirements.txt, tensorflow
async-generator==1.10 # via nbclient
attrs==20.3.0 # via -r .reqs/../requirements.txt, expertsystem, jsonschema, jupyter-cache, markdown-it-py, particle, sphobjinv
babel==2.9.0 # via sphinx
backcall==0.2.0 # via ipython
beautifulsoup4==4.9.3 # via sphinx-book-theme
bleach==3.2.1 # via nbconvert
cachetools==4.1.1 # via -r .reqs/../requirements.txt, google-auth
certifi==2020.11.8 # via -r .reqs/../requirements.txt, requests, sphobjinv
cffi==1.14.4 # via argon2-cffi
chardet==3.0.4 # via -r .reqs/../requirements.txt, requests
click==7.1.2 # via sphinx-book-theme
cloudpickle==1.6.0 # via -r .reqs/../requirements.txt, tensorflow-probability
colorama==0.4.4 # via nbdime
decorator==4.4.2 # via -r .reqs/../requirements.txt, ipython, tensorflow-probability
defusedxml==0.6.0 # via nbconvert
dm-tree==0.1.5 # via -r .reqs/../requirements.txt, tensorflow-probability
docutils==0.16 # via myst-nb, myst-parser, sphinx, sphinx-book-theme, sphinx-panels, sphinx-togglebutton
entrypoints==0.3 # via nbconvert
expertsystem==0.6.4 # via -r .reqs/../requirements.txt
fuzzywuzzy==0.18.0 # via sphobjinv
gast==0.3.3 # via -r .reqs/../requirements.txt, tensorflow, tensorflow-probability
gitdb==4.0.5 # via gitpython
gitpython==3.1.11 # via nbdime
google-auth-oauthlib==0.4.2 # via -r .reqs/../requirements.txt, tensorboard
google-auth==1.23.0 # via -r .reqs/../requirements.txt, google-auth-oauthlib, tensorboard
google-pasta==0.2.0 # via -r .reqs/../requirements.txt, tensorflow
graphviz==0.15 # via -r .reqs/doc.in
grpcio==1.33.2 # via -r .reqs/../requirements.txt, tensorboard, tensorflow
h5py==2.10.0 # via -r .reqs/../requirements.txt, tensorflow
hepunits==2.0.1 # via -r .reqs/../requirements.txt, particle
idna==2.10 # via -r .reqs/../requirements.txt, requests
imagesize==1.2.0 # via sphinx
iminuit==1.5.4 # via -r .reqs/../requirements.txt, amplitf
importlib-metadata==3.1.0 # via myst-nb
ipykernel==5.3.4 # via ipywidgets, jupyter, jupyter-console, notebook, qtconsole
ipython-genutils==0.2.0 # via nbformat, notebook, qtconsole, traitlets
ipython==7.19.0 # via ipykernel, ipywidgets, jupyter-console, jupyter-sphinx, myst-nb
ipywidgets==7.5.1 # via -r .reqs/doc.in, jupyter, jupyter-sphinx, myst-nb
jedi==0.17.2 # via ipython
jinja2==2.11.2 # via nbconvert, nbdime, notebook, sphinx
jsonschema==3.2.0 # via -r .reqs/../requirements.txt, expertsystem, nbformat, sphobjinv
jupyter-cache==0.4.1 # via myst-nb
jupyter-client==6.1.7 # via ipykernel, jupyter-console, nbclient, notebook, qtconsole
jupyter-console==6.2.0 # via jupyter
jupyter-core==4.7.0 # via jupyter-client, nbconvert, nbformat, notebook, qtconsole
jupyter-sphinx==0.3.2 # via myst-nb
jupyter==1.0.0 # via -r .reqs/doc.in
keras-preprocessing==1.1.2 # via -r .reqs/../requirements.txt, tensorflow
markdown-it-py==0.5.6 # via myst-parser
markdown==3.3.3 # via -r .reqs/../requirements.txt, tensorboard
markupsafe==1.1.1 # via jinja2
mistune==0.8.4 # via nbconvert
mpmath==1.1.0 # via -r .reqs/../requirements.txt, sympy
myst-nb==0.10.1 # via -r .reqs/doc.in
myst-parser==0.12.10 # via myst-nb
nbclient==0.5.1 # via jupyter-cache
nbconvert==5.6.1 # via jupyter, jupyter-sphinx, myst-nb, notebook
nbdime==2.1.0 # via jupyter-cache
nbformat==5.0.8 # via ipywidgets, jupyter-cache, jupyter-sphinx, myst-nb, nbclient, nbconvert, nbdime, notebook
nest-asyncio==1.4.3 # via nbclient
notebook==6.1.5 # via jupyter, nbdime, widgetsnbextension
numpy==1.18.5 # via -r .reqs/../requirements.txt, amplitf, h5py, iminuit, keras-preprocessing, opt-einsum, pandas, tensorboard, tensorflow, tensorflow-probability
oauthlib==3.1.0 # via -r .reqs/../requirements.txt, requests-oauthlib
opt-einsum==3.3.0 # via -r .reqs/../requirements.txt, tensorflow
packaging==20.4 # via bleach, sphinx
pandas==1.1.4 # via -r .reqs/../requirements.txt
pandocfilters==1.4.3 # via nbconvert
parso==0.7.1 # via jedi
particle==0.14.0 # via -r .reqs/../requirements.txt, expertsystem
pexpect==4.8.0 # via ipython
phasespace==1.2.0 # via -r .reqs/../requirements.txt
pickleshare==0.7.5 # via ipython
prometheus-client==0.9.0 # via notebook
prompt-toolkit==3.0.8 # via ipython, jupyter-console
protobuf==3.14.0 # via -r .reqs/../requirements.txt, tensorboard, tensorflow
ptyprocess==0.6.0 # via pexpect, terminado
pyasn1-modules==0.2.8 # via -r .reqs/../requirements.txt, google-auth
pyasn1==0.4.8 # via -r .reqs/../requirements.txt, pyasn1-modules, rsa
pycparser==2.20 # via cffi
pydata-sphinx-theme==0.4.1 # via sphinx-book-theme
pydeps==1.9.11 # via -r .reqs/doc.in
pygments==2.7.2 # via ipython, jupyter-console, nbconvert, nbdime, qtconsole, sphinx
pyparsing==2.4.7 # via packaging
pyrsistent==0.17.3 # via -r .reqs/../requirements.txt, jsonschema
python-constraint==1.4.0 # via -r .reqs/../requirements.txt, expertsystem
python-dateutil==2.8.1 # via -r .reqs/../requirements.txt, jupyter-client, pandas
pytz==2020.4 # via -r .reqs/../requirements.txt, babel, pandas
pyyaml==5.3.1 # via -r .reqs/../requirements.txt, expertsystem, myst-nb, myst-parser, sphinx-book-theme
pyzmq==20.0.0 # via jupyter-client, notebook, qtconsole
qtconsole==5.0.1 # via jupyter
qtpy==1.9.0 # via qtconsole
requests-oauthlib==1.3.0 # via -r .reqs/../requirements.txt, google-auth-oauthlib
requests==2.25.0 # via -r .reqs/../requirements.txt, nbdime, requests-oauthlib, sphinx, tensorboard
rsa==4.6 # via -r .reqs/../requirements.txt, google-auth
send2trash==1.5.0 # via notebook
six==1.15.0 # via -r .reqs/../requirements.txt, absl-py, argon2-cffi, astunparse, bleach, dm-tree, google-auth, google-pasta, grpcio, h5py, jsonschema, keras-preprocessing, nbdime, packaging, protobuf, python-dateutil, tensorboard, tensorflow, tensorflow-probability
smmap==3.0.4 # via gitdb
snowballstemmer==2.0.0 # via sphinx
soupsieve==2.0.1 # via beautifulsoup4
sphinx-book-theme==0.0.39 # via -r .reqs/doc.in
sphinx-copybutton==0.3.1 # via -r .reqs/doc.in
sphinx-panels==0.5.2 # via -r .reqs/doc.in
sphinx-thebe==0.0.8 # via -r .reqs/doc.in
sphinx-togglebutton==0.2.3 # via -r .reqs/doc.in, myst-nb
sphinx==3.3.1 # via -r .reqs/doc.in, jupyter-sphinx, myst-nb, myst-parser, pydata-sphinx-theme, sphinx-book-theme, sphinx-copybutton, sphinx-panels, sphinx-thebe, sphinx-togglebutton
sphinxcontrib-applehelp==1.0.2 # via sphinx
sphinxcontrib-devhelp==1.0.2 # via sphinx
sphinxcontrib-htmlhelp==1.0.3 # via sphinx
sphinxcontrib-jsmath==1.0.1 # via sphinx
sphinxcontrib-qthelp==1.0.3 # via sphinx
sphinxcontrib-serializinghtml==1.1.4 # via sphinx
sphobjinv==2.0.1 # via -r .reqs/doc.in
sqlalchemy==1.3.20 # via jupyter-cache
stdlib-list==0.8.0 # via pydeps
sympy==1.6.2 # via -r .reqs/../requirements.txt, amplitf
tensorboard-plugin-wit==1.7.0 # via -r .reqs/../requirements.txt, tensorboard
tensorboard==2.4.0 # via -r .reqs/../requirements.txt, tensorflow
tensorflow-estimator==2.3.0 # via -r .reqs/../requirements.txt, tensorflow
tensorflow-probability==0.11.1 # via -r .reqs/../requirements.txt, phasespace
tensorflow==2.3.1 # via -r .reqs/../requirements.txt, amplitf, phasespace
termcolor==1.1.0 # via -r .reqs/../requirements.txt, tensorflow
terminado==0.9.1 # via notebook
testpath==0.4.4 # via nbconvert
tornado==6.1 # via ipykernel, jupyter-client, nbdime, notebook, terminado
tqdm==4.53.0 # via -r .reqs/../requirements.txt, expertsystem
traitlets==5.0.5 # via ipykernel, ipython, ipywidgets, jupyter-client, jupyter-core, nbclient, nbconvert, nbformat, notebook, qtconsole
urllib3==1.26.2 # via -r .reqs/../requirements.txt, requests
wcwidth==0.2.5 # via prompt-toolkit
webencodings==0.5.1 # via bleach
werkzeug==1.0.1 # via -r .reqs/../requirements.txt, tensorboard
wheel==0.35.1 # via -r .reqs/../requirements.txt, astunparse, sphinx-togglebutton, tensorboard, tensorflow
widgetsnbextension==3.5.1 # via ipywidgets
wrapt==1.12.1 # via -r .reqs/../requirements.txt, tensorflow
xmltodict==0.12.0 # via -r .reqs/../requirements.txt, expertsystem
zipp==3.4.0 # via importlib-metadata

# The following packages are considered to be unsafe in a requirements file:
# setuptools
24 changes: 24 additions & 0 deletions .reqs/sty.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
-r ../requirements.txt
-r test.txt # for pytest type hints

pre-commit >= 1.4.0

# Requirements for formatting files
black
isort
nbstripout

# Lint Python source code
flake8 >= 3 # for per-file-ignores
flake8-blind-except
flake8-bugbear
flake8-builtins
flake8-rst-docstrings
mypy
pep8-naming
pydocstyle
pylint

# Lint documentation files
doc8
rstcheck
Loading