From 310f78e3627c5c419e1f4ffda6ff3b18651efc27 Mon Sep 17 00:00:00 2001 From: allevitan Date: Thu, 23 Jul 2026 09:03:41 +0200 Subject: [PATCH 1/2] Update the docs to point to readthedocs --- .github/workflows/main.yml | 60 +------------------------------------- CITATION.cff | 2 +- README.md | 2 +- docs/build_custom_docs.md | 2 +- docs/publish | 34 --------------------- pyproject.toml | 2 +- 6 files changed, 5 insertions(+), 97 deletions(-) delete mode 100755 docs/publish diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 18dc696b..3c1a88ec 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -58,62 +58,4 @@ jobs: - name: Run tests run: | - pytest - - build-docs: - if: github.event_name == 'push' && github.ref == 'refs/heads/master' - runs-on: ubuntu-latest - permissions: - contents: read - pages: write - id-token: write - - concurrency: - group: "pages" - cancel-in-progress: false - - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Set up Python - uses: actions/setup-python@v4 - with: - python-version: '3.9' - - - name: Install uv - run: | - pip install uv - - - name: Create virtual environment - run: | - uv venv - - - name: Install dependencies with uv - run: | - uv pip install ."[docs]" - - - name: Build docs - run: | - uv run python -m sphinx -b html docs/source docs/build/html - - - name: List files in docs/build/html - run: | - ls -la docs/build/html - - - name: Upload artifact - uses: actions/upload-pages-artifact@v3 - with: - path: 'docs/build/html' - name: github-pages - - - name: Deploy to GitHub Pages - id: deployment - uses: actions/deploy-pages@v4 - with: - token: ${{ secrets.GITHUB_TOKEN }} - timeout: 600000 - error_count: 10 - reporting_interval: 5000 - artifact_name: github-pages - preview: false \ No newline at end of file + pytest \ No newline at end of file diff --git a/CITATION.cff b/CITATION.cff index 3ff438e3..0b515943 100644 --- a/CITATION.cff +++ b/CITATION.cff @@ -22,7 +22,7 @@ identifiers: value: 'https://github.com/cdtools-developers/cdtools' description: Github Repository repository-code: 'https://github.com/cdtools-developers/cdtools' -url: 'https://cdtools-developers.github.io/cdtools/' +url: 'https://cdtools.readthedocs.io' abstract: >- CDTools is a python library for ptychography and CDI reconstructions, using an Automatic Differentiation based diff --git a/README.md b/README.md index 2796c5bd..e73a9933 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ model.compare(dataset) # See how the simulated and measured patterns compare plt.show() ``` -Further documentation is found [here](https://cdtools-developers.github.io/cdtools/). +Further documentation is found [here](https://cdtools.readthedocs.io). Instructions for building custom documentation based on a specific version or commit can be found [here](https://github.com/cdtools-developers/cdtools/blob/master/docs/build_custom_docs.md). diff --git a/docs/build_custom_docs.md b/docs/build_custom_docs.md index f9f6f6f9..4dffbc86 100644 --- a/docs/build_custom_docs.md +++ b/docs/build_custom_docs.md @@ -4,7 +4,7 @@ This is a short description how to build custom documentation with `sphinx` base This requires a cloned version of `cdtools` from GitHub. See the installation guide for more information: -https://cdtools-developers.github.io/cdtools/installation.html#option-2-installation-from-source +https://cdtools.readthedocs.io/en/stable/installation.html#option-2-installation-from-source ## Installation of Dependencies diff --git a/docs/publish b/docs/publish deleted file mode 100755 index 377f0db8..00000000 --- a/docs/publish +++ /dev/null @@ -1,34 +0,0 @@ -#!/usr/bin/env bash - -# switch branches and make sure we've got the latest version -git checkout gh-pages -git pull origin gh-pages - -# go to master for the latest docs from master -git checkout master -git pull origin master - -# build the docs -make clean -make html -cd .. - -# switch back to gh-pages -git checkout gh-pages - -# delete everything non-relevant and extract docs -ls | grep -v docs | xargs rm -r -touch .nojekyll -mv ./docs/build/html/* ./ -rm -rf ./docs - -# And commit to publish -git add -A -git commit -m "publishing updated docs..." -git push origin gh-pages - -# switch back to master -git checkout master - -# go back to docs dir -cd docs diff --git a/pyproject.toml b/pyproject.toml index aacaecfa..880c9da8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -24,7 +24,7 @@ classifiers = [ "Operating System :: OS Independent", "License :: OSI Approved :: MIT License" ] -urls = { "Homepage" = "https://github.com/cdtools-developers/cdtools", "Documentation" = "https://cdtools-developers.github.io/cdtools/" } +urls = { "Homepage" = "https://github.com/cdtools-developers/cdtools", "Documentation" = "https://cdtools.readthedocs.io" } dependencies = [ "numpy>=1.0", "scipy>=1.0", From ebe4e79b20a766afbfee4f91314dada5f539f79b Mon Sep 17 00:00:00 2001 From: Abe Levitan Date: Thu, 23 Jul 2026 09:11:56 +0200 Subject: [PATCH 2/2] Remove the custom docs build callout I think this is no longer needed on the main page, now that all the major documentation versions should be easily available. The page with info for this remains visilble in the documentation --- README.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/README.md b/README.md index e73a9933..e034e2b8 100644 --- a/README.md +++ b/README.md @@ -28,8 +28,6 @@ plt.show() Further documentation is found [here](https://cdtools.readthedocs.io). -Instructions for building custom documentation based on a specific version or commit can be found [here](https://github.com/cdtools-developers/cdtools/blob/master/docs/build_custom_docs.md). - # Installation CDTools can be installed in several ways depending on your needs. For most users, installation from pypi is recommended. For developers or those who want the latest features, installation from source is available.