Skip to content

Commit c85d2af

Browse files
committed
Merge branch 'release/v0.10.0'
2 parents 0b8fec2 + 359c481 commit c85d2af

File tree

251 files changed

+34720
-6618
lines changed

Some content is hidden

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

251 files changed

+34720
-6618
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.9.2
2+
current_version = 0.10.0
33
commit = False
44
tag = False
55
allow_dirty = False

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@ notebooks/*.ipynb -linguist-detectable
22
*.png filter=lfs diff=lfs merge=lfs -text
33
*.svg filter=lfs diff=lfs merge=lfs -text
44
logo.svg -filter=lfs -diff=lfs -merge=lfs text
5+
*.pkl filter=lfs diff=lfs merge=lfs -text

.github/workflows/cleanup-caches.yaml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Delete caches for a PR after merging
2+
on:
3+
pull_request:
4+
types:
5+
- closed
6+
7+
jobs:
8+
cleanup:
9+
runs-on: ubuntu-22.04
10+
steps:
11+
- name: Cleanup
12+
run: |
13+
echo "Fetching list of cache keys for PR..."
14+
cacheKeysForPR=$(gh cache list --ref $BRANCH --limit 100 --json id --jq '.[].id')
15+
16+
## Setting this to not fail the workflow while deleting cache keys.
17+
set +e
18+
echo "Deleting caches..."
19+
for cacheKey in $cacheKeysForPR
20+
do
21+
gh cache delete $cacheKey
22+
done
23+
echo "Done"
24+
env:
25+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
26+
GH_REPO: ${{ github.repository }}
27+
BRANCH: refs/pull/${{ github.event.pull_request.number }}/merge

.github/workflows/main.yaml

Lines changed: 61 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -22,21 +22,21 @@ env:
2222
jobs:
2323
code-quality:
2424
name: Lint code and check type hints
25-
runs-on: ubuntu-latest
25+
runs-on: ubuntu-22.04
2626
steps:
2727
- uses: actions/checkout@v4
28-
- name: Setup Python 3.8
28+
- name: Setup Python 3.9
2929
uses: ./.github/actions/python
3030
with:
31-
python_version: 3.8
31+
python_version: 3.9
3232
- uses: actions/cache@v4
3333
with:
3434
path: ~/.cache/pre-commit
3535
key: pre-commit-${{ env.pythonLocation }}-${{ hashFiles('.pre-commit-config.yaml') }}
3636
- name: Lint Code
3737
run: |
3838
pre-commit run --all --show-diff-on-failure
39-
python build_scripts/run_pylint.py | (pylint-json2html -f jsonextended -o pylint.html)
39+
ruff check src/ --fix
4040
shell: bash
4141
- name: Generate mypy cache key
4242
id: generate-mypy-cache-key
@@ -52,16 +52,16 @@ jobs:
5252

5353
docs:
5454
name: Build Docs
55-
runs-on: ubuntu-latest
55+
runs-on: ubuntu-22.04
5656
steps:
5757
- uses: actions/checkout@v4
5858
with:
5959
fetch-depth: 0
6060
lfs: true
61-
- name: Setup Python 3.8
61+
- name: Setup Python 3.9
6262
uses: ./.github/actions/python
6363
with:
64-
python_version: 3.8
64+
python_version: 3.9
6565
- name: Install Pandoc
6666
uses: r-lib/actions/setup-pandoc@v2
6767
with:
@@ -73,10 +73,11 @@ jobs:
7373
strategy:
7474
fail-fast: false
7575
matrix:
76-
python_version: ["3.8", "3.9", "3.10", "3.11"]
76+
python_version: ["3.9", "3.10", "3.11", "3.12"]
7777
group_number: [1, 2, 3, 4]
7878
name: Run Tests - Python ${{ matrix.python_version }} - Group ${{ matrix.group_number }}
7979
uses: ./.github/workflows/run-tests-workflow.yaml
80+
secrets: inherit
8081
with:
8182
split_size: 4
8283
group_number: ${{ matrix.group_number }}
@@ -87,7 +88,7 @@ jobs:
8788
strategy:
8889
fail-fast: false
8990
matrix:
90-
python_version: ["3.8", "3.9", "3.10", "3.11"]
91+
python_version: ["3.9", "3.10", "3.11", "3.12"]
9192
group_number: [1, 2, 3, 4]
9293
name: Run Notebook tests - Python ${{ matrix.python_version }} - Group ${{ matrix.group_number }}
9394
uses: ./.github/workflows/run-notebook-tests-workflow.yaml
@@ -97,41 +98,79 @@ jobs:
9798
group_number: ${{ matrix.group_number }}
9899
needs: [code-quality]
99100

100-
push-docs-and-release-testpypi:
101-
name: Push Docs and maybe release Package to TestPyPI
102-
runs-on: ubuntu-latest
101+
legacy-tests:
102+
strategy:
103+
fail-fast: false
104+
matrix:
105+
python_version: [ "3.11" ]
106+
group_number: [ 1, 2, 3, 4 ]
107+
name: Run Legacy tests - Python ${{ matrix.python_version }} - Group ${{ matrix.group_number }}
108+
uses: ./.github/workflows/run-legacy-tests-workflow.yaml
109+
with:
110+
python_version: ${{ matrix.python_version }}
111+
split_size: 4
112+
group_number: ${{ matrix.group_number }}
113+
needs: [ code-quality ]
114+
115+
publish-docs:
116+
name: Publish documentation
117+
runs-on: ubuntu-22.04
103118
needs: [docs, group-tests, notebook-tests]
104-
if: ${{ github.ref == 'refs/heads/develop' }}
119+
if: ${{ github.ref == 'refs/heads/develop' && github.event_name != 'pull_request' }}
105120
concurrency:
106-
group: publish
121+
group: publish-docs
107122
steps:
108123
- uses: actions/checkout@v4
109124
with:
110125
fetch-depth: 0
111126
lfs: true
112-
- name: Setup Python 3.8
127+
- name: Setup Python 3.9
113128
uses: ./.github/actions/python
114129
with:
115-
python_version: 3.8
130+
python_version: 3.9
116131
- name: Install Pandoc
117132
uses: r-lib/actions/setup-pandoc@v2
118133
with:
119134
pandoc-version: ${{ env.PANDOC_VERSION }}
120-
- name: Deploy Docs
135+
- name: Deploy docs
121136
uses: ./.github/actions/deploy-docs
122137
with:
123138
version: devel
124139
alias: develop
125140
title: Development
126141
email: ${{ env.GITHUB_BOT_EMAIL }}
127142
username: ${{ env.GITHUB_BOT_USERNAME }}
128-
- name: Build and publish to TestPyPI
129-
env:
130-
TWINE_USERNAME: __token__
131-
TWINE_PASSWORD: ${{ secrets.TEST_PYPI_PASSWORD }}
143+
144+
145+
publish-testpypi:
146+
name: Publish package to TestPyPI
147+
runs-on: ubuntu-22.04
148+
needs: [group-tests, notebook-tests]
149+
if: ${{ github.ref == 'refs/heads/develop' && github.event_name != 'pull_request' }}
150+
concurrency:
151+
group: publish-testpypi
152+
permissions:
153+
id-token: write
154+
environment:
155+
name: testpypi
156+
steps:
157+
- uses: actions/checkout@v4
158+
with:
159+
fetch-depth: 0
160+
lfs: true
161+
- name: Setup Python 3.9
162+
uses: ./.github/actions/python
163+
with:
164+
python_version: 3.9
165+
- name: Bump version and build package
132166
run: |
133167
set -x
134168
export BUILD_NUMBER=$GITHUB_RUN_NUMBER
135169
bump2version --no-tag --no-commit --verbose --serialize '{major}.{minor}.{patch}.{release}{$BUILD_NUMBER}' boguspart
136170
python setup.py sdist bdist_wheel
137-
twine upload -r testpypi --verbose --non-interactive dist/*
171+
- name: Publish to TestPyPI
172+
uses: pypa/gh-action-pypi-publish@release/v1
173+
with:
174+
repository-url: https://test.pypi.org/legacy/
175+
print-hash: true
176+
verbose: true

.github/workflows/publish.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ env:
2222

2323
jobs:
2424
publish:
25-
runs-on: ubuntu-latest
25+
runs-on: ubuntu-22.04
2626
concurrency:
2727
group: publish
2828
steps:
@@ -44,10 +44,10 @@ jobs:
4444
run: |
4545
echo "Running action locally. Failing"
4646
exit -1
47-
- name: Setup Python 3.8
47+
- name: Setup Python 3.9
4848
uses: ./.github/actions/python
4949
with:
50-
python_version: 3.8
50+
python_version: 3.9
5151
- name: Get Current Version
5252
run: |
5353
export CURRENT_VERSION=$(python setup.py --version --quiet | awk -F. '{print $1"."$2"."$3}')
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: Run Legacy Tests
2+
3+
on:
4+
workflow_call:
5+
inputs:
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"
12+
type: string
13+
required: true
14+
python_version:
15+
description: "Determines which Python version to use"
16+
type: string
17+
required: true
18+
19+
20+
env:
21+
PY_COLORS: 1
22+
23+
jobs:
24+
run-legacy-tests:
25+
runs-on: ubuntu-22.04
26+
steps:
27+
- name: Free Disk Space (Ubuntu)
28+
uses: jlumbroso/free-disk-space@main
29+
with:
30+
large-packages: false
31+
docker-images: false
32+
- uses: actions/checkout@v4
33+
with:
34+
fetch-depth: 0
35+
- name: Setup Python ${{ inputs.python_version }}
36+
uses: ./.github/actions/python
37+
with:
38+
python_version: ${{ inputs.python_version }}
39+
- name: Cache Tox Directory for Tests
40+
uses: actions/cache@v4
41+
with:
42+
key: tox-${{ runner.os }}-${{ github.ref }}-${{ hashFiles('tox.ini', 'requirements.txt') }}-${{ inputs.python_version }}
43+
path: .tox
44+
- name: Set up memcached
45+
uses: niden/actions-memcached@v7
46+
- name: Test Group ${{ inputs.group_number }}
47+
run: tox -e legacy-tests -- --slow-tests --splits ${{ inputs.split_size }} --group ${{ inputs.group_number }}
48+
- name: Upload coverage reports to Codecov
49+
uses: codecov/codecov-action@v4
50+
with:
51+
token: ${{ secrets.CODECOV_TOKEN }}
52+
files: ./coverage.xml
53+
env_vars: OS,PYTHON
54+
verbose: false

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

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,17 @@ env:
2121

2222
jobs:
2323
run-tests:
24-
runs-on: ubuntu-latest
24+
runs-on: ubuntu-22.04
2525
steps:
26+
- name: Free Disk Space (Ubuntu)
27+
uses: jlumbroso/free-disk-space@main
28+
with:
29+
large-packages: true
30+
docker-images: false
2631
- uses: actions/checkout@v4
2732
with:
2833
fetch-depth: 0
34+
lfs: true
2935
- name: Setup Python ${{ inputs.python_version }}
3036
uses: ./.github/actions/python
3137
with:

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ env:
2222

2323
jobs:
2424
run-tests:
25-
runs-on: ubuntu-latest
25+
runs-on: ubuntu-22.04
2626
steps:
2727
- name: Free Disk Space (Ubuntu)
2828
uses: jlumbroso/free-disk-space@main

.github/workflows/stale.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55

66
jobs:
77
stale:
8-
runs-on: ubuntu-latest
8+
runs-on: ubuntu-22.04
99
steps:
1010
- uses: actions/stale@v9
1111
with:

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,7 @@ pylint.html
141141
runs/
142142
data/models/
143143
*.pkl
144+
!data/*.pkl
144145

145146
# Docs
146147
docs_build

0 commit comments

Comments
 (0)