Skip to content

Commit b429559

Browse files
authored
Merge pull request #5 from SFI-Visual-Intelligence/documentation
Added sphinx documentation with sample text, resolves #3
2 parents 2ab60a5 + 116a058 commit b429559

File tree

6 files changed

+91
-0
lines changed

6 files changed

+91
-0
lines changed

.github/workflows/sphinx.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Build documentation
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
permissions:
10+
contents: write
11+
12+
jobs:
13+
docs:
14+
runs-on: ubuntu-24.04
15+
16+
steps:
17+
- name: Checkout
18+
uses: actions/checkout@v4
19+
20+
- uses: mamba-org/setup-micromamba@v1
21+
with:
22+
micromamba-version: '2.0.5-0' # any version from https://github.com/mamba-org/micromamba-releases
23+
environment-file: environment.yml
24+
init-shell: bash
25+
cache-environment: true
26+
post-cleanup: 'all'
27+
generate-run-shell: false
28+
29+
- name: Sphinx build
30+
run: |
31+
sphinx-build doc _build
32+
shell: bash -el {0}
33+
34+
- name: Deploy to GitHub Pages
35+
uses: peaceiris/actions-gh-pages@v4
36+
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
37+
with:
38+
publish_branch: gh-pages
39+
github_token: ${{ secrets.GITHUB_TOKEN }}
40+
publish_dir: _build/
41+
force_orphan: true

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Data/
2+
Results/
3+
Experiments/
4+
_build/

doc/about.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# About this code
2+
3+
Work in progress ...

doc/conf.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
project = "Collaborative Coding Exam"
2+
copyright = "2025, SFI Visual Intelligence"
3+
author = "SFI Visual Intelligence"
4+
release = "0.0.1"
5+
6+
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]
7+
8+
extensions = [
9+
"myst_parser", # in order to use markdown
10+
]
11+
12+
myst_enable_extensions = [
13+
"colon_fence", # ::: can be used instead of ``` for better rendering
14+
]
15+
16+
html_theme = "sphinx_rtd_theme"

doc/index.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Our code documentation
2+
3+
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor
4+
incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis
5+
nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
6+
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu
7+
fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in
8+
culpa qui officia deserunt mollit anim id est laborum.
9+
10+
:::{toctree}
11+
:maxdepth: 2
12+
:caption: Some caption
13+
14+
about.md
15+
:::

environment.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
name: cc-exam
2+
channels:
3+
- defaults
4+
dependencies:
5+
- python=3.12
6+
- myst-parser
7+
- sphinx
8+
- sphinx-autoapi
9+
- sphinx-autobuild
10+
- sphinx-rtd-theme
11+
- pip
12+
prefix: /opt/miniconda3/envs/cc-exam

0 commit comments

Comments
 (0)