Skip to content

Commit

Permalink
CI: various fixes
Browse files Browse the repository at this point in the history
- fix deploy docs workflow
- add flybrains to test requirements
- download required transform; note: the transform is a heavily
  downsampled version of the real thing
  • Loading branch information
schlegelp committed Sep 5, 2024
1 parent d405fdf commit d15e877
Show file tree
Hide file tree
Showing 5 changed files with 60 additions and 21 deletions.
53 changes: 53 additions & 0 deletions .github/workflows/build-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Docs

permissions:
contents: write

on:
push:
branches:
- main

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.10
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Install system libraries
run: |
sudo apt-get update -y -qq
sudo apt-get install -y libdbus-1-3 libxkbcommon-x11-0 libxcb-icccm4 \
libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 \
libxcb-xinerama0 libxcb-xinput0 graphviz graphviz-dev \
libegl1-mesa libgl1-mesa-dri libxcb-xfixes0-dev mesa-vulkan-drivers \
libxcb-cursor0
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
python -m pip install pathos pygraphviz neuron cloud-volume k3d scikit-image open3d
python -m pip install -e .[test-notebook,all,docs,flybrains,cloud-volume]
- name: Download test data
run: |
chmod +x download_test_data.sh
./download_test_data.sh
- name: Download downsampled test transform
run: |
mkdir -p -- $HOME/flybrain-data
curl -o $HOME/flybrain-data/JRC2018F_JRCFIB2018F.h5 https://flyem.mrc-lmb.cam.ac.uk/flyconnectome/misc/JRC2018F_JRCFIB2018F.h5
- name: Build and deploy docs
uses: coactions/setup-xvfb@v1
env:
NEUPRINT_APPLICATION_CREDENTIALS: ${{ secrets.neuprint }}
INSECT_BRAIN_DB_USER: ${{ secrets.insect_brain_db_user }}
INSECT_BRAIN_DB_PASSWORD: ${{ secrets.insect_brain_db_password }}
CAVE_SECRET: ${{ secrets.cave_secret }}
NAVIS_PLOT3D_BACKEND: plotly
QT_QPA_PLATFORM: offscreen
with:
run: |
python -c "import os;from caveclient import CAVEclient;client=CAVEclient();client.auth.save_token(os.getenv('CAVE_SECRET'))"
mkdocs gh-deploy --force
21 changes: 0 additions & 21 deletions .github/workflows/docs.yml

This file was deleted.

4 changes: 4 additions & 0 deletions .github/workflows/test-tutorials.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ jobs:
run: |
chmod +x download_test_data.sh
./download_test_data.sh
- name: Download downsampled test transform
run: |
mkdir -p -- $HOME/flybrain-data
curl -o $HOME/flybrain-data/JRC2018F_JRCFIB2018F.h5 https://flyem.mrc-lmb.cam.ac.uk/flyconnectome/misc/JRC2018F_JRCFIB2018F.h5
- name: Run tutorials
uses: coactions/setup-xvfb@v1
env:
Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ jupyter
neuprint-python
caveclient
cloud-volume
flybrains
Shapely>=1.6.0

#extra: dev
Expand Down
2 changes: 2 additions & 0 deletions tests/test_tutorials.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
process before the current process has finished its bootstrapping phase." error which typically
means that the script has to be run in a `if __name__ == "__main__":` block.
Set `capture_output=True` to see the error message.
- the MICrONS tutorial occasionally fails because the CAVE backend throws an error
(e.g. during the materialization)
"""

import subprocess
Expand Down

0 comments on commit d15e877

Please sign in to comment.