From 2f3099a17b4fbdbbb54f532ecccc054cf74b8c0e Mon Sep 17 00:00:00 2001 From: Dr Griffith Rees Date: Tue, 13 Feb 2024 13:41:25 +0000 Subject: [PATCH 1/5] fix(doc): add quartodoc to docs build --- .github/workflows/ci.yaml | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index c9ae51e7..c828cb1a 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -79,13 +79,26 @@ jobs: path: ${{ env.COVERAGE_SVG_PATH }} docs: - needs: [linter, pytest] + # needs: [linter, pytest] runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - name: Download coverage svg - uses: actions/download-artifact@v3 + # - name: Download coverage svg + # uses: actions/download-artifact@v3 + # with: + # name: coverage-badge + # path: ${{ env.GH_PAGE_PATH }}${{ env.COVERAGE_SVG_PATH }} + + - name: Build Conda Environment + uses: conda-incubator/setup-miniconda@v3 with: - name: coverage-badge - path: ${{ env.GH_PAGE_PATH }}${{ env.COVERAGE_SVG_PATH }} + activate-environment: ${{ env.CONDA_ENV_NAME }} + environment-file: ${{ env.CONDA_ENV_PATH }} + auto-activate-base: false + miniforge-version: latest + + - name: Run `quartodoc` + shell: bash -el {0} + run: | + mamba run -n ${{ env.CONDA_ENV_NAME }} quartodoc build From c32faa06ae5b598a525d67f08abb6d5a549d2314 Mon Sep 17 00:00:00 2001 From: Dr Griffith Rees Date: Tue, 13 Feb 2024 13:51:11 +0000 Subject: [PATCH 2/5] fix(ci): update to python 3.10 and uncomment docs deploy --- .github/workflows/ci.yaml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index c828cb1a..21643101 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -6,7 +6,7 @@ env: COMPOSE_DOCKER_CLI_BUILD: 1 CONDA_ENV_NAME: clim-recal CONDA_ENV_PATH: environment.yml - MIN_PYTHON_VERSION: 3.9 + MIN_PYTHON_VERSION: 3.10 PYTHON_MODULE_FOLDER: python/ COVERAGE_SVG_FOLDER: docs/assets/ COVERAGE_SVG_FILE_NAME: coverage.svg @@ -16,11 +16,11 @@ env: on: pull_request: - branches: ['main', 'r-docker-refactor'] + branches: ['main', 'fix-quartodoc'] paths-ignore: ['docs/**'] push: - branches: ['main', 'r-docker-refactor'] + branches: ['main', 'fix-quartodoc'] concurrency: group: ${{ github.head_ref || github.run_id }} @@ -79,16 +79,16 @@ jobs: path: ${{ env.COVERAGE_SVG_PATH }} docs: - # needs: [linter, pytest] + needs: [linter, pytest] runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - # - name: Download coverage svg - # uses: actions/download-artifact@v3 - # with: - # name: coverage-badge - # path: ${{ env.GH_PAGE_PATH }}${{ env.COVERAGE_SVG_PATH }} + - name: Download coverage svg + uses: actions/download-artifact@v3 + with: + name: coverage-badge + path: ${{ env.GH_PAGE_PATH }}${{ env.COVERAGE_SVG_PATH }} - name: Build Conda Environment uses: conda-incubator/setup-miniconda@v3 From 882770562ee9ade1a18d3f639f2a672771b70b74 Mon Sep 17 00:00:00 2001 From: Dr Griffith Rees Date: Tue, 13 Feb 2024 13:54:49 +0000 Subject: [PATCH 3/5] fix(ci): MIN_PYTHON_VERSION 3.10 -> '3.10' --- .github/workflows/ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 21643101..c2b96a24 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -6,7 +6,7 @@ env: COMPOSE_DOCKER_CLI_BUILD: 1 CONDA_ENV_NAME: clim-recal CONDA_ENV_PATH: environment.yml - MIN_PYTHON_VERSION: 3.10 + MIN_PYTHON_VERSION: "3.10" PYTHON_MODULE_FOLDER: python/ COVERAGE_SVG_FOLDER: docs/assets/ COVERAGE_SVG_FILE_NAME: coverage.svg From c167198b70df15ed615cc68469cbe18d62ccd28e Mon Sep 17 00:00:00 2001 From: Dr Griffith Rees Date: Tue, 13 Feb 2024 17:12:50 +0000 Subject: [PATCH 4/5] fix(doc): enable working quartodoc.sections --- _quarto.yml | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/_quarto.yml b/_quarto.yml index 13d6c23d..8520fc3d 100644 --- a/_quarto.yml +++ b/_quarto.yml @@ -61,16 +61,16 @@ website: - "python/README.md" - section: "Reference" contents: - - href: "docs/reference/data_download.ceda_ftp_download.download_ftp.qmd" + - href: "docs/reference/ceda_ftp_download.download_ftp.qmd" text: "Download CEDA FTP" + - href: "docs/reference/utils.qmd" + text: "Utilities" # There are errors rendering the pages below # see: https://github.com/alan-turing-institute/clim-recal/issues/128 # - href: "docs/reference/resampling.qmd" # text: "HADs Resampling" # - href: "docs/reference/debiasing.qmd" # text: "Debiasing" - - href: "docs/reference/utils.qmd" - text: "Utilities" - text: "Docker" href: "docs/docker-configurations.qmd" @@ -83,16 +83,18 @@ quartodoc: # write sidebar data to this file sidebar: _sidebar.yml source_dir: ./python/ - # # see: https://github.com/alan-turing-institute/clim-recal/issues/128 - # sections: - # - title: Data Source Management - # desc: How data is downloaded for use - # contents: - # # the functions being documented in the package. - # # you can refer to anything: class methods, modules, etc.. - # - data_download - # # - load_data - # # - resampling - # # - debiasing - # - utils + sections: + - title: Data Source Management + desc: How data is downloaded for use + contents: + # the functions being documented in the package. + # you can refer to anything: class methods, modules, etc.. + - data_download + # - load_data + # - resampling + # - debiasing + - title: Utilities + desc: Manage data and workshops + contents: + - utils From 388b1b56e87ed87c89299083997466bc801179b1 Mon Sep 17 00:00:00 2001 From: Dr Griffith Rees Date: Tue, 13 Feb 2024 17:27:09 +0000 Subject: [PATCH 5/5] fix(ci): fix quartodoc Yield format error --- _quarto.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/_quarto.yml b/_quarto.yml index 8520fc3d..4e4c6eae 100644 --- a/_quarto.yml +++ b/_quarto.yml @@ -63,8 +63,8 @@ website: contents: - href: "docs/reference/ceda_ftp_download.download_ftp.qmd" text: "Download CEDA FTP" - - href: "docs/reference/utils.qmd" - text: "Utilities" + # - href: "docs/reference/utils.qmd" + # text: "Utilities" # There are errors rendering the pages below # see: https://github.com/alan-turing-institute/clim-recal/issues/128 # - href: "docs/reference/resampling.qmd" @@ -94,7 +94,7 @@ quartodoc: # - load_data # - resampling # - debiasing - - title: Utilities - desc: Manage data and workshops - contents: - - utils + # - title: Utilities + # desc: Manage data and workshops + # contents: + # - utils