Skip to content

Commit 1b53e2f

Browse files
authored
Merge pull request #22 from MatInGit/20-documentation
Improved docs
2 parents 85d83e7 + 2e7afad commit 1b53e2f

File tree

194 files changed

+18546
-17
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

194 files changed

+18546
-17
lines changed

.github/workflows/docs.yml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: Build & Deploy Sphinx Docs
2+
3+
on:
4+
push:
5+
branches: [20-documentation]
6+
7+
permissions:
8+
contents: read
9+
pages: write
10+
id-token: write
11+
12+
jobs:
13+
build:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: 📥 Checkout code
17+
uses: actions/checkout@v3
18+
19+
- name: 🐍 Set up Python
20+
uses: actions/setup-python@v4
21+
with:
22+
python-version: '3.11'
23+
24+
- name: 📦 Install dependencies
25+
run: |
26+
python -m pip install --upgrade pip
27+
pip install sphinx furo sphinx-autodoc-typehints
28+
29+
# - name: 🛠️ Build documentation # we are just using the uploaded ones
30+
# run: |
31+
# cd docs
32+
# make html
33+
34+
- name: 📂 Upload artifact
35+
uses: actions/upload-pages-artifact@v3
36+
with:
37+
path: docs/build/html/
38+
39+
deploy:
40+
needs: build
41+
42+
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
43+
permissions:
44+
pages: write # to deploy to Pages
45+
id-token: write # to verify the deployment originates from an appropriate source
46+
47+
# Deploy to the github-pages environment
48+
environment:
49+
name: github-pages
50+
url: ${{ steps.deployment.outputs.page_url }}
51+
52+
# Specify runner + deployment step
53+
runs-on: ubuntu-latest
54+
steps:
55+
- name: Deploy to GitHub Pages
56+
id: deployment
57+
uses: actions/deploy-pages@v4 # or specific "vX.X.X" version tag for this action

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ test.ipynb
2222
image_model
2323
test.h5
2424
.vscode
25-
build
25+
/build
2626
env.json
2727
creds.json
2828
test.py

docs/Makefile

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Minimal makefile for Sphinx documentation
2+
3+
# You can set these variables from the command line, and also
4+
# from the environment for the first two.
5+
SPHINXOPTS ?=
6+
SPHINXBUILD ?= sphinx-build
7+
SOURCEDIR = source
8+
BUILDDIR = build
9+
10+
# Adjust this to point to your Python package directory (relative to this Makefile)
11+
APIDOCSRC = ../poly_lithic
12+
APIDOCOUT = $(SOURCEDIR)/api
13+
14+
.PHONY: help Makefile apidoc
15+
16+
# Default target: "make" is like "make help"
17+
help:
18+
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
19+
20+
# Autogenerate .rst files from Python source using sphinx-apidoc
21+
apidoc:
22+
sphinx-apidoc -o $(APIDOCOUT) $(APIDOCSRC) --force --no-toc --separate
23+
24+
# Build HTML docs, running apidoc first
25+
html: apidoc
26+
@$(SPHINXBUILD) -M html "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
27+
28+
# Catch-all target: route all unknown targets to Sphinx
29+
%: Makefile
30+
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
3.99 KB
Binary file not shown.
2.85 KB
Binary file not shown.
3.63 KB
Binary file not shown.
4.3 KB
Binary file not shown.
10 KB
Binary file not shown.
Binary file not shown.
3.72 KB
Binary file not shown.

0 commit comments

Comments
 (0)