Skip to content

Commit

Permalink
ci: consolidated doc py build for packages
Browse files Browse the repository at this point in the history
  • Loading branch information
thewtex committed Jan 29, 2024
1 parent 701b39c commit b50e47d
Show file tree
Hide file tree
Showing 11 changed files with 40 additions and 5 deletions.
25 changes: 22 additions & 3 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,9 @@ jobs:
- name: Build package typescript documentation
run: |
for package in compare-images compress-stringify dicom dowsample image-io mesh-io; do
mkdir -p docs/$package/{ts,py}/docs
mkdir -p docs/$package/{ts,py}/app
for package in compare-images compress-stringify dicom downsample image-io mesh-io; do
mkdir -p docs/$package/ts/docs
mkdir -p docs/$package/ts/app
sed "s% basePath:.*% basePath: '/$package/ts/docs',%" packages/$package/typescript/index.html > docs/$package/ts/docs/index.html
cp packages/$package/typescript/README.md docs/$package/ts/docs/
Expand All @@ -88,6 +88,25 @@ jobs:
rsync -a packages/$package/typescript/demo-app/ docs/$package/ts/app/
done
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.11'

- name: Build package python documentation
run: |
for package in compare-images compress-stringify dicom downsample image-io mesh-io; do
mkdir -p docs/$package/py/docs
mkdir -p docs/$package/py/app
export SPHINX_BASE_URL="/$package/py/docs/"
pushd packages/$package/python/*$package/docs
pip install -r requirements.txt
make html
popd
rsync -a packages/$package/python/*$package/docs/_build/html/ docs/$package/py/docs/
done
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/javascript-typescript.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
package: [compress-stringify, compare-images, dicom, mesh-io, image-io, downsample]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Free Disk Space (Ubuntu)
uses: jlumbroso/free-disk-space@main
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information

from datetime import date
import os

project = 'itkwasm-compare-images'
copyright = f'{date.today().year}, NumFOCUS'
Expand Down Expand Up @@ -46,6 +47,7 @@
html_logo = "_static/logo.svg"
html_favicon = "_static/favicon.png"
html_title = f"{project}"
html_baseurl = os.environ.get("SPHINX_BASE_URL", "")

# Furo options
html_theme_options = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information

from datetime import date
import os

project = 'itkwasm-compress-stringify'
copyright = f'{date.today().year}, NumFOCUS'
Expand Down Expand Up @@ -45,6 +46,7 @@
html_logo = "_static/logo.svg"
html_favicon = "_static/favicon.png"
html_title = f"{project}"
html_baseurl = os.environ.get("SPHINX_BASE_URL", "")

# Furo options
html_theme_options = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information

from datetime import date
import os

project = '@bindgenProject@'
copyright = f'{date.today().year}, NumFOCUS'
Expand Down Expand Up @@ -46,6 +47,7 @@
html_logo = "_static/logo.svg"
html_favicon = "_static/favicon.png"
html_title = f"{project}"
html_baseurl = os.environ.get("SPHINX_BASE_URL", "")

# Furo options
html_theme_options = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information

from datetime import date
import os

project = 'itkwasm-bindgen-interface-types-test'
copyright = f'{date.today().year}, NumFOCUS'
Expand Down Expand Up @@ -46,6 +47,7 @@
html_logo = "_static/logo.svg"
html_favicon = "_static/favicon.png"
html_title = f"{project}"
html_baseurl = os.environ.get("SPHINX_BASE_URL", "")

# Furo options
html_theme_options = {
Expand Down
2 changes: 2 additions & 0 deletions packages/dicom/python/itkwasm-dicom/docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information

from datetime import date
import os

project = 'itkwasm-dicom'
copyright = f'{date.today().year}, NumFOCUS'
Expand Down Expand Up @@ -46,6 +47,7 @@
html_logo = "_static/logo.svg"
html_favicon = "_static/favicon.png"
html_title = f"{project}"
html_baseurl = os.environ.get("SPHINX_BASE_URL", "")

# Furo options
html_theme_options = {
Expand Down
2 changes: 2 additions & 0 deletions packages/downsample/python/itkwasm-downsample/docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information

from datetime import date
import os

project = 'itkwasm-downsample'
copyright = f'{date.today().year}, NumFOCUS'
Expand Down Expand Up @@ -46,6 +47,7 @@
html_logo = "_static/logo.svg"
html_favicon = "_static/favicon.png"
html_title = f"{project}"
html_baseurl = os.environ.get("SPHINX_BASE_URL", "")

# Furo options
html_theme_options = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export default async function downsampleLoadSampleInputs (model, preRun=false) {
export default async function downsampleSigmaLoadSampleInputs (model, preRun=false) {

model.options.set('shrinkFactors', [2, 2])

Expand Down
2 changes: 2 additions & 0 deletions packages/image-io/python/itkwasm-image-io/docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information

from datetime import date
import os

project = 'itkwasm-image-io'
copyright = f'{date.today().year}, NumFOCUS'
Expand Down Expand Up @@ -46,6 +47,7 @@
html_logo = "_static/logo.svg"
html_favicon = "_static/favicon.png"
html_title = f"{project}"
html_baseurl = os.environ.get("SPHINX_BASE_URL", "")

# Furo options
html_theme_options = {
Expand Down
2 changes: 2 additions & 0 deletions packages/mesh-io/python/itkwasm-mesh-io/docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information

from datetime import date
import os

project = 'itkwasm-mesh-io'
copyright = f'{date.today().year}, NumFOCUS'
Expand Down Expand Up @@ -46,6 +47,7 @@
html_logo = "_static/logo.svg"
html_favicon = "_static/favicon.png"
html_title = f"{project}"
html_baseurl = os.environ.get("SPHINX_BASE_URL", "")

# Furo options
html_theme_options = {
Expand Down

0 comments on commit b50e47d

Please sign in to comment.