diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml index 8dd10f0c0..43e2688d8 100644 --- a/.github/workflows/documentation.yml +++ b/.github/workflows/documentation.yml @@ -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/ @@ -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: diff --git a/.github/workflows/javascript-typescript.yml b/.github/workflows/javascript-typescript.yml index 1583852e4..c52fb30dc 100644 --- a/.github/workflows/javascript-typescript.yml +++ b/.github/workflows/javascript-typescript.yml @@ -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 diff --git a/packages/compare-images/python/itkwasm-compare-images/docs/conf.py b/packages/compare-images/python/itkwasm-compare-images/docs/conf.py index a12ffb792..5543c565b 100644 --- a/packages/compare-images/python/itkwasm-compare-images/docs/conf.py +++ b/packages/compare-images/python/itkwasm-compare-images/docs/conf.py @@ -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' @@ -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 = { diff --git a/packages/compress-stringify/python/itkwasm-compress-stringify/docs/conf.py b/packages/compress-stringify/python/itkwasm-compress-stringify/docs/conf.py index 8ce2094e9..cf55fcd38 100644 --- a/packages/compress-stringify/python/itkwasm-compress-stringify/docs/conf.py +++ b/packages/compress-stringify/python/itkwasm-compress-stringify/docs/conf.py @@ -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' @@ -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 = { diff --git a/packages/core/typescript/itk-wasm/src/bindgen/python/resources/docs/conf.py b/packages/core/typescript/itk-wasm/src/bindgen/python/resources/docs/conf.py index a82423015..f23dbff8e 100644 --- a/packages/core/typescript/itk-wasm/src/bindgen/python/resources/docs/conf.py +++ b/packages/core/typescript/itk-wasm/src/bindgen/python/resources/docs/conf.py @@ -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' @@ -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 = { diff --git a/packages/core/typescript/itk-wasm/test/pipelines/bindgen-interface-types-pipeline/python/itkwasm-bindgen-interface-types-test/docs/conf.py b/packages/core/typescript/itk-wasm/test/pipelines/bindgen-interface-types-pipeline/python/itkwasm-bindgen-interface-types-test/docs/conf.py index 2d503517f..5849f927e 100644 --- a/packages/core/typescript/itk-wasm/test/pipelines/bindgen-interface-types-pipeline/python/itkwasm-bindgen-interface-types-test/docs/conf.py +++ b/packages/core/typescript/itk-wasm/test/pipelines/bindgen-interface-types-pipeline/python/itkwasm-bindgen-interface-types-test/docs/conf.py @@ -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' @@ -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 = { diff --git a/packages/dicom/python/itkwasm-dicom/docs/conf.py b/packages/dicom/python/itkwasm-dicom/docs/conf.py index dbdb391c7..3a7fa1a0a 100644 --- a/packages/dicom/python/itkwasm-dicom/docs/conf.py +++ b/packages/dicom/python/itkwasm-dicom/docs/conf.py @@ -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' @@ -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 = { diff --git a/packages/downsample/python/itkwasm-downsample/docs/conf.py b/packages/downsample/python/itkwasm-downsample/docs/conf.py index 3ec36e0e3..9726c82a3 100644 --- a/packages/downsample/python/itkwasm-downsample/docs/conf.py +++ b/packages/downsample/python/itkwasm-downsample/docs/conf.py @@ -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' @@ -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 = { diff --git a/packages/downsample/typescript/test/browser/demo-app/downsample-sigma-load-sample-inputs.ts b/packages/downsample/typescript/test/browser/demo-app/downsample-sigma-load-sample-inputs.ts index 855c13a70..9509dca7f 100644 --- a/packages/downsample/typescript/test/browser/demo-app/downsample-sigma-load-sample-inputs.ts +++ b/packages/downsample/typescript/test/browser/demo-app/downsample-sigma-load-sample-inputs.ts @@ -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]) diff --git a/packages/image-io/python/itkwasm-image-io/docs/conf.py b/packages/image-io/python/itkwasm-image-io/docs/conf.py index 2244708cc..da6dd51af 100644 --- a/packages/image-io/python/itkwasm-image-io/docs/conf.py +++ b/packages/image-io/python/itkwasm-image-io/docs/conf.py @@ -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' @@ -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 = { diff --git a/packages/mesh-io/python/itkwasm-mesh-io/docs/conf.py b/packages/mesh-io/python/itkwasm-mesh-io/docs/conf.py index a38fb6344..e7c914385 100644 --- a/packages/mesh-io/python/itkwasm-mesh-io/docs/conf.py +++ b/packages/mesh-io/python/itkwasm-mesh-io/docs/conf.py @@ -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' @@ -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 = {