Skip to content
Merged
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
68 changes: 68 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
name: release workflow with tests

on:
push:
tags:
- 'v*'
release:
types:
- published
jobs:
tests:
name: "py${{ matrix.python-version }} / ${{ matrix.os }}"
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
python-version: ["3.11", "3.12", "3.13"]
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- name: Clone the repository
uses: actions/checkout@v4
- name: Install dependencies
shell: bash {0}
run: |
if [ "${{ matrix.os }}" = "windows-latest" ]; then
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
export PATH="/c/Users/runneradmin/.local/bin:$PATH"
else
curl -LsSf https://astral.sh/uv/install.sh | sh
fi
uv python install ${{ matrix.python-version }}
uv venv --python ${{ matrix.python-version }}
if [ "${{ matrix.os }}" = "windows-latest" ]; then
.venv\\Scripts\\activate
else
source .venv/bin/activate
fi
uv pip install -e .[tests]
- name: Test with pytest
shell: bash {0}
run: |
uv run pytest --cov=skpcp --cov-branch --cov-report=term-missing --cov-report=xml:coverage.xml -vv test


# build wheel and deploy to pypi
deploy:
# Needs tests to be run successfully before deploying
needs: [tests]
runs-on: ubuntu-latest
# Run only if there is a published release
if: github.event_name == 'release' && github.event.action == 'published'
steps:
- uses: actions/checkout@v4
- name: Install project dependencies
run: |
curl -LsSf https://astral.sh/uv/install.sh | sh
uv python install 3.11
uv venv --python 3.11
source .venv/bin/activate
uv pip install -e .
- name: Build package
run: |
uv build
- name: Publish package
env:
PYPI_API_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
run: |
uv publish --token $PYPI_API_TOKEN
7 changes: 3 additions & 4 deletions docs/examples/examples.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 1"
"## Example 1: Recovery of low-rank image corrupted by sparse noise"
]
},
{
Expand Down Expand Up @@ -106,7 +106,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 2"
"## Example 2: Recovery of low-rank image corrupted by sparse noise"
]
},
{
Expand All @@ -126,7 +126,6 @@
}
],
"source": [
"# generate low rank synthetic data\n",
"NROWS, NCOLS = 100, 150\n",
"NUM_GROUPS = 6\n",
"P_MISSING = 0.1\n",
Expand Down Expand Up @@ -183,7 +182,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example 3"
"## Example 3: Recovery of time series data corrupted by random spikes"
]
},
{
Expand Down
Loading