Skip to content

Commit

Permalink
[MAINT] update workflow and fix example (#905)
Browse files Browse the repository at this point in the history
update workflow and fix example
  • Loading branch information
jdkent authored Sep 11, 2024
1 parent 2c9b52a commit 5fb7ae1
Show file tree
Hide file tree
Showing 2 changed files with 68 additions and 60 deletions.
126 changes: 67 additions & 59 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
- "main"
pull_request:
branches:
- '*'
- "*"

concurrency:
group: testing-${{ github.ref }}
Expand All @@ -26,37 +26,37 @@ jobs:
- id: result_step
uses: mstachniuk/ci-skip@master
with:
commit-filter: '[skip ci];[ci skip];[skip github]'
commit-filter-separator: ';'
commit-filter: "[skip ci];[ci skip];[skip github]"
commit-filter-separator: ";"

run_unit_tests:
name: Unit tests
needs: check_skip
if: ${{ needs.check_skip.outputs.skip == 'false' }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest", "macos-latest"]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
fail-fast: false
matrix:
os: ["ubuntu-latest", "macos-latest"]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]

defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v2
- name: 'Set up python'
- name: "Set up python"
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: 'Install NiMARE'
python-version: ${{ matrix.python-version }}
- name: "Install NiMARE"
shell: bash {0}
run: pip install -e .[tests,cbmr]
- name: 'Run tests'
- name: "Run tests"
shell: bash {0}
run: make unittest
- name: Upload artifacts
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: unit_${{ matrix.os }}_${{ matrix.python-version }}
path: coverage.xml
Expand All @@ -68,27 +68,27 @@ jobs:
if: ${{ needs.check_skip.outputs.skip == 'false' }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest"]
python-version: ["3.8"]
fail-fast: false
matrix:
os: ["ubuntu-latest"]
python-version: ["3.8"]
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v2
- name: 'Set up python'
- name: "Set up python"
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: 'Install NiMARE'
python-version: 3.8
- name: "Install NiMARE"
shell: bash {0}
run: pip install -e .[minimum,tests,cbmr]
- name: 'Run tests'
- name: "Run tests"
shell: bash {0}
run: make unittest
- name: Upload artifacts
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: unit_minimum
path: coverage.xml
Expand All @@ -100,27 +100,27 @@ jobs:
if: ${{ needs.check_skip.outputs.skip == 'false' }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest"]
python-version: ["3.8"]
fail-fast: false
matrix:
os: ["ubuntu-latest"]
python-version: ["3.8"]
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v2
- name: 'Set up python'
- name: "Set up python"
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: 'Install NiMARE'
python-version: ${{ matrix.python-version }}
- name: "Install NiMARE"
shell: bash {0}
run: pip install -e .[tests,cbmr]
- name: 'Run tests'
- name: "Run tests"
shell: bash {0}
run: make test_performance_estimators
- name: Upload artifacts
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: performance_estimator
path: coverage.xml
Expand All @@ -132,27 +132,27 @@ jobs:
if: ${{ needs.check_skip.outputs.skip == 'false' }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest"]
python-version: ["3.8"]
fail-fast: false
matrix:
os: ["ubuntu-latest"]
python-version: ["3.8"]
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v2
- name: 'Set up python'
- name: "Set up python"
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: 'Install NiMARE'
python-version: ${{ matrix.python-version }}
- name: "Install NiMARE"
shell: bash {0}
run: pip install -e .[tests,cbmr]
- name: 'Run tests'
- name: "Run tests"
shell: bash {0}
run: make test_performance_correctors
- name: Upload artifacts
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: performance_corrector
path: coverage.xml
Expand All @@ -164,27 +164,27 @@ jobs:
if: ${{ needs.check_skip.outputs.skip == 'false' }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest"]
python-version: ["3.8"]
fail-fast: false
matrix:
os: ["ubuntu-latest"]
python-version: ["3.8"]
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v2
- name: 'Set up python'
- name: "Set up python"
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: 'Install NiMARE'
python-version: ${{ matrix.python-version }}
- name: "Install NiMARE"
shell: bash {0}
run: pip install -e .[tests,cbmr]
- name: 'Run tests'
- name: "Run tests"
shell: bash {0}
run: make test_performance_smoke
- name: Upload artifacts
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: performance_smoke
path: coverage.xml
Expand All @@ -196,41 +196,49 @@ jobs:
if: ${{ needs.check_skip.outputs.skip == 'false' }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest"]
python-version: ["3.8"]
fail-fast: false
matrix:
os: ["ubuntu-latest"]
python-version: ["3.8"]
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v2
- name: 'Set up python'
- name: "Set up python"
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: 'Install NiMARE'
python-version: ${{ matrix.python-version }}
- name: "Install NiMARE"
shell: bash {0}
run: pip install -e .[tests]
- name: 'Run tests'
- name: "Run tests"
shell: bash {0}
run: make test_cbmr_importerror
- name: Upload artifacts
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: cbmr_importerror
path: coverage.xml
if: success()

upload_to_codecov:
name: Upload coverage
needs: [run_unit_tests,run_unit_tests_with_minimum_dependencies,test_performance_estimators,test_performance_correctors,test_performance_smoke,test_cbmr_importerror]
needs:
[
run_unit_tests,
run_unit_tests_with_minimum_dependencies,
test_performance_estimators,
test_performance_correctors,
test_performance_smoke,
test_cbmr_importerror,
]
runs-on: "ubuntu-latest"
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Download artifacts
uses: actions/download-artifact@v2
uses: actions/download-artifact@v4
- name: Upload to CodeCov
uses: codecov/codecov-action@v4
with:
Expand Down
2 changes: 1 addition & 1 deletion examples/02_meta-analyses/12_plot_ibma_workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
###############################################################################
# Contribution table
# ``````````````````````````````````````````````````````````````````````````````
result.tables["z_corr-FDR_method-indep_diag-Jackknife_tab-counts_tail-positive"]
result.tables["z_corr-FDR_method-indep_diag-Jackknife_tab-counts"]

###############################################################################
# Report
Expand Down

0 comments on commit 5fb7ae1

Please sign in to comment.