Skip to content
Draft
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
53 changes: 34 additions & 19 deletions .github/workflows/build_docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
push:
branches:
- main
- dev

# cancel job if a new push to main occurs while running
concurrency:
Expand All @@ -16,41 +17,55 @@ jobs:
defaults:
run:
shell: bash -el {0}
strategy:
max-parallel: 5

steps:
- uses: actions/checkout@v4
- name: Checkout git repository
uses: actions/checkout@v4

- name: Setup headless display
uses: pyvista/setup-headless-display-action@v2
uses: pyvista/setup-headless-display-action@v3

- name: Create conda environment
uses: mamba-org/setup-micromamba@v1
- name: Setup Miniforge
uses: conda-incubator/setup-miniconda@v3
with:
environment-file: environment_dev.yml
micromamba-version: 'latest'
cache-environment: true
miniforge-version: latest
activate-environment: cedalion

- name: Conda info
run: conda info
- name: Get Date
id: get-date
run: echo "today=$(/bin/date -u '+%Y%m%d')" >> $GITHUB_OUTPUT
shell: bash

- name: Cache Conda env
uses: actions/cache@v4
with:
path: ${{ env.CONDA }}/envs
key:
conda-${{ runner.os }}--${{ runner.arch }}--${{
steps.get-date.outputs.today }}-${{
hashFiles('environment_dev.yml') }}-${{ env.CACHE_NUMBER }}
env:
# Increase this value to reset cache if environment_dev.yml has not changed
CACHE_NUMBER: 0
id: cache

- name: Update environment
run: conda env update -n cedalion -f environment_dev.yml
if: steps.cache.outputs.cache-hit != 'true'

- name: Install cedalion
run: |
python -m pip install -e . --no-deps --force-reinstall
run: python -m pip install -e . --no-deps --force-reinstall

- name: Install nirfaster
run: |
bash install_nirfaster.sh CPU
run: bash install_nirfaster.sh CPU
shell: bash

- name: Building docs
run: |
./scripts/build_docs.sh docs
run: ./scripts/build_docs.sh docs

- name: Save website as an artifact
uses: actions/upload-artifact@v4
with:
name: docs
name: docs-${{ github.ref_name }}
path: docs/_build/html
retention-days: 14
retention-days: 2
43 changes: 31 additions & 12 deletions .github/workflows/run_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,24 +13,43 @@ jobs:
shell: bash -l {0}

steps:
- uses: actions/checkout@v4
- name: Checkout git repository
uses: actions/checkout@v4

- name: Create conda environment
uses: mamba-org/setup-micromamba@v1
- name: Setup Miniforge
uses: conda-incubator/setup-miniconda@v3
with:
environment-file: environment_dev.yml
micromamba-version: 'latest'
cache-environment: true
miniforge-version: latest
activate-environment: cedalion

- name: Get Date
id: get-date
run: echo "today=$(/bin/date -u '+%Y%m%d')" >> $GITHUB_OUTPUT
shell: bash

- name: Cache Conda env
uses: actions/cache@v4
with:
path: ${{ env.CONDA }}/envs
key:
conda-${{ runner.os }}--${{ runner.arch }}--${{
steps.get-date.outputs.today }}-${{
hashFiles('environment_dev.yml') }}-${{ env.CACHE_NUMBER }}
env:
# Increase this value to reset cache if environment_dev.yml has not changed
CACHE_NUMBER: 0
id: cache

- name: Update environment
run: conda env update -n cedalion -f environment_dev.yml
if: steps.cache.outputs.cache-hit != 'true'

- name: Install cedalion
run: |
python -m pip install -e . --no-deps --force-reinstall
run: python -m pip install -e . --no-deps --force-reinstall

- name: Install nirfaster
run: |
bash install_nirfaster.sh CPU
run: bash install_nirfaster.sh CPU
shell: bash

- name: Running Tests
run: |
python -m pytest --verbose
run: python -m pytest --verbose
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -167,9 +167,11 @@ src/cedalion/_version.py

# rendered example notebooks
docs/examples/*.ipynb
docs/examples/*/*.ipynb

# API documentation from sphinx-apidoc
docs/api/*
_autosummary*/

# vscode settings
.vscode/
Expand Down
12 changes: 7 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,13 @@ repos:
# Ruff
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.5.4
rev: v0.7.0
hooks:
# Run the linter.
- id: ruff
files: ^src/cedalion/
# Run the formatter.
#- id: ruff-format
# files: ^src/cedalion/
- repo: https://github.com/kynan/nbstripout
rev: 0.7.1
hooks:
- id: nbstripout
files: ^examples/

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ multimodal fNIRS signals.

The [documentation](https://doc.ibs.tu-berlin.de/cedalion/doc/dev) contains
[installation instructions](https://doc.ibs.tu-berlin.de/cedalion/doc/dev/getting_started/installation.html) as
well as several [example notebooks](https://doc.ibs.tu-berlin.de/cedalion/doc/dev/examples/index.html)
well as several [example notebooks](https://doc.ibs.tu-berlin.de/cedalion/doc/dev/examples.html)
that illustrate the functionality of the toolbox.
For discussions and help you can visit the [cedalion forum on openfnirs.org](https://openfnirs.org/community/cedalion/)

Expand Down
Loading
Loading