From 3953e3f400ad6ffc83e4ec7cd76d4034f5a8113b Mon Sep 17 00:00:00 2001 From: Caden Myers Date: Mon, 20 May 2024 13:27:14 -0400 Subject: [PATCH 1/4] condition to deploy upon PR --- .github/workflows/docs.yml | 49 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 .github/workflows/docs.yml diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 00000000..eabc5279 --- /dev/null +++ b/.github/workflows/docs.yml @@ -0,0 +1,49 @@ +name: Build Documentation + +on: + push: + branches: + - main + release: + + pull_request: + branches: + - main + + +jobs: + test: + runs-on: ubuntu-latest + defaults: + run: + shell: bash -l {0} + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - uses: conda-incubator/setup-miniconda@v2 + with: + activate-environment: build + auto-update-conda: true + + - name: install requirements + run: >- + conda install -n build -c conda-forge + --file requirements/build.txt + --file requirements/run.txt + --file requirements/docs.txt + --quiet --yes + + - name: install the package + run: python -m pip install . --no-deps + + - name: build documents + run: make -C doc/manual html + + - name: Deploy + if: github.event_name == 'push' && github.ref == 'refs/heads/main' + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./doc/manual/build/html \ No newline at end of file From 9a3594ef2e68b3c0c13cdf6c37bee7374fccb729 Mon Sep 17 00:00:00 2001 From: Caden Myers Date: Mon, 20 May 2024 13:42:57 -0400 Subject: [PATCH 2/4] Create subdirectory doc/manual --- doc/{ => manual}/Makefile | 0 doc/{ => manual}/images/aspirin_smear.png | Bin doc/{ => manual}/images/aspirin_stretch.png | Bin doc/{ => manual}/images/morph_ex1.png | Bin doc/{ => manual}/images/morph_ex2.png | Bin doc/{ => manual}/images/nacl_example.agr | 0 doc/{ => manual}/images/nacl_example.xcf | Bin doc/{ => manual}/images/pdfmorph_example.agr | 0 doc/{ => manual}/images/pdfmorph_example.png | Bin doc/{ => manual}/images/pdfmorph_example.xcf | Bin doc/{ => manual}/images/pdfmorph_smear.png | Bin doc/{ => manual}/images/pdfmorph_smear2.png | Bin doc/{ => manual}/images/pdfmorph_stretch.png | Bin doc/{ => manual}/make.bat | 70 +++++++++---------- doc/{ => manual}/source/conf.py | 0 doc/{ => manual}/source/index.rst | 0 doc/{ => manual}/source/license.rst | 0 doc/{ => manual}/source/mod_log.rst | 0 doc/{ => manual}/source/mod_pdfplot.rst | 0 doc/{ => manual}/source/mod_refine.rst | 0 doc/{ => manual}/source/mod_tools.rst | 0 doc/{ => manual}/source/morph_helpers.rst | 0 doc/{ => manual}/source/morphs.rst | 0 doc/{ => manual}/source/package.rst | 0 doc/{ => manual}/source/quickstart.rst | 0 doc/{ => manual}/source/release.rst | 0 26 files changed, 35 insertions(+), 35 deletions(-) rename doc/{ => manual}/Makefile (100%) rename doc/{ => manual}/images/aspirin_smear.png (100%) rename doc/{ => manual}/images/aspirin_stretch.png (100%) rename doc/{ => manual}/images/morph_ex1.png (100%) rename doc/{ => manual}/images/morph_ex2.png (100%) rename doc/{ => manual}/images/nacl_example.agr (100%) rename doc/{ => manual}/images/nacl_example.xcf (100%) rename doc/{ => manual}/images/pdfmorph_example.agr (100%) rename doc/{ => manual}/images/pdfmorph_example.png (100%) rename doc/{ => manual}/images/pdfmorph_example.xcf (100%) rename doc/{ => manual}/images/pdfmorph_smear.png (100%) rename doc/{ => manual}/images/pdfmorph_smear2.png (100%) rename doc/{ => manual}/images/pdfmorph_stretch.png (100%) rename doc/{ => manual}/make.bat (95%) rename doc/{ => manual}/source/conf.py (100%) rename doc/{ => manual}/source/index.rst (100%) rename doc/{ => manual}/source/license.rst (100%) rename doc/{ => manual}/source/mod_log.rst (100%) rename doc/{ => manual}/source/mod_pdfplot.rst (100%) rename doc/{ => manual}/source/mod_refine.rst (100%) rename doc/{ => manual}/source/mod_tools.rst (100%) rename doc/{ => manual}/source/morph_helpers.rst (100%) rename doc/{ => manual}/source/morphs.rst (100%) rename doc/{ => manual}/source/package.rst (100%) rename doc/{ => manual}/source/quickstart.rst (100%) rename doc/{ => manual}/source/release.rst (100%) diff --git a/doc/Makefile b/doc/manual/Makefile similarity index 100% rename from doc/Makefile rename to doc/manual/Makefile diff --git a/doc/images/aspirin_smear.png b/doc/manual/images/aspirin_smear.png similarity index 100% rename from doc/images/aspirin_smear.png rename to doc/manual/images/aspirin_smear.png diff --git a/doc/images/aspirin_stretch.png b/doc/manual/images/aspirin_stretch.png similarity index 100% rename from doc/images/aspirin_stretch.png rename to doc/manual/images/aspirin_stretch.png diff --git a/doc/images/morph_ex1.png b/doc/manual/images/morph_ex1.png similarity index 100% rename from doc/images/morph_ex1.png rename to doc/manual/images/morph_ex1.png diff --git a/doc/images/morph_ex2.png b/doc/manual/images/morph_ex2.png similarity index 100% rename from doc/images/morph_ex2.png rename to doc/manual/images/morph_ex2.png diff --git a/doc/images/nacl_example.agr b/doc/manual/images/nacl_example.agr similarity index 100% rename from doc/images/nacl_example.agr rename to doc/manual/images/nacl_example.agr diff --git a/doc/images/nacl_example.xcf b/doc/manual/images/nacl_example.xcf similarity index 100% rename from doc/images/nacl_example.xcf rename to doc/manual/images/nacl_example.xcf diff --git a/doc/images/pdfmorph_example.agr b/doc/manual/images/pdfmorph_example.agr similarity index 100% rename from doc/images/pdfmorph_example.agr rename to doc/manual/images/pdfmorph_example.agr diff --git a/doc/images/pdfmorph_example.png b/doc/manual/images/pdfmorph_example.png similarity index 100% rename from doc/images/pdfmorph_example.png rename to doc/manual/images/pdfmorph_example.png diff --git a/doc/images/pdfmorph_example.xcf b/doc/manual/images/pdfmorph_example.xcf similarity index 100% rename from doc/images/pdfmorph_example.xcf rename to doc/manual/images/pdfmorph_example.xcf diff --git a/doc/images/pdfmorph_smear.png b/doc/manual/images/pdfmorph_smear.png similarity index 100% rename from doc/images/pdfmorph_smear.png rename to doc/manual/images/pdfmorph_smear.png diff --git a/doc/images/pdfmorph_smear2.png b/doc/manual/images/pdfmorph_smear2.png similarity index 100% rename from doc/images/pdfmorph_smear2.png rename to doc/manual/images/pdfmorph_smear2.png diff --git a/doc/images/pdfmorph_stretch.png b/doc/manual/images/pdfmorph_stretch.png similarity index 100% rename from doc/images/pdfmorph_stretch.png rename to doc/manual/images/pdfmorph_stretch.png diff --git a/doc/make.bat b/doc/manual/make.bat similarity index 95% rename from doc/make.bat rename to doc/manual/make.bat index 6247f7e2..9534b018 100644 --- a/doc/make.bat +++ b/doc/manual/make.bat @@ -1,35 +1,35 @@ -@ECHO OFF - -pushd %~dp0 - -REM Command file for Sphinx documentation - -if "%SPHINXBUILD%" == "" ( - set SPHINXBUILD=sphinx-build -) -set SOURCEDIR=source -set BUILDDIR=build - -if "%1" == "" goto help - -%SPHINXBUILD% >NUL 2>NUL -if errorlevel 9009 ( - echo. - echo.The 'sphinx-build' command was not found. Make sure you have Sphinx - echo.installed, then set the SPHINXBUILD environment variable to point - echo.to the full path of the 'sphinx-build' executable. Alternatively you - echo.may add the Sphinx directory to PATH. - echo. - echo.If you don't have Sphinx installed, grab it from - echo.http://sphinx-doc.org/ - exit /b 1 -) - -%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% -goto end - -:help -%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% - -:end -popd +@ECHO OFF + +pushd %~dp0 + +REM Command file for Sphinx documentation + +if "%SPHINXBUILD%" == "" ( + set SPHINXBUILD=sphinx-build +) +set SOURCEDIR=source +set BUILDDIR=build + +if "%1" == "" goto help + +%SPHINXBUILD% >NUL 2>NUL +if errorlevel 9009 ( + echo. + echo.The 'sphinx-build' command was not found. Make sure you have Sphinx + echo.installed, then set the SPHINXBUILD environment variable to point + echo.to the full path of the 'sphinx-build' executable. Alternatively you + echo.may add the Sphinx directory to PATH. + echo. + echo.If you don't have Sphinx installed, grab it from + echo.http://sphinx-doc.org/ + exit /b 1 +) + +%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% +goto end + +:help +%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% + +:end +popd diff --git a/doc/source/conf.py b/doc/manual/source/conf.py similarity index 100% rename from doc/source/conf.py rename to doc/manual/source/conf.py diff --git a/doc/source/index.rst b/doc/manual/source/index.rst similarity index 100% rename from doc/source/index.rst rename to doc/manual/source/index.rst diff --git a/doc/source/license.rst b/doc/manual/source/license.rst similarity index 100% rename from doc/source/license.rst rename to doc/manual/source/license.rst diff --git a/doc/source/mod_log.rst b/doc/manual/source/mod_log.rst similarity index 100% rename from doc/source/mod_log.rst rename to doc/manual/source/mod_log.rst diff --git a/doc/source/mod_pdfplot.rst b/doc/manual/source/mod_pdfplot.rst similarity index 100% rename from doc/source/mod_pdfplot.rst rename to doc/manual/source/mod_pdfplot.rst diff --git a/doc/source/mod_refine.rst b/doc/manual/source/mod_refine.rst similarity index 100% rename from doc/source/mod_refine.rst rename to doc/manual/source/mod_refine.rst diff --git a/doc/source/mod_tools.rst b/doc/manual/source/mod_tools.rst similarity index 100% rename from doc/source/mod_tools.rst rename to doc/manual/source/mod_tools.rst diff --git a/doc/source/morph_helpers.rst b/doc/manual/source/morph_helpers.rst similarity index 100% rename from doc/source/morph_helpers.rst rename to doc/manual/source/morph_helpers.rst diff --git a/doc/source/morphs.rst b/doc/manual/source/morphs.rst similarity index 100% rename from doc/source/morphs.rst rename to doc/manual/source/morphs.rst diff --git a/doc/source/package.rst b/doc/manual/source/package.rst similarity index 100% rename from doc/source/package.rst rename to doc/manual/source/package.rst diff --git a/doc/source/quickstart.rst b/doc/manual/source/quickstart.rst similarity index 100% rename from doc/source/quickstart.rst rename to doc/manual/source/quickstart.rst diff --git a/doc/source/release.rst b/doc/manual/source/release.rst similarity index 100% rename from doc/source/release.rst rename to doc/manual/source/release.rst From 003c182cbed871cbe2e1ec6b4a12d908787f979e Mon Sep 17 00:00:00 2001 From: Caden Myers Date: Mon, 20 May 2024 13:53:20 -0400 Subject: [PATCH 3/4] fixing indent --- .github/workflows/docs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index eabc5279..24a0673b 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -8,7 +8,7 @@ on: pull_request: branches: - - main + - main jobs: From 64d8d523547b9d8c302393e7cf7f524cdc6ecb5d Mon Sep 17 00:00:00 2001 From: Caden Myers Date: Mon, 20 May 2024 14:17:00 -0400 Subject: [PATCH 4/4] fix path structure in index.rst, release.rst, and conf.py --- doc/manual/source/conf.py | 2 +- doc/manual/source/index.rst | 2 +- doc/manual/source/release.rst | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/manual/source/conf.py b/doc/manual/source/conf.py index 766b082b..235d9f37 100644 --- a/doc/manual/source/conf.py +++ b/doc/manual/source/conf.py @@ -13,7 +13,7 @@ import sys import os sys.path.insert(0, os.path.abspath('../..')) -sys.path.insert(0, os.path.abspath('../../src')) +sys.path.insert(0, os.path.abspath('../../../src')) # -- Project information ----------------------------------------------------- diff --git a/doc/manual/source/index.rst b/doc/manual/source/index.rst index 51f252e1..4a484320 100644 --- a/doc/manual/source/index.rst +++ b/doc/manual/source/index.rst @@ -63,7 +63,7 @@ To get started, please go to :ref:`quick_start` release package -.. include:: ../../CHANGELOG.rst +.. include:: ../../../CHANGELOG.rst Indices ------- diff --git a/doc/manual/source/release.rst b/doc/manual/source/release.rst index ca8fa0b6..c028e34c 100644 --- a/doc/manual/source/release.rst +++ b/doc/manual/source/release.rst @@ -1,4 +1,4 @@ .. index:: release notes -.. include:: /../../CHANGELOG.rst +.. include:: /../../../CHANGELOG.rst