From 3f33b7778401e15e3ed0a8d71c0cc889271431cc Mon Sep 17 00:00:00 2001 From: "William F. Broderick" Date: Thu, 16 Nov 2023 15:52:25 -0500 Subject: [PATCH 1/5] adds check_urls action --- .github/workflows/ci.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 903247f2..b9ea193a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -123,6 +123,17 @@ jobs: for file in docs/tutorials/*/*nblink; do let "n_nblink+=1"; done; n_ipynb=0; for file in examples/*ipynb; do let "n_ipynb+=1"; done; if [[ $n_nblink != $n_ipynb ]]; then exit 1; fi; + check_urls: + runs-on: ubuntu-latest + name: Check all urls are valid + steps: + - uses: actions/checkout@v3 + - uses: urlstechie/urlchecker-action@0.0.34 + with: + file_types: .md,.py,.rst,.ipynb + print_all: false + timeout: 5 + retry_count: 3 check: if: always() From 5cc29f87254ba30d3db21c2ef41be25970751fdb Mon Sep 17 00:00:00 2001 From: "William F. Broderick" Date: Thu, 16 Nov 2023 15:52:33 -0500 Subject: [PATCH 2/5] adds rest of actions to check --- .github/workflows/ci.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b9ea193a..64c066ef 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -140,6 +140,9 @@ jobs: needs: - notebooks - tests + - check_urls + - all_tutorials_in_docs + - no_extra_nblinks runs-on: ubuntu-latest steps: - name: Decide whether all tests and notebooks succeeded From e7fcd2eea8787100ec2ff263b1815ac9abbc277f Mon Sep 17 00:00:00 2001 From: "William F. Broderick" Date: Thu, 16 Nov 2023 15:56:29 -0500 Subject: [PATCH 3/5] rename to API Documentation --- docs/index.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/index.rst b/docs/index.rst index 05cd6fdf..b4c8f4cf 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -212,7 +212,7 @@ cite us! See the :ref:`citation` for more details. synthesis tips reproducibility - Modules + API Documentation tutorials/advanced/* .. [Portilla2000] Portilla, J., & Simoncelli, E. P. (2000). A parametric texture From 6d672d798d0e43c37837ed414f03798ff97018e5 Mon Sep 17 00:00:00 2001 From: "William F. Broderick" Date: Fri, 17 Nov 2023 14:49:27 -0500 Subject: [PATCH 4/5] corrects some urls --- CONTRIBUTING.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index e9748739..74c303e2 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -201,7 +201,7 @@ metamer instances run for. We do this using - Add a cell to the top of the notebook (under the import cell), add the parameter tag (see [papermill - documentation]https://papermill.readthedocs.io/en/latest/usage-parameterize.html()), + documentation](https://papermill.readthedocs.io/en/latest/usage-parameterize.html), and create a variable for each synthesis duration (e.g., `vgg16_synth_max_iter = 1000`). - Where synthesis is called later in the notebook, replace the number with the @@ -309,7 +309,7 @@ that means nothing to you, don't worry! Documentation comes in two types: `.rst` files (reST, the markup language used by Sphinx, see -[here](https://www.sphinx-doc.org/en/main/usage/restructuredtext/basics.html) +[here](https://www.sphinx-doc.org/en/master/usage/restructuredtext/basics.html) for a primer), which contain only text (including math) and images, and `.ipynb` files (Jupyter notebooks), which also contain code. From 7270f303cf512d7124a8556565b3cedbab27651d Mon Sep 17 00:00:00 2001 From: "William F. Broderick" Date: Fri, 17 Nov 2023 14:49:51 -0500 Subject: [PATCH 5/5] remove check_urls from check There are some failing urls that aren't actual failures, which are in the cached output of jupyter notebooks. I want them to only check in the input, but that's not working. so it goes --- .github/workflows/ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 64c066ef..e3716237 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -140,7 +140,6 @@ jobs: needs: - notebooks - tests - - check_urls - all_tutorials_in_docs - no_extra_nblinks runs-on: ubuntu-latest