Use proper NDI API for binary file access in tutorials #32
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python 3.12 | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - name: Install linting tools | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install ruff black | |
| - name: Check formatting with black | |
| run: black --check src/ tests/ | |
| - name: Lint with ruff | |
| run: ruff check src/ tests/ | |
| test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: ["3.10", "3.11", "3.12"] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install VH-Lab dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| # Clone DID-python and its deps (its pyproject.toml has a packaging | |
| # bug that misses subpackages — we use PYTHONPATH instead of pip) | |
| git clone https://github.com/VH-Lab/DID-python.git /tmp/DID-python | |
| pip install numpy pandas portalocker networkx matplotlib | |
| # vhlab-toolbox-python has no pyproject.toml; use PYTHONPATH | |
| git clone https://github.com/VH-Lab/vhlab-toolbox-python.git /tmp/vhlab-toolbox-python | |
| - name: Install NDI-python | |
| run: | | |
| pip install -e ".[dev]" --no-deps | |
| pip install numpy networkx jsonschema requests pytest pytest-cov scipy openminds | |
| - name: Run tests with coverage | |
| env: | |
| PYTHONPATH: /tmp/DID-python/src:/tmp/vhlab-toolbox-python | |
| run: | | |
| pytest tests/ -v --tb=short --cov=src/ndi --cov-report=term-missing |