Skip to content

Commit

Permalink
Merge branch 'release/v0.9.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
mdbenito committed Apr 12, 2024
2 parents ac4ac7f + 4514e0a commit 786458c
Show file tree
Hide file tree
Showing 139 changed files with 9,596 additions and 72,310 deletions.
2 changes: 1 addition & 1 deletion .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 0.8.1
current_version = 0.9.0
commit = False
tag = False
allow_dirty = False
Expand Down
3 changes: 3 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
notebooks/*.ipynb -linguist-detectable
*.png filter=lfs diff=lfs merge=lfs -text
*.svg filter=lfs diff=lfs merge=lfs -text
logo.svg -filter=lfs -diff=lfs -merge=lfs text
2 changes: 1 addition & 1 deletion .github/actions/python/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ runs:
using: "composite"
steps:
- name: Set up Python ${{ inputs.python_version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ inputs.python_version }}
cache: 'pip'
Expand Down
28 changes: 20 additions & 8 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ jobs:
name: Lint code and check type hints
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Setup Python 3.8
uses: ./.github/actions/python
with:
python_version: 3.8
- uses: actions/cache@v3
- uses: actions/cache@v4
with:
path: ~/.cache/pre-commit
key: pre-commit-${{ env.pythonLocation }}-${{ hashFiles('.pre-commit-config.yaml') }}
Expand All @@ -43,19 +43,21 @@ jobs:
run: |
MYPY_VERSION=$(mypy --version | sed 's/[^0-9.]*\([0-9.]*\).*/\1/')
echo "key=mypy-$MYPY_VERSION-${{ env.pythonLocation }}" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
- uses: actions/cache@v4
with:
path: .mypy_cache
key: ${{ steps.generate-mypy-cache-key.outputs.key }}
- name: Check Type Hints
run: mypy src/

docs:
name: Build Docs
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
lfs: true
- name: Setup Python 3.8
uses: ./.github/actions/python
with:
Expand All @@ -66,11 +68,12 @@ jobs:
pandoc-version: ${{ env.PANDOC_VERSION }}
- name: Build Docs
run: mkdocs build

group-tests:
strategy:
fail-fast: false
matrix:
python_version: ["3.8", "3.9", "3.10"]
python_version: ["3.8", "3.9", "3.10", "3.11"]
group_number: [1, 2, 3, 4]
name: Run Tests - Python ${{ matrix.python_version }} - Group ${{ matrix.group_number }}
uses: ./.github/workflows/run-tests-workflow.yaml
Expand All @@ -79,15 +82,21 @@ jobs:
group_number: ${{ matrix.group_number }}
python_version: ${{ matrix.python_version }}
needs: [code-quality]

notebook-tests:
strategy:
fail-fast: false
matrix:
python_version: ["3.8", "3.9", "3.10"]
name: Run Notebook tests - Python ${{ matrix.python_version }}
python_version: ["3.8", "3.9", "3.10", "3.11"]
group_number: [1, 2, 3, 4]
name: Run Notebook tests - Python ${{ matrix.python_version }} - Group ${{ matrix.group_number }}
uses: ./.github/workflows/run-notebook-tests-workflow.yaml
with:
python_version: ${{ matrix.python_version }}
split_size: 4
group_number: ${{ matrix.group_number }}
needs: [code-quality]

push-docs-and-release-testpypi:
name: Push Docs and maybe release Package to TestPyPI
runs-on: ubuntu-latest
Expand All @@ -96,7 +105,10 @@ jobs:
concurrency:
group: publish
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
lfs: true
- name: Setup Python 3.8
uses: ./.github/actions/python
with:
Expand Down
11 changes: 8 additions & 3 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Publish Python Package to PyPI
name: Publish package and docs

on:
release:
Expand Down Expand Up @@ -28,12 +28,17 @@ jobs:
steps:
- name: Checking out last commit in release
if: ${{ github.event_name != 'workflow_dispatch' }}
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
lfs: true
fetch-depth: 0
- name: Checking out last commit for tag ${{ inputs.tag_name }}
uses: actions/checkout@v3
if: ${{ github.event_name == 'workflow_dispatch' }}
uses: actions/checkout@v4
with:
ref: ${{ inputs.tag_name }}
lfs: true
fetch-depth: 0
- name: Fail if running locally
if: ${{ env.ACT }} # skip during local actions testing
run: |
Expand Down
16 changes: 12 additions & 4 deletions .github/workflows/run-notebook-tests-workflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@ name: Run Notebook Tests
on:
workflow_call:
inputs:
split_size:
description: "Determines the number of groups into which the tests should be split"
type: string
default: 4
group_number:
description: "Determines which which group of tests to run. Can be 1, 2, ..., split_size"
type: string
required: true
python_version:
description: "Determines which Python version to use"
type: string
Expand All @@ -15,20 +23,20 @@ jobs:
run-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Python ${{ inputs.python_version }}
uses: ./.github/actions/python
with:
python_version: ${{ inputs.python_version }}
- name: Cache Tox Directory for Tests
uses: actions/cache@v3
uses: actions/cache@v4
with:
key: tox-${{ runner.os }}-${{ github.ref }}-${{ hashFiles('tox.ini', 'requirements.txt') }}-${{ inputs.python_version }}
path: .tox
- name: Set up memcached
uses: niden/actions-memcached@v7
- name: Test Notebooks
run: tox -e notebook-tests
continue-on-error: true
run: tox -e notebook-tests -- --durations-path .notebook_test_durations --splits ${{ inputs.split_size }} --group ${{ inputs.group_number }}

12 changes: 9 additions & 3 deletions .github/workflows/run-tests-workflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,22 +16,28 @@ on:
type: string
required: true


env:
PY_COLORS: 1

jobs:
run-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Free Disk Space (Ubuntu)
uses: jlumbroso/free-disk-space@main
with:
large-packages: false
docker-images: false
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Python ${{ inputs.python_version }}
uses: ./.github/actions/python
with:
python_version: ${{ inputs.python_version }}
- name: Cache Tox Directory for Tests
uses: actions/cache@v3
uses: actions/cache@v4
with:
key: tox-${{ runner.os }}-${{ github.ref }}-${{ hashFiles('tox.ini', 'requirements.txt') }}-${{ inputs.python_version }}
path: .tox
Expand All @@ -40,7 +46,7 @@ jobs:
- name: Test Group ${{ inputs.group_number }}
run: tox -e tests -- --slow-tests --splits ${{ inputs.split_size }} --group ${{ inputs.group_number }}
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage.xml
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/stale.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v6
- uses: actions/stale@v9
with:
only-labels: 'awaiting-reply'
days-before-stale: 30
Expand Down
12 changes: 12 additions & 0 deletions .notebook_test_durations
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"notebooks/data_oob.ipynb::": 14.514983271001256,
"notebooks/influence_imagenet.ipynb::": 15.937124550999215,
"notebooks/influence_sentiment_analysis.ipynb::": 26.479645616000198,
"notebooks/influence_synthetic.ipynb::": 6.61773010700017,
"notebooks/influence_wine.ipynb::": 16.312171267998565,
"notebooks/least_core_basic.ipynb::": 14.375480750999486,
"notebooks/msr_banzhaf_digits.ipynb::": 106.6507187110019,
"notebooks/shapley_basic_spotify.ipynb::": 15.657225806997303,
"notebooks/shapley_knn_flowers.ipynb::": 3.9943819290019746,
"notebooks/shapley_utility_learning.ipynb::": 25.939783253001224
}
Loading

0 comments on commit 786458c

Please sign in to comment.