Skip to content

Authors complete

Authors complete #115

Workflow file for this run

name: test-env
on:
push:
branches: [ "main", "dev" ]
pull_request:
branches: [ "main", "dev" ]
workflow_dispatch:
jobs:
test-env:
runs-on:
group: LargerInstance
strategy:
fail-fast: false
matrix:
python-version: ['3.10', '3.11', '3.12']
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
fetch-tags: true
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install system build tools
run: |
if command -v sudo >/dev/null 2>&1; then
sudo apt-get update
sudo apt-get install -y g++
else
apt-get update
apt-get install -y g++
fi
- name: Create isolated virtual environment
run: |
python -m venv .venv
echo "$GITHUB_WORKSPACE/.venv/bin" >> $GITHUB_PATH
- name: Install environment from repo files (pip-only)
# requirements-ci.txt is generated by:
# uv export --frozen --extra dev --no-hashes --no-editable --no-emit-project -o requirements-ci.txt
# Re-run that command after any change to pyproject.toml / uv.lock.
run: |
python -m pip install --upgrade pip setuptools wheel
python -m pip install -r requirements-ci.txt
python -m pip install markupsafe==2.0.1
python -m pip install -e . --no-deps
python -m pip install -U mystmd
- name: Verify environment health
run: |
python -m pip check
python - <<'PY'
import importlib
modules = [
"databook_utils",
"numpy",
"pandas",
"scipy",
"pynwb",
"nway",
]
missing = []
for module_name in modules:
try:
importlib.import_module(module_name)
print(f"OK: {module_name}")
except Exception as exc:
print(f"FAIL: {module_name} -> {exc}")
missing.append(module_name)
if missing:
raise SystemExit(f"Missing/broken imports: {', '.join(missing)}")
PY
- name: Install docs JS dependencies
run: npm install --prefix ./docs
- name: Build MyST docs
working-directory: ./docs
env:
HOST: "127.0.0.1"
BASE_URL: /${{ github.event.repository.name }}
run: |
myst clean --all
myst build --html
- name: Print environment snapshot
run: python -m pip freeze