From 1e98c770a368d84c8f2a30a9fb6f7f09f9ef2794 Mon Sep 17 00:00:00 2001 From: akeeste Date: Wed, 29 Jan 2025 14:44:52 -0600 Subject: [PATCH 01/16] update .gitignore path for .vscode --- .gitignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 0a3e662..7e0c5df 100644 --- a/.gitignore +++ b/.gitignore @@ -10,7 +10,7 @@ docs/doctrees/ .buildinfo.bak # IDE settings -*/.vscode/* +**/.vscode/** # Other issues.md From d1065d3db43d16509a0a6921a8e61e8c1a9808d0 Mon Sep 17 00:00:00 2001 From: akeeste Date: Wed, 29 Jan 2025 14:46:24 -0600 Subject: [PATCH 02/16] fix automodule call in acoustics API --- docs/source/mhkit-python/api.acoustics.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/source/mhkit-python/api.acoustics.rst b/docs/source/mhkit-python/api.acoustics.rst index 4c51fa2..2315877 100644 --- a/docs/source/mhkit-python/api.acoustics.rst +++ b/docs/source/mhkit-python/api.acoustics.rst @@ -7,6 +7,8 @@ Passive Acoustics Module :members: :no-undoc-members: :show-inheritance: + :imported-members: + :exclude-members: VelBinner, epoch2dt64, dt642epoch .. automodule:: mhkit.acoustics.analysis From 410b9b218c6eaece0dd05d10a21c3e5b893ed33c Mon Sep 17 00:00:00 2001 From: akeeste Date: Wed, 29 Jan 2025 14:51:39 -0600 Subject: [PATCH 03/16] have Actions workflow use make html --- .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 2f3a8a4..0163e10 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -28,7 +28,7 @@ jobs: run: | cd docs rm -rf _build/* - sphinx-build -b html source _build/html + make html # Create .nojekyll file to prevent GitHub Pages from ignoring files that begin with an underscore touch _build/html/.nojekyll From 0f7cf3c702160b4f4e14391fca37f3bca16c6d08 Mon Sep 17 00:00:00 2001 From: akeeste Date: Wed, 29 Jan 2025 15:22:19 -0600 Subject: [PATCH 04/16] Revert "have Actions workflow use make html" This reverts commit 410b9b218c6eaece0dd05d10a21c3e5b893ed33c. --- .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 0163e10..2f3a8a4 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -28,7 +28,7 @@ jobs: run: | cd docs rm -rf _build/* - make html + sphinx-build -b html source _build/html # Create .nojekyll file to prevent GitHub Pages from ignoring files that begin with an underscore touch _build/html/.nojekyll From c7343b57ba7c7508e1a20d7a294e22f6d675a593 Mon Sep 17 00:00:00 2001 From: akeeste Date: Wed, 29 Jan 2025 15:25:37 -0600 Subject: [PATCH 05/16] try adding commands to copy examples to docs.yml --- .github/workflows/docs.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 2f3a8a4..5e4d869 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -28,7 +28,9 @@ jobs: run: | cd docs rm -rf _build/* + cp ../MHKiT-Python/examples/* source/* sphinx-build -b html source _build/html + cp ../MHKiT-MATLAB/examples/*.html ./_build/html/mhkit-matlab/ # Create .nojekyll file to prevent GitHub Pages from ignoring files that begin with an underscore touch _build/html/.nojekyll From afe19c5df11220630440e289aca825d14ce739b8 Mon Sep 17 00:00:00 2001 From: akeeste Date: Wed, 29 Jan 2025 15:30:40 -0600 Subject: [PATCH 06/16] tabs to spaces --- .github/workflows/docs.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 5e4d869..677f2e8 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -28,9 +28,9 @@ jobs: run: | cd docs rm -rf _build/* - cp ../MHKiT-Python/examples/* source/* + cp ../MHKiT-Python/examples/* source/ sphinx-build -b html source _build/html - cp ../MHKiT-MATLAB/examples/*.html ./_build/html/mhkit-matlab/ + cp ../MHKiT-MATLAB/examples/*.html ./_build/html/mhkit-matlab # Create .nojekyll file to prevent GitHub Pages from ignoring files that begin with an underscore touch _build/html/.nojekyll From 21622af0934bc3ad073e19b421831feef7e97d28 Mon Sep 17 00:00:00 2001 From: akeeste Date: Wed, 29 Jan 2025 15:39:29 -0600 Subject: [PATCH 07/16] typo in docs.yml --- .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 677f2e8..79ea4df 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -28,7 +28,7 @@ jobs: run: | cd docs rm -rf _build/* - cp ../MHKiT-Python/examples/* source/ + cp -r ../MHKiT-Python/examples/* source/ sphinx-build -b html source _build/html cp ../MHKiT-MATLAB/examples/*.html ./_build/html/mhkit-matlab # Create .nojekyll file to prevent GitHub Pages from ignoring files that begin with an underscore From 40a854deea8d38d965def64f781f14fdfdf96d6e Mon Sep 17 00:00:00 2001 From: akeeste Date: Wed, 29 Jan 2025 15:51:07 -0600 Subject: [PATCH 08/16] update make.bat and Make for local builds --- docs/Makefile | 4 ++-- docs/make.bat | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/Makefile b/docs/Makefile index 2ff6cec..2a16871 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -5,7 +5,7 @@ SPHINXOPTS = SPHINXBUILD = sphinx-build PAPER = -BUILDDIR = . +BUILDDIR = _build SOURCEDIR = source # User-friendly check for sphinx-build @@ -55,7 +55,7 @@ clean: html: $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR) @echo - @echo "Build finished. The HTML pages are in $(BUILDDIR)" + @echo "Build finished. The HTML pages are in $(BUILDDIR)/html" dirhtml: $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml diff --git a/docs/make.bat b/docs/make.bat index daea875..8231698 100644 --- a/docs/make.bat +++ b/docs/make.bat @@ -78,7 +78,7 @@ if "%1" == "html" ( %SPHINXBUILD% -b html %ALLSPHINXOPTS% %BUILDDIR%/html if errorlevel 1 exit /b 1 echo. - Copy "..\MHKiT-MATLAB\examples\*.html" ".\mhkit-matlab\" + Copy "..\MHKiT-MATLAB\examples\*.html" ".\_build\html\mhkit-matlab\" echo.Build finished. The HTML pages are in %BUILDDIR%/html goto end ) From 7fd31b76475e91d43d811f72b4209b0eeae5e4e2 Mon Sep 17 00:00:00 2001 From: ssolson Date: Mon, 3 Feb 2025 11:55:40 -0500 Subject: [PATCH 09/16] deploy preview --- .github/workflows/docs.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 79ea4df..d1d876f 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -43,3 +43,14 @@ jobs: force_orphan: true enable_jekyll: false full_commit_message: ${{ github.event.head_commit.message }} + + - name: Deploy Preview for PRs + if: github.event_name == 'pull_request' + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./docs/_build/html + destination_dir: pr-previews/${{ github.event.number }} + force_orphan: true + enable_jekyll: false + full_commit_message: ${{ github.event.head_commit.message }} From f2a27a74aea4935eba456ce7c0a215cb419f2f1c Mon Sep 17 00:00:00 2001 From: ssolson Date: Mon, 3 Feb 2025 12:50:12 -0500 Subject: [PATCH 10/16] use the fork for previews --- .github/workflows/docs.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index d1d876f..fe8e356 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -51,6 +51,7 @@ jobs: github_token: ${{ secrets.GITHUB_TOKEN }} publish_dir: ./docs/_build/html destination_dir: pr-previews/${{ github.event.number }} + external_repository: ${{ github.event.pull_request.head.repo.full_name }} force_orphan: true enable_jekyll: false full_commit_message: ${{ github.event.head_commit.message }} From 17b6246e54c140d0a834aba9ce427f1537c8e826 Mon Sep 17 00:00:00 2001 From: ssolson Date: Mon, 3 Feb 2025 14:01:18 -0500 Subject: [PATCH 11/16] use preview on MHKiT repo --- .github/workflows/docs.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index fe8e356..235023f 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -51,7 +51,7 @@ jobs: github_token: ${{ secrets.GITHUB_TOKEN }} publish_dir: ./docs/_build/html destination_dir: pr-previews/${{ github.event.number }} - external_repository: ${{ github.event.pull_request.head.repo.full_name }} - force_orphan: true + external_repository: ${{ github.repository }} + keep_files: true enable_jekyll: false full_commit_message: ${{ github.event.head_commit.message }} From 442c99591bb6e6805734b16facd07e18064445a7 Mon Sep 17 00:00:00 2001 From: ssolson Date: Mon, 3 Feb 2025 14:33:42 -0500 Subject: [PATCH 12/16] use new deploy key --- .github/workflows/docs.yml | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 235023f..1e0d5a5 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -34,7 +34,7 @@ jobs: # Create .nojekyll file to prevent GitHub Pages from ignoring files that begin with an underscore touch _build/html/.nojekyll - - name: Deploy to GitHub Pages + - name: Deploy to GitHub Pages (Main Branch) if: github.event_name == 'push' && github.ref == 'refs/heads/main' uses: peaceiris/actions-gh-pages@v3 with: @@ -44,14 +44,22 @@ jobs: enable_jekyll: false full_commit_message: ${{ github.event.head_commit.message }} + - name: Setup SSH for PR Previews + if: github.event_name == 'pull_request' + run: | + mkdir -p ~/.ssh + echo "${{ secrets.GH_PAGES_DEPLOY_KEY }}" > ~/.ssh/id_rsa + chmod 600 ~/.ssh/id_rsa + ssh-keyscan github.com >> ~/.ssh/known_hosts + - name: Deploy Preview for PRs if: github.event_name == 'pull_request' uses: peaceiris/actions-gh-pages@v3 with: - github_token: ${{ secrets.GITHUB_TOKEN }} + deploy_key: ${{ secrets.GH_PAGES_DEPLOY_KEY }} publish_dir: ./docs/_build/html destination_dir: pr-previews/${{ github.event.number }} - external_repository: ${{ github.repository }} + external_repository: MHKiT-Software/MHKiT keep_files: true enable_jekyll: false full_commit_message: ${{ github.event.head_commit.message }} From 5fe4dae1229866be5700e1800d9b4f6f7013cb26 Mon Sep 17 00:00:00 2001 From: ssolson Date: Mon, 3 Feb 2025 14:50:29 -0500 Subject: [PATCH 13/16] manual deploy --- .github/workflows/manual-deploy.yml | 1 + 1 file changed, 1 insertion(+) create mode 100644 .github/workflows/manual-deploy.yml diff --git a/.github/workflows/manual-deploy.yml b/.github/workflows/manual-deploy.yml new file mode 100644 index 0000000..0519ecb --- /dev/null +++ b/.github/workflows/manual-deploy.yml @@ -0,0 +1 @@ + \ No newline at end of file From 15420fb4438087cb9cd96ebda0e3a678a6fdcc60 Mon Sep 17 00:00:00 2001 From: ssolson Date: Mon, 3 Feb 2025 14:53:57 -0500 Subject: [PATCH 14/16] remove preview from docs --- .github/workflows/docs.yml | 20 ----------- .github/workflows/manual-deploy.yml | 51 ++++++++++++++++++++++++++++- 2 files changed, 50 insertions(+), 21 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 1e0d5a5..b1dcb0d 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -43,23 +43,3 @@ jobs: force_orphan: true enable_jekyll: false full_commit_message: ${{ github.event.head_commit.message }} - - - name: Setup SSH for PR Previews - if: github.event_name == 'pull_request' - run: | - mkdir -p ~/.ssh - echo "${{ secrets.GH_PAGES_DEPLOY_KEY }}" > ~/.ssh/id_rsa - chmod 600 ~/.ssh/id_rsa - ssh-keyscan github.com >> ~/.ssh/known_hosts - - - name: Deploy Preview for PRs - if: github.event_name == 'pull_request' - uses: peaceiris/actions-gh-pages@v3 - with: - deploy_key: ${{ secrets.GH_PAGES_DEPLOY_KEY }} - publish_dir: ./docs/_build/html - destination_dir: pr-previews/${{ github.event.number }} - external_repository: MHKiT-Software/MHKiT - keep_files: true - enable_jekyll: false - full_commit_message: ${{ github.event.head_commit.message }} diff --git a/.github/workflows/manual-deploy.yml b/.github/workflows/manual-deploy.yml index 0519ecb..8887efd 100644 --- a/.github/workflows/manual-deploy.yml +++ b/.github/workflows/manual-deploy.yml @@ -1 +1,50 @@ - \ No newline at end of file +name: Manual Deploy PR Preview + +on: + workflow_dispatch: + inputs: + ref: + description: 'Branch of the PR' + required: true + repository: + description: 'Fork repository' + required: true + pr_number: + description: 'Pull Request Number' + required: true + +jobs: + deploy_preview: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + ref: ${{ github.event.inputs.ref }} + repository: ${{ github.event.inputs.repository }} + + - name: Setup SSH + run: | + mkdir -p ~/.ssh + echo "${{ secrets.GH_PAGES_DEPLOY_KEY }}" > ~/.ssh/id_rsa + chmod 600 ~/.ssh/id_rsa + ssh-keyscan github.com >> ~/.ssh/known_hosts + + - name: Build Documentation + shell: bash -l {0} + run: | + cd docs + rm -rf _build/* + cp -r ../MHKiT-Python/examples/* source/ + sphinx-build -b html source _build/html + cp ../MHKiT-MATLAB/examples/*.html ./_build/html/mhkit-matlab + touch _build/html/.nojekyll + + - name: Deploy PR Preview + uses: peaceiris/actions-gh-pages@v3 + with: + deploy_key: ${{ secrets.GH_PAGES_DEPLOY_KEY }} + publish_dir: ./docs/_build/html + destination_dir: pr-previews/${{ github.event.inputs.pr_number }} + external_repository: MHKiT-Software/MHKiT + keep_files: true + enable_jekyll: false From 8ff3be2071035179f35960b4f8230b4b957af3ff Mon Sep 17 00:00:00 2001 From: ssolson Date: Tue, 4 Feb 2025 08:56:46 -0500 Subject: [PATCH 15/16] add conda environment --- .github/workflows/manual-deploy.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/manual-deploy.yml b/.github/workflows/manual-deploy.yml index 8887efd..d823917 100644 --- a/.github/workflows/manual-deploy.yml +++ b/.github/workflows/manual-deploy.yml @@ -21,6 +21,15 @@ jobs: with: ref: ${{ github.event.inputs.ref }} repository: ${{ github.event.inputs.repository }} + submodules: recursive + fetch-depth: 0 + + - name: Setup Conda Environment + uses: conda-incubator/setup-miniconda@v2 + with: + activate-environment: mhkit-docs + environment-file: environment.yml + auto-activate-base: false - name: Setup SSH run: | From e142d2ee37a0f90ff5fb7fd5e60d46017f70ee39 Mon Sep 17 00:00:00 2001 From: ssolson Date: Tue, 4 Feb 2025 09:43:55 -0500 Subject: [PATCH 16/16] set to ssolson for test --- .github/workflows/manual-deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/manual-deploy.yml b/.github/workflows/manual-deploy.yml index d823917..3d0c69b 100644 --- a/.github/workflows/manual-deploy.yml +++ b/.github/workflows/manual-deploy.yml @@ -54,6 +54,6 @@ jobs: deploy_key: ${{ secrets.GH_PAGES_DEPLOY_KEY }} publish_dir: ./docs/_build/html destination_dir: pr-previews/${{ github.event.inputs.pr_number }} - external_repository: MHKiT-Software/MHKiT + external_repository: ssolson/MHKiT keep_files: true enable_jekyll: false