Skip to content

Commit

Permalink
Merge pull request #14 from Remi-Gau/example_ci
Browse files Browse the repository at this point in the history
[MAINT] run examples via GHA
  • Loading branch information
Remi-Gau authored Feb 16, 2024
2 parents 1a2b14b + 2bf9175 commit e18cd8d
Show file tree
Hide file tree
Showing 4 changed files with 54 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .github/codespell_ignore_words.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
ons
ptd
ue
morg
nam
bu
nd
te
37 changes: 37 additions & 0 deletions .github/workflows/run_examples.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
---
name: Run examples

on:
push:
branches:
- master
pull_request:
branches:
- '*'

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
run_examples:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
example: [comparedesigns.py, comparison_neurodesign.py, JSS_example.py, optimisation.py]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
allow-prereleases: false
- name: Install neurodesign
run: python -m pip install .
- name: Run example ${{ matrix.example }}
run: python examples/${{ matrix.example }}
8 changes: 8 additions & 0 deletions neurodesign/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,11 @@
.. moduleauthor:: Joke Durnez <[email protected]>
"""

from neurodesign.classes import design, experiment, optimisation

__all__ = [
"design",
"experiment",
"optimisation",
]
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
line-length = 100

[tool.codespell]
ignore-words = ".github/codespell_ignore_words.txt"
skip = "examples/comparison_neurodesign.html,examples/comparison_neurodesign.ipynb"

[tool.isort]
Expand Down

0 comments on commit e18cd8d

Please sign in to comment.