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 all commits
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
125 changes: 0 additions & 125 deletions .github/workflows/cd.yml

This file was deleted.

92 changes: 9 additions & 83 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 All @@ -14,68 +14,10 @@ on:
- ready_for_review

jobs:
codecov:
name: Unit tests + coverage
if: github.event.pull_request.draft == false
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-18.04]
python-version: [3.7]
steps:
- uses: actions/checkout@master
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@master
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install .[test]
- name: Test with pytest-cov
run: pytest -n auto --cov=tensorwaves --cov-report=xml
- uses: codecov/codecov-action@v1
with:
file: ./coverage.xml
flags: unittests

pytest:
name: Unit tests
if: github.event.pull_request.draft == false
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
- 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
- os: ubuntu-18.04 # coverage job
python-version: 3.7
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install .[test]
- name: Test with pytest
run: pytest -n auto
- name: Test example scripts
working-directory: examples
run: python *.py # https://github.com/ComPWA/tensorwaves/issues/103

documentation:
name: Build documentation and run notebooks
if: github.event.pull_request.draft == false
runs-on: ubuntu-18.04
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.7
Expand All @@ -85,36 +27,20 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install .[doc]
pip install -r .reqs/doc.txt
pip install tensorflow-cpu
pip install .
sudo apt-get -y install pandoc graphviz
- name: Build documentation and run notebooks
working-directory: docs
env:
CUDA_VISIBLE_DEVICES: "-1"
EXECUTE_NB: YES
run: make html
continue-on-error: true
- name: show error logs
working-directory: docs
run: cat ./_build/html/reports/2_generate_data.log
- name: Test doctests in docstrings
working-directory: docs
run: make ignore-warnings=1 doctest

style:
name: Style checks
if: github.event.pull_request.draft == false
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.7
uses: actions/setup-python@v2
with:
python-version: 3.7
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install .[precommit]
sudo npm install -g cspell pyright
- name: Perform style checks
run: pre-commit run -a
- name: Check spelling
run: cspell $(git ls-files)
- name: Run pyright
run: pyright
32 changes: 0 additions & 32 deletions .github/workflows/linkcheck.yml

This file was deleted.

32 changes: 0 additions & 32 deletions .github/workflows/pr-linting.yml

This file was deleted.

14 changes: 0 additions & 14 deletions .github/workflows/release-drafter.yml

This file was deleted.

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
Loading