Skip to content

Commit

Permalink
build!: define dev deps through requirements.txt (#55)
Browse files Browse the repository at this point in the history
* docs: explain new dev deps setup
  • Loading branch information
redeboer authored Nov 25, 2020
1 parent ee23bb7 commit e287c32
Show file tree
Hide file tree
Showing 20 changed files with 517 additions and 107 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# cspell:ignore noreply prereleased pypa
# cspell:ignore noreply prereleased pypa reqs

name: CD

Expand All @@ -22,7 +22,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 @@ -46,7 +47,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
8 changes: 6 additions & 2 deletions .github/workflows/ci-epic.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# cspell:ignore reqs

name: CI for epics

on:
Expand All @@ -21,7 +23,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 @@ -39,6 +42,7 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install .[ci]
pip install -r .reqs/sty.txt
pip install .
- name: Perform style checks
run: tox -e sty
8 changes: 5 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# cspell:ignore
# cspell:ignore reqs

name: CI

Expand Down Expand Up @@ -27,7 +27,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 @@ -46,7 +47,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
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
3 changes: 3 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,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: .
9 changes: 9 additions & 0 deletions .reqs/dev.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
-r ../requirements.txt
-r doc.txt
-r sty.txt

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

# Requirements to build documentation
graphviz
ipywidgets
jupyter
myst-nb
pydeps
Sphinx >= 3
sphinx-book-theme
sphinx-copybutton
sphinx-math-dollar
sphinx-panels
sphinx-thebe
sphinx-togglebutton
sphinxcontrib-bibtex
117 changes: 117 additions & 0 deletions .reqs/doc.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
#
# This file is autogenerated by pip-compile
# To update, run:
#
# pip-compile .reqs/doc.in
#
alabaster==0.7.12 # via sphinx
argon2-cffi==20.1.0 # via notebook
async-generator==1.10 # via nbclient
attrs==20.3.0 # via jsonschema, jupyter-cache, markdown-it-py
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
certifi==2020.11.8 # via requests
cffi==1.14.4 # via argon2-cffi
chardet==3.0.4 # via requests
click==7.1.2 # via sphinx-book-theme
colorama==0.4.4 # via nbdime
cycler==0.10.0 # via -r .reqs/../requirements.txt, matplotlib
decorator==4.4.2 # via ipython
defusedxml==0.6.0 # via nbconvert
docutils==0.16 # via myst-nb, myst-parser, pybtex-docutils, sphinx, sphinx-book-theme, sphinx-panels, sphinx-togglebutton
entrypoints==0.3 # via nbconvert
gitdb==4.0.5 # via gitpython
gitpython==3.1.11 # via nbdime
graphviz==0.15 # via -r .reqs/doc.in
idna==2.10 # via requests
imagesize==1.2.0 # via sphinx
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 nbformat
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
kiwisolver==1.3.1 # via -r .reqs/../requirements.txt, matplotlib
latexcodec==2.0.1 # via pybtex
markdown-it-py==0.5.6 # via myst-parser
markupsafe==1.1.1 # via jinja2
matplotlib==3.3.3 # via -r .reqs/../requirements.txt
mistune==0.8.4 # via nbconvert
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.19.4 # via -r .reqs/../requirements.txt, matplotlib
oset==0.1.3 # via sphinxcontrib-bibtex
packaging==20.4 # via bleach, sphinx
pandocfilters==1.4.3 # via nbconvert
parso==0.7.1 # via jedi
pexpect==4.8.0 # via ipython
pickleshare==0.7.5 # via ipython
pillow==8.0.1 # via -r .reqs/../requirements.txt, matplotlib
prometheus-client==0.9.0 # via notebook
prompt-toolkit==3.0.8 # via ipython, jupyter-console
ptyprocess==0.6.0 # via pexpect, terminado
pybtex-docutils==0.2.2 # via sphinxcontrib-bibtex
pybtex==0.23.0 # via pybtex-docutils, sphinxcontrib-bibtex
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 -r .reqs/../requirements.txt, matplotlib, packaging
pyrsistent==0.17.3 # via jsonschema
python-dateutil==2.8.1 # via -r .reqs/../requirements.txt, jupyter-client, matplotlib
pytz==2020.4 # via babel
pyyaml==5.3.1 # via myst-nb, myst-parser, pybtex, 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==2.25.0 # via nbdime, sphinx
send2trash==1.5.0 # via notebook
six==1.15.0 # via -r .reqs/../requirements.txt, argon2-cffi, bleach, cycler, jsonschema, latexcodec, nbdime, packaging, pybtex, pybtex-docutils, python-dateutil
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-math-dollar==1.2 # 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-math-dollar, sphinx-panels, sphinx-thebe, sphinx-togglebutton, sphinxcontrib-bibtex
sphinxcontrib-applehelp==1.0.2 # via sphinx
sphinxcontrib-bibtex==1.0.0 # via -r .reqs/doc.in
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
sqlalchemy==1.3.20 # via jupyter-cache
stdlib-list==0.8.0 # via pydeps
terminado==0.9.1 # via notebook
testpath==0.4.4 # via nbconvert
tornado==6.1 # via ipykernel, jupyter-client, nbdime, notebook, terminado
traitlets==5.0.5 # via ipykernel, ipython, ipywidgets, jupyter-client, jupyter-core, nbclient, nbconvert, nbformat, notebook, qtconsole
urllib3==1.26.2 # via requests
wcwidth==0.2.5 # via prompt-toolkit
webencodings==0.5.1 # via bleach
wheel==0.35.1 # via sphinx-togglebutton
widgetsnbextension==3.5.1 # via ipywidgets
zipp==3.4.0 # via importlib-metadata

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

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
68 changes: 68 additions & 0 deletions .reqs/sty.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
#
# This file is autogenerated by pip-compile
# To update, run:
#
# pip-compile .reqs/sty.in
#
appdirs==1.4.4 # via black, virtualenv
astroid==2.4.2 # via pylint
attrs==20.3.0 # via flake8-bugbear, jsonschema
black==20.8b1 # via -r .reqs/sty.in
cfgv==3.2.0 # via pre-commit
chardet==3.0.4 # via doc8
click==7.1.2 # via black
cycler==0.10.0 # via -r .reqs/../requirements.txt, matplotlib
distlib==0.3.1 # via virtualenv
doc8==0.8.1 # via -r .reqs/sty.in
docutils==0.16 # via doc8, restructuredtext-lint, rstcheck
filelock==3.0.12 # via virtualenv
flake8-blind-except==0.1.1 # via -r .reqs/sty.in
flake8-bugbear==20.11.1 # via -r .reqs/sty.in
flake8-builtins==1.5.3 # via -r .reqs/sty.in
flake8-polyfill==1.0.2 # via pep8-naming
flake8-rst-docstrings==0.0.14 # via -r .reqs/sty.in
flake8==3.8.4 # via -r .reqs/sty.in, flake8-bugbear, flake8-builtins, flake8-polyfill, flake8-rst-docstrings
identify==1.5.10 # via pre-commit
ipython-genutils==0.2.0 # via nbformat, traitlets
isort==5.6.4 # via -r .reqs/sty.in, pylint
jsonschema==3.2.0 # via nbformat
jupyter-core==4.7.0 # via nbformat
kiwisolver==1.3.1 # via -r .reqs/../requirements.txt, matplotlib
lazy-object-proxy==1.4.3 # via astroid
matplotlib==3.3.3 # via -r .reqs/../requirements.txt
mccabe==0.6.1 # via flake8, pylint
mypy-extensions==0.4.3 # via black, mypy
mypy==0.790 # via -r .reqs/sty.in
nbformat==5.0.8 # via nbstripout
nbstripout==0.3.9 # via -r .reqs/sty.in
nodeenv==1.5.0 # via pre-commit
numpy==1.19.4 # via -r .reqs/../requirements.txt, matplotlib
pathspec==0.8.1 # via black
pbr==5.5.1 # via stevedore
pep8-naming==0.11.1 # via -r .reqs/sty.in
pillow==8.0.1 # via -r .reqs/../requirements.txt, matplotlib
pre-commit==2.9.0 # via -r .reqs/sty.in
pycodestyle==2.6.0 # via flake8
pydocstyle==5.1.1 # via -r .reqs/sty.in
pyflakes==2.2.0 # via flake8
pygments==2.7.2 # via doc8
pylint==2.6.0 # via -r .reqs/sty.in
pyparsing==2.4.7 # via -r .reqs/../requirements.txt, matplotlib
pyrsistent==0.17.3 # via jsonschema
python-dateutil==2.8.1 # via -r .reqs/../requirements.txt, matplotlib
pyyaml==5.3.1 # via pre-commit
regex==2020.11.13 # via black
restructuredtext-lint==1.3.2 # via doc8, flake8-rst-docstrings
rstcheck==3.3.1 # via -r .reqs/sty.in
six==1.15.0 # via -r .reqs/../requirements.txt, astroid, cycler, doc8, jsonschema, python-dateutil, virtualenv
snowballstemmer==2.0.0 # via pydocstyle
stevedore==3.2.2 # via doc8
toml==0.10.2 # via black, pre-commit, pylint
traitlets==5.0.5 # via jupyter-core, nbformat
typed-ast==1.4.1 # via black, mypy
typing-extensions==3.7.4.3 # via black, mypy
virtualenv==20.2.1 # via pre-commit
wrapt==1.12.1 # via astroid

# The following packages are considered to be unsafe in a requirements file:
# setuptools
4 changes: 4 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.wordWrap": "off"
},
"[pip-requirements]": {
"editor.wordWrap": "off"
},
"[python]": {
"editor.codeActionsOnSave": {
"source.organizeImports": true
Expand Down Expand Up @@ -59,6 +62,7 @@
"rewrap.wrappingColumn": 79,
"search.exclude": {
"**/tests/**/__init__.py": true,
".reqs/*.txt": true,
"docs/tox.ini": true,
"tests/tox.ini": true
},
Expand Down
4 changes: 4 additions & 0 deletions cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
],
"ignorePaths": [
"*.bib",
"*.ico",
"*.root",
"*.rst_t",
"*.svg",
Expand All @@ -27,6 +28,8 @@
".pre-commit-config.yaml",
".pylintrc",
".readthedocs.yml",
".reqs/*.in",
".reqs/*.txt",
".vscode/*",
".vscode/.gitignore",
"Makefile",
Expand All @@ -36,6 +39,7 @@
"docs/conf.py",
"pyproject.toml",
"pyrightconfig.json",
"requirements*.txt",
"setup.cfg",
"setup.py",
"tox.ini"
Expand Down
Loading

0 comments on commit e287c32

Please sign in to comment.