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
55 changes: 4 additions & 51 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,64 +8,17 @@ on:
branches: ["main"]

jobs:
test:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: prefix-dev/[email protected]
with:
environments: default
cache: true

- name: Re-install local
run: |
pixi run rebuild

- name: Lint with ruff
run: |
pixi run lint
- name: Lint with cython-lint
run: |
pixi run cython-lint
- name: Format with black
run: |
pixi run fmt
- name: Type check with mypy
run: |
pixi run type
- name: Test with pytest
run: |
pixi run test
- name: Test with doctest
shell: bash
run: |
pixi run doc
CMD=doctest pixi run doc
- name: Test coverage
shell: bash
run: |
FMT=xml pixi run test-coverage
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
- name: Build SDist
run: |
pixi run build-sdist
- name: Store artifacts
uses: actions/upload-artifact@v4
with:
name: cibw-sdist
path: dist/*.tar.gz
call-test:
uses: ./.github/workflows/test.yml
secrets: inherit

build:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }}
needs: test
needs: call-test
steps:
- uses: actions/checkout@v4
- name: Build wheels
Expand Down
60 changes: 60 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Test

on:
workflow_call:
push:
branches: [ "main", "*.X" ]
pull_request:
branches: [ "main", "*.X" ]

jobs:
test:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: prefix-dev/[email protected]
with:
environments: default
cache: true

- name: Re-install local
run: |
pixi run rebuild

- name: Lint with ruff
run: |
pixi run lint
- name: Lint with cython-lint
run: |
pixi run cython-lint
- name: Format with black
run: |
pixi run fmt
- name: Type check with mypy
run: |
pixi run type
- name: Test with pytest
run: |
pixi run test
- name: Test with doctest
shell: bash
run: |
pixi run doc
CMD=doctest pixi run doc
- name: Test coverage
shell: bash
run: |
FMT=xml pixi run test-coverage
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
- name: Build SDist
run: |
pixi run build-sdist
- name: Store artifacts
uses: actions/upload-artifact@v4
with:
name: cibw-sdist
path: dist/*.tar.gz
2 changes: 1 addition & 1 deletion examples/plot_pruning.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ def _fastcan_pruning(
).fit(X)
atoms = kmeans.cluster_centers_
ids_fastcan = minibatch(
X.T, atoms.T, n_samples_to_select, batch_size=batch_size, tol=1e-6, verbose=0
X.T, atoms.T, n_samples_to_select, batch_size=batch_size, tol=1e-9, verbose=0
)
pruned_lr = LogisticRegression(max_iter=110).fit(X[ids_fastcan], y[ids_fastcan])
return pruned_lr.coef_, pruned_lr.intercept_
Expand Down
Loading
Loading