Skip to content

Update docs

Update docs #163

Workflow file for this run

name: Tests
on:
push:
branches: [ main, develop ]
pull_request:
branches: [ main, develop ]
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
python-version: ["3.10"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Cache pip dependencies
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements*.txt', '**/pyproject.toml') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install system dependencies (Ubuntu)
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y xvfb
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
# Install scientific stack first
pip install wheel setuptools numpy scipy matplotlib plotly dash
# Install eelbrain separately
pip install eelbrain --no-build-isolation || pip install eelbrain
# Install our package with dev dependencies
pip install -e ".[dev]"
- name: Test package installation
run: |
# Test that the package can be imported after installation
python -c "from liveneuro import LiveNeuro, create_sample_brain_data; print('Package imports successful!')"
- name: Cache MNE datasets
uses: actions/cache@v4
with:
path: ~/mne_data
key: mne-data
- name: Run fast tests (Linux)
if: runner.os == 'Linux'
run: |
# Use xvfb for headless testing on Linux, skip slow tests for CI speed
xvfb-run -a pytest tests/ -v --cov=src --cov-report=xml --cov-report=term-missing -m "not slow" --durations=10
- name: Run fast tests (Windows/macOS)
if: runner.os != 'Linux'
run: |
# Skip slow tests for CI speed
pytest tests/ -v --cov=src --cov-report=xml --cov-report=term-missing -m "not slow" --durations=10
- name: Upload coverage reports to Codecov
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.10'
uses: codecov/codecov-action@v4
with:
file: ./coverage.xml
flags: unittests
name: codecov-umbrella
fail_ci_if_error: false
package:
runs-on: ubuntu-latest
needs: test
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Install package build tools
run: |
python -m pip install --upgrade pip
python -m pip install build twine
- name: Build package
run: |
python -m build
- name: Check package metadata
run: |
twine check dist/*