Skip to content

Commit

Permalink
Merge pull request #2 from lochhh/update-docs
Browse files Browse the repository at this point in the history
Update docs
  • Loading branch information
jkbhagatio authored Nov 15, 2023
2 parents 7a0c33d + f6fa1c9 commit 8a16681
Show file tree
Hide file tree
Showing 80 changed files with 403 additions and 33,108 deletions.
103 changes: 103 additions & 0 deletions .github/workflows/docs_build_and_deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
name: Docs

# Generate the documentation on all merges to main, all pull requests, or by
# manual workflow dispatch. The build job can be used as a CI check that the
# docs still build successfully. The deploy job only runs when a tag is
# pushed and actually moves the generated html to the gh-pages branch
# (which triggers a GitHub pages deployment).
on:
push:
branches:
- main
tags:
- '*'
pull_request:
workflow_dispatch:

jobs:
build_sphinx_docs:
name: Build Sphinx Docs
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: false # Disable automatic checkout of all submodules

- name: Checkout public submodules # Skip aeon_experiments
run: |
git submodule sync
git submodule update --init aeon_acquisition
git submodule update --init aeon_analysis
git submodule update --init aeon_blog
git submodule update --init aeon_mecha
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: 3.11

- name: Upgrade pip
shell: bash
run: |
# install pip=>20.1 to use "pip cache dir"
python3 -m pip install --upgrade pip
- name: Get pip cache dir
shell: bash
id: pip-cache
run: echo "dir=$(pip cache dir)" >> $GITHUB_OUTPUT

- name: Cache dependencies
uses: actions/cache@v3
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install dependencies
shell: bash
run: python3 -m pip install -r ./requirements.txt

# temporarily disabled until we fix broken links
# - name: Check links
# shell: bash
# run: make linkcheck

# needs to have sphinx.ext.githubpages in conf.py extensions list
- name: Building documentation
shell: bash
run: make html

- name: Upload the content for deployment
uses: actions/upload-artifact@v3
with:
name: docs
path: ./docs/

deploy_sphinx_docs:
name: Deploy Sphinx Docs
needs: build_sphinx_docs
permissions:
contents: write
if: github.event_name == 'push' && github.ref_type == 'tag'
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Clear previous build if present
shell: bash
run: rm -rf ./docs/

- name: Download the content for deployment
uses: actions/download-artifact@v3
with:
name: docs
path: ./docs/

- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/html/
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Sphinx documentation
docs/
src/api/
src/api.rst
5 changes: 5 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,15 +1,20 @@
[submodule "aeon_mecha"]
path = aeon_mecha
url = https://github.com/SainsburyWellcomeCentre/aeon_mecha
branch = main
[submodule "aeon_analysis"]
path = aeon_analysis
url = https://github.com/SainsburyWellcomeCentre/aeon_analysis
branch = main
[submodule "aeon_blog"]
path = aeon_blog
url = https://github.com/SainsburyWellcomeCentre/aeon_blog
branch = main
[submodule "aeon_experiments"]
path = aeon_experiments
url = https://github.com/SainsburyWellcomeCentre/aeon_experiments
branch = main
[submodule "aeon_acquisition"]
path = aeon_acquisition
url = https://github.com/SainsburyWellcomeCentre/aeon_acquisition
branch = main
12 changes: 11 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,17 @@ help:

.PHONY: help Makefile

# Generate the API documentation
api.rst:
python make_api_doctree.py

# Remove all generated files
clean:
rm -rf ./docs
rm -f ./src/api.rst
rm -rf ./src/api

# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
%: Makefile api.rst
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
2 changes: 1 addition & 1 deletion aeon_acquisition
Submodule aeon_acquisition updated 179 files
2 changes: 1 addition & 1 deletion aeon_analysis
2 changes: 1 addition & 1 deletion aeon_blog
2 changes: 1 addition & 1 deletion aeon_experiments
Submodule aeon_experiments updated 40 files
+4 −1 .gitignore
+8 −0 CITATION.cff
+73 −4 README.md
+146 −55 bonsai/Bonsai.config
+1 −0 bonsai/NuGet.config
+11 −1 bonsai/setup.ps1
+20 −0 calibration/lightcycle.py
+9 −5 calibration/metadata.py
+17 −0 calibration/robocopy.py
+16 −0 hooks/post-checkout
+20 −0 hooks/post-merge
+5 −4 python/requirements.txt
+3 −8 python/setup.ps1
+0 −0 workflows/.gitignore
+ workflows/experiment0.1/ArenaMask_2021-06-01.png
+ workflows/experiment0.1/ArenaMask_2021-09-01.png
+0 −1,370 workflows/experiment0.1/Experiment0.1.bonsai
+0 −2,700 workflows/experiment0.1/Experiment0.1.bonsai.layout
+ workflows/experiment0.1/RobocopyAeon.xml
+ workflows/experiment0.2/ArenaMask_2022-02-02.png
+0 −348 workflows/experiment0.2/CalibrateArenaMask.bonsai
+0 −391 workflows/experiment0.2/CalibrateArenaMask.bonsai.layout
+0 −52 workflows/experiment0.2/ClockSynchronizer.xml
+0 −4,088 workflows/experiment0.2/Experiment0.2.bonsai
+0 −6,441 workflows/experiment0.2/Experiment0.2.bonsai.layout
+0 −191 workflows/experiment0.2/Extensions/ActiveRegion.bonsai
+0 −27 workflows/experiment0.2/Extensions/AlertGate.bonsai
+0 −98 workflows/experiment0.2/Extensions/DroppedFrames.bonsai
+0 −50 workflows/experiment0.2/Extensions/EnvironmentCondition.bonsai
+0 −55 workflows/experiment0.2/Extensions/FormatRegionVisits.bonsai
+0 −397 workflows/experiment0.2/Extensions/LinearDepletion.bonsai
+0 −133 workflows/experiment0.2/Extensions/PelletMissed.bonsai
+0 −57 workflows/experiment0.2/Extensions/PelletMonitor.bonsai
+0 −85 workflows/experiment0.2/Extensions/PersistentCounter.bonsai
+0 −37 workflows/experiment0.2/Extensions/RepeatEverySubject.bonsai
+0 −59 workflows/experiment0.2/RobocopyAeon.xml
+0 −50 workflows/experiment0.2/Synchronize.bonsai
+0 −79 workflows/experiment0.2/Synchronize.bonsai.layout
+0 −452 workflows/experiment0/Experiment0.bonsai
+0 −776 workflows/experiment0/Experiment0.bonsai.layout
2 changes: 1 addition & 1 deletion aeon_mecha
Submodule aeon_mecha updated 142 files
4 changes: 0 additions & 4 deletions docs/.buildinfo

This file was deleted.

Binary file removed docs/.doctrees/environment.pickle
Binary file not shown.
Binary file removed docs/.doctrees/index.doctree
Binary file not shown.
Binary file removed docs/.doctrees/test.doctree
Binary file not shown.
Empty file removed docs/.nojekyll
Empty file.
22 changes: 0 additions & 22 deletions docs/_sources/index.rst.txt

This file was deleted.

17 changes: 0 additions & 17 deletions docs/_sources/test.rst.txt

This file was deleted.

Loading

0 comments on commit 8a16681

Please sign in to comment.