diff --git a/.github/workflows/build-deploy-book.yml b/.github/workflows/build-deploy-book.yml index cb71533..58a577c 100644 --- a/.github/workflows/build-deploy-book.yml +++ b/.github/workflows/build-deploy-book.yml @@ -71,6 +71,38 @@ jobs: pip install --upgrade pip pip install -r requirements.txt + - name: Get list of changed Python notebooks + id: changed-ipynb-files + uses: tj-actions/changed-files@v45 + with: + files: | + **.ipynb + + - name: Check for dirty Python notebooks + if: steps.changed-ipynb-files.outputs.any_changed == 'true' + env: + ALL_CHANGED_FILES: ${{ steps.changed-ipynb-files.outputs.all_changed_files }} + run: | + # Check if there are dirty notebooks + dirty_ipynb=() + for file in ${ALL_CHANGED_FILES[*]}; do + echo "Checking $file..." + if ! nb-clean check $file >/dev/null 2>&1; then + dirty_ipynb+=($file) + fi + done + + # Trigger failure if dirty notebooks were found + if [[ ! -z "${dirty_ipynb[@]}" ]]; then + echo "ERROR: Found dirty Python notebooks. Please clean the notebooks by running" + echo "" + echo "nb-clean clean --remove-empty-cells --remove-all-notebook-metadata ${dirty_ipynb[*]}" + echo "" + exit 1 + else + echo "SUCCESS: All changed notebooks are clean." + fi + - name: Build Jupyter Book run: make docs diff --git a/_toc.yml b/_toc.yml index 1db5e02..1f7600b 100644 --- a/_toc.yml +++ b/_toc.yml @@ -175,5 +175,8 @@ parts: - file: chapter5/multiphysics - caption: Documentation chapters: - - file: documentation/sympde - - file: documentation/psydac + - url: https://pyccel.github.io/psydac/index.html + title: Psydac + - url: https://sympde.readthedocs.io/en/latest/ + title: SymPDE + diff --git a/documentation/psydac.rst b/documentation/psydac.rst deleted file mode 100644 index dd90723..0000000 --- a/documentation/psydac.rst +++ /dev/null @@ -1,19 +0,0 @@ -Psydac API Reference -==================== - -.. autosummary:: - :toctree: _autosummary - :recursive: - - psydac.api - psydac.cad - psydac.cmd - psydac.core - psydac.ddm - psydac.feec - psydac.fem - psydac.linalg - psydac.mapping - psydac.polar - psydac.pyccel - psydac.utilities diff --git a/documentation/sympde.rst b/documentation/sympde.rst deleted file mode 100644 index 3fc651f..0000000 --- a/documentation/sympde.rst +++ /dev/null @@ -1,14 +0,0 @@ -SymPDE API Reference -==================== - -.. autosummary:: - :toctree: _autosummary - :recursive: - - sympde.core - sympde.calculus - sympde.topology - sympde.expr - sympde.printing - sympde.exterior - sympde.utilities