diff --git a/.github/codespell_ignore_words.txt b/.github/codespell_ignore_words.txt new file mode 100644 index 0000000..ae9682d --- /dev/null +++ b/.github/codespell_ignore_words.txt @@ -0,0 +1,8 @@ +ons +ptd +ue +morg +nam +bu +nd +te diff --git a/.github/workflows/run_examples.yml b/.github/workflows/run_examples.yml new file mode 100644 index 0000000..e052da7 --- /dev/null +++ b/.github/workflows/run_examples.yml @@ -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 }} diff --git a/neurodesign/__init__.py b/neurodesign/__init__.py index eb6a185..2f901e7 100644 --- a/neurodesign/__init__.py +++ b/neurodesign/__init__.py @@ -4,3 +4,11 @@ .. moduleauthor:: Joke Durnez """ + +from neurodesign.classes import design, experiment, optimisation + +__all__ = [ + "design", + "experiment", + "optimisation", +] diff --git a/pyproject.toml b/pyproject.toml index 989120d..4d2bc69 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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]