Skip to content

Commit 70df031

Browse files
committed
Merge branch 'release/v0.8.0'
2 parents 61df499 + 99f87ae commit 70df031

File tree

101 files changed

+8355
-5710
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

101 files changed

+8355
-5710
lines changed

.bumpversion.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[bumpversion]
2-
current_version = 0.7.1
2+
current_version = 0.8.0
33
commit = False
44
tag = False
55
allow_dirty = False

.github/workflows/main.yaml

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,15 @@ jobs:
3838
pre-commit run --all --show-diff-on-failure
3939
python build_scripts/run_pylint.py | (pylint-json2html -f jsonextended -o pylint.html)
4040
shell: bash
41+
- name: Generate mypy cache key
42+
id: generate-mypy-cache-key
43+
run: |
44+
MYPY_VERSION=$(mypy --version | sed 's/[^0-9.]*\([0-9.]*\).*/\1/')
45+
echo "key=mypy-$MYPY_VERSION-${{ env.pythonLocation }}" >> $GITHUB_OUTPUT
46+
- uses: actions/cache@v3
47+
with:
48+
path: .mypy_cache
49+
key: ${{ steps.generate-mypy-cache-key.outputs.key }}
4150
- name: Check Type Hints
4251
run: mypy src/
4352
docs:
@@ -57,40 +66,32 @@ jobs:
5766
pandoc-version: ${{ env.PANDOC_VERSION }}
5867
- name: Build Docs
5968
run: mkdocs build
60-
base-tests:
69+
group-tests:
6170
strategy:
71+
fail-fast: false
6272
matrix:
6373
python_version: ["3.8", "3.9", "3.10"]
64-
name: Run base tests
74+
group_number: [1, 2, 3, 4]
75+
name: Run Tests - Python ${{ matrix.python_version }} - Group ${{ matrix.group_number }}
6576
uses: ./.github/workflows/run-tests-workflow.yaml
6677
with:
67-
tests_to_run: base
68-
python_version: ${{ matrix.python_version }}
69-
needs: [code-quality]
70-
torch-tests:
71-
strategy:
72-
matrix:
73-
python_version: ["3.8", "3.9", "3.10"]
74-
name: Run tests that use PyTorch
75-
uses: ./.github/workflows/run-tests-workflow.yaml
76-
with:
77-
tests_to_run: torch
78+
split_size: 4
79+
group_number: ${{ matrix.group_number }}
7880
python_version: ${{ matrix.python_version }}
7981
needs: [code-quality]
8082
notebook-tests:
8183
strategy:
8284
matrix:
8385
python_version: ["3.8", "3.9", "3.10"]
84-
name: Run notebook tests
85-
uses: ./.github/workflows/run-tests-workflow.yaml
86+
name: Run Notebook tests - Python ${{ matrix.python_version }}
87+
uses: ./.github/workflows/run-notebook-tests-workflow.yaml
8688
with:
87-
tests_to_run: notebooks
8889
python_version: ${{ matrix.python_version }}
8990
needs: [code-quality]
9091
push-docs-and-release-testpypi:
9192
name: Push Docs and maybe release Package to TestPyPI
9293
runs-on: ubuntu-latest
93-
needs: [docs, base-tests, torch-tests, notebook-tests]
94+
needs: [docs, group-tests, notebook-tests]
9495
if: ${{ github.ref == 'refs/heads/develop' }}
9596
concurrency:
9697
group: publish
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Run Notebook Tests
2+
3+
on:
4+
workflow_call:
5+
inputs:
6+
python_version:
7+
description: "Determines which Python version to use"
8+
type: string
9+
required: true
10+
11+
env:
12+
PY_COLORS: 1
13+
14+
jobs:
15+
run-tests:
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@v3
19+
with:
20+
fetch-depth: 0
21+
- name: Setup Python ${{ inputs.python_version }}
22+
uses: ./.github/actions/python
23+
with:
24+
python_version: ${{ inputs.python_version }}
25+
- name: Cache Tox Directory for Tests
26+
uses: actions/cache@v3
27+
with:
28+
key: tox-${{ runner.os }}-${{ github.ref }}-${{ hashFiles('tox.ini', 'requirements.txt') }}-${{ inputs.python_version }}
29+
path: .tox
30+
- name: Set up memcached
31+
uses: niden/actions-memcached@v7
32+
- name: Test Notebooks
33+
run: tox -e notebook-tests
34+
continue-on-error: true

.github/workflows/run-tests-workflow.yaml

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,12 @@ name: Run Tests
33
on:
44
workflow_call:
55
inputs:
6-
tests_to_run:
7-
description: "Determines which tests to run using Tox. Should be one of: base, torch, notebooks"
6+
split_size:
7+
description: "Determines the number of groups into which the tests should be split"
8+
type: string
9+
default: 4
10+
group_number:
11+
description: "Determines which which group of tests to run. Can be 1, 2, ..., split_size"
812
type: string
913
required: true
1014
python_version:
@@ -29,17 +33,16 @@ jobs:
2933
- name: Cache Tox Directory for Tests
3034
uses: actions/cache@v3
3135
with:
32-
key: tox-${{ github.ref }}-${{ runner.os }}-${{ hashFiles('tox.ini', 'requirements.txt') }}
36+
key: tox-${{ runner.os }}-${{ github.ref }}-${{ hashFiles('tox.ini', 'requirements.txt') }}-${{ inputs.python_version }}
3337
path: .tox
3438
- name: Set up memcached
3539
uses: niden/actions-memcached@v7
36-
- name: Test Base Modules
37-
run: tox -e base
38-
if: inputs.tests_to_run == 'base'
39-
- name: Test Modules that rely on PyTorch
40-
run: tox -e torch
41-
if: inputs.tests_to_run == 'torch'
42-
- name: Test Notebooks
43-
run: tox -e notebooks
44-
if: inputs.tests_to_run == 'notebooks'
45-
continue-on-error: true
40+
- name: Test Group ${{ inputs.group_number }}
41+
run: tox -e tests -- --slow-tests --splits ${{ inputs.split_size }} --group ${{ inputs.group_number }}
42+
- name: Upload coverage reports to Codecov
43+
uses: codecov/codecov-action@v3
44+
with:
45+
token: ${{ secrets.CODECOV_TOKEN }}
46+
files: ./coverage.xml
47+
env_vars: OS,PYTHON
48+
verbose: false

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,3 +144,6 @@ data/models/
144144

145145
# Docs
146146
docs_build
147+
148+
# pytest-profiling
149+
prof/

0 commit comments

Comments
 (0)