Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MAINT] run examples via GHA #14

Merged
merged 3 commits into from
Feb 16, 2024
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
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
Loading