Skip to content

Commit

Permalink
ci!: update requirements through GitHub Actions (#56)
Browse files Browse the repository at this point in the history
* build: limit to sphinxcontrib-bibtex < 2
* ci: import dev dependency upgrader
  ComPWA/expertsystem#412
* ci: upgrade developer dependencies (automatic)
* fix: cross-references in develop page
  • Loading branch information
redeboer authored Jan 16, 2021
1 parent e287c32 commit 9b5ed6d
Show file tree
Hide file tree
Showing 48 changed files with 1,826 additions and 516 deletions.
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ indent_style = tab
[*.{py,toml}]
indent_size = 4

[*.{json,xml,yaml,yml}]
[*.{json,yaml,yml}]
indent_size = 2

[*.{rst,inc}]
Expand Down
30 changes: 18 additions & 12 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,32 @@
---
name: Bug report
about: Create a report to help us improve
title: "[BUG] "
labels: bug
title: ""
labels: Bug
assignees: ""
---

**Describe the bug** A clear and concise description of what the bug is.
## Bug description

**To Reproduce** Steps to reproduce the behavior:
<!-- A clear and concise description of what the bug is. -->

<!-- If applicable, add a log or screenshot to help explain your problem. -->

## How to reproduce?

Steps to reproduce the behavior:

1.

**Expected behavior** A clear and concise description of what you expected to
happen.
## Expected behavior

**Error log** If applicable, add an error log or screenshots to help explain
your problem.
<!-- A clear and concise description of what you expected to happen. -->

**Desktop (please complete the following information):**
## System info

- OS: [e.g. iOS]
- Version [e.g. 22]
Bug resulted on the following system:

**Additional context** Add any other context about the problem here.
- OS: <!-- e.g. macOS, WSL Ubuntu, ...-->
- Version <!-- e.g. 10.15, 20.04, ... -->
- Python version: <!-- e.g. 3.6, 3.7, ... -->
- Virtual environment: <!-- e.g. venv, Conda, pip user install, ... -->
22 changes: 12 additions & 10 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,22 @@
---
name: Feature request
about: Suggest an idea for this project
title: "[REQUEST] "
labels: ""
title: ""
labels: "💡 Enhancement"
assignees: ""
---

**Is your feature request related to a problem? Please describe.** A clear and
## Problem description

<!-- Is your feature request related to a problem? Please provide a clear and
concise description of what the problem is. [Example: "I'm always frustrated
when ..."]
when ..." -->

## Proposed solution

**Describe the solution you'd like** A clear and concise description of what
you want to happen.
<!-- Describe the solution you'd want to happen. -->

**Describe alternatives you've considered** A clear and concise description of
any alternative solutions or features you've considered.
<!-- Are there alternatives you have considered? -->

**Additional context** Add any other context or screenshots about the feature
request here.
<!-- Additional context: -->
<!-- Add any other context or screenshots about the feature -->
3 changes: 2 additions & 1 deletion .github/release-drafter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ categories:
- title: 🔨 Internals
labels:
- 🖱️ DX
- 💡 Enhancement
- 💡 Feature
- ⚠️ Interface
- 🔨 Maintenance

change-template: "- $TITLE (#$NUMBER)"
Expand Down
50 changes: 1 addition & 49 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,58 +9,10 @@ on:
- released

jobs:
documentation:
name: Build documentation and run notebooks
if: startsWith(github.ref, 'refs/tags')
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 -r .reqs/doc.txt
pip install .
sudo apt-get -y install pandoc graphviz
- name: Build documentation and run notebooks
working-directory: docs
env:
EXECUTE_NB: YES
run: make html
- name: Test doctests in docstrings
working-directory: docs
run: make ignore-warnings=1 doctest

style:
name: Style checks
if: startsWith(github.ref, 'refs/tags')
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 -r .reqs/sty.txt
pip install .
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

push:
name: Push to stable branch
if: startsWith(github.ref, 'refs/tags')
runs-on: ubuntu-18.04
runs-on: ubuntu-20.04
needs:
- documentation
- style
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci-epic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ on:
jobs:
documentation:
name: Build documentation and run notebooks
runs-on: ubuntu-18.04
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.7
Expand All @@ -32,7 +32,7 @@ jobs:

style:
name: Style checks
runs-on: ubuntu-18.04
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.7
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
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 @@ -27,7 +27,7 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r .reqs/doc.txt
pip install -r reqs/3.7/requirements-doc.txt
pip install .
sudo apt-get -y install pandoc graphviz
- name: Build documentation and run notebooks
Expand All @@ -37,7 +37,7 @@ jobs:
style:
name: Style checks
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 @@ -47,12 +47,12 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r .reqs/sty.txt
pip install -r reqs/3.7/requirements-sty.txt
pip install .
sudo npm install -g cspell pyright
- name: Perform style checks
run: pre-commit run -a
- name: Check spelling
run: cspell $(git ls-files)
run: cspell --no-progress $(git ls-files)
- name: Run pyright
run: pyright
5 changes: 3 additions & 2 deletions .github/workflows/linkcheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
check_links:
name: Check external links
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 @@ -27,7 +27,8 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r .reqs/doc.txt
pip install -r reqs/3.7/requirements-doc.txt
pip install .
sudo apt-get -y install pandoc
- name: Check external links
working-directory: docs
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/pr-linting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,19 @@ on:
jobs:
check-labels:
name: Check labels
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
steps:
- uses: docker://agilepathway/pull-request-label-checker:latest
with:
any_of: |
Bug,💡 Enhancement,📝 Docs,🔨 Maintenance,🖱️ DX,📖 Analysis,
Bug,💡 Feature,⚠️ Interface,📝 Docs,🔨 Maintenance,🖱️ DX,📖 Analysis,
📖 Software,📖 Theory
none_of: ❌ Won't fix,💫 Good first issue
repo_token: ${{ secrets.GITHUB_TOKEN }}

check-title:
name: Check title
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v1
- name: Install Dependencies
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-drafter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:

jobs:
update_release_draft:
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
steps:
- uses: release-drafter/release-drafter@v5
env:
Expand Down
65 changes: 65 additions & 0 deletions .github/workflows/requirements-cron.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# cspell:ignore noreply

name: Requirements (scheduled)

on:
schedule:
- cron: "0 2 * * 1"

jobs:
upgrade:
name: Upgrade requirement files
runs-on: ubuntu-20.04
strategy:
matrix:
python-version:
- 3.6
- 3.7
- 3.8
- 3.9
steps:
- uses: actions/checkout@v2
- 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 pip-tools
- name: Upgrade dependencies
run: bash reqs/upgrade.sh
- uses: actions/upload-artifact@v2
with:
name: ${{ matrix.python-version }}
path: reqs/${{ matrix.python-version }}

push:
name: Create PR
runs-on: ubuntu-20.04
needs:
- upgrade
steps:
- uses: actions/checkout@v2
with:
token: ${{ secrets.PAT }}
- uses: actions/download-artifact@v2
with:
path: reqs
- run: git status -s
- name: Create Pull Request
uses: peter-evans/create-pull-request@v3
with:
commit-message: "ci: upgrade developer dependencies"
committer: GitHub <[email protected]>
author: GitHub <[email protected]>
title: "ci: upgrade developer dependencies"
labels: |
🖱️ DX
branch-suffix: timestamp
delete-branch: true
token: ${{ secrets.PAT }}
- name: Print PR info
run: |
echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}"
echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}"
Loading

0 comments on commit 9b5ed6d

Please sign in to comment.