From 9b7a0aaaeab29d1d588448482cb11f5c962b4044 Mon Sep 17 00:00:00 2001 From: Antony Milne Date: Mon, 13 May 2024 16:23:56 +0100 Subject: [PATCH 1/8] Add link checker --- vizro-ai/.readthedocs.yaml | 2 +- vizro-ai/hatch.toml | 8 +++++++- vizro-core/.readthedocs.yaml | 2 +- vizro-core/hatch.toml | 8 +++++++- 4 files changed, 16 insertions(+), 4 deletions(-) diff --git a/vizro-ai/.readthedocs.yaml b/vizro-ai/.readthedocs.yaml index 1a5e1e5ce..50675a2d8 100644 --- a/vizro-ai/.readthedocs.yaml +++ b/vizro-ai/.readthedocs.yaml @@ -11,6 +11,6 @@ build: python: "3.11" commands: - pip install hatch - - cd vizro-ai/ && hatch run docs:mkdocs build --strict + - cd vizro-ai/ && hatch run docs:build && hatch run docs:link-check - mkdir --parents $READTHEDOCS_OUTPUT - mv vizro-ai/site/ $READTHEDOCS_OUTPUT/html diff --git a/vizro-ai/hatch.toml b/vizro-ai/hatch.toml index 41a67352b..3984b23c5 100644 --- a/vizro-ai/hatch.toml +++ b/vizro-ai/hatch.toml @@ -51,7 +51,13 @@ dependencies = [ "mkdocstrings[python]" ] detached = true -scripts = {serve = "mkdocs serve --strict"} + +[envs.docs.scripts] +serve = "mkdocs serve --strict" +build = "mkdocs build --strict" +# Disable warnings on the linkcheck so that HTTP redirects are accepted. We could ignore only that warning and specify +# more advanced settings using a linkcheckerrc config file. +link-check = "linkchecker site --check-extern --no-warnings --ignore=404.html --ignore-url=127.0.0.1" [envs.lint] dependencies = [ diff --git a/vizro-core/.readthedocs.yaml b/vizro-core/.readthedocs.yaml index fac29cb51..ef53d5cc8 100644 --- a/vizro-core/.readthedocs.yaml +++ b/vizro-core/.readthedocs.yaml @@ -11,6 +11,6 @@ build: python: "3.11" commands: - pip install hatch - - cd vizro-core/ && hatch run docs:mkdocs build --strict + - cd vizro-ai/ && hatch run docs:build && hatch run docs:link-check - mkdir --parents $READTHEDOCS_OUTPUT - mv vizro-core/site/ $READTHEDOCS_OUTPUT/html diff --git a/vizro-core/hatch.toml b/vizro-core/hatch.toml index 2612954b4..cc379e372 100644 --- a/vizro-core/hatch.toml +++ b/vizro-core/hatch.toml @@ -69,7 +69,13 @@ dependencies = [ "mkdocstrings[python]" ] detached = true -scripts = {serve = "mkdocs serve --strict"} + +[envs.docs.scripts] +serve = "mkdocs serve --strict" +build = "mkdocs build --strict" +# Disable warnings on the linkcheck so that HTTP redirects are accepted. We could ignore only that warning and specify +# more advanced settings using a linkcheckerrc config file. +link-check = "linkchecker site --check-extern --no-warnings --ignore=404.html --ignore-url=127.0.0.1" [envs.lint] dependencies = [ From 9782fbc88ef141b6dc1cdacdc028b968596eb58c Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 13 May 2024 15:25:25 +0000 Subject: [PATCH 2/8] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- vizro-ai/hatch.toml | 2 +- vizro-core/hatch.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/vizro-ai/hatch.toml b/vizro-ai/hatch.toml index 3984b23c5..c55d97eac 100644 --- a/vizro-ai/hatch.toml +++ b/vizro-ai/hatch.toml @@ -53,11 +53,11 @@ dependencies = [ detached = true [envs.docs.scripts] -serve = "mkdocs serve --strict" build = "mkdocs build --strict" # Disable warnings on the linkcheck so that HTTP redirects are accepted. We could ignore only that warning and specify # more advanced settings using a linkcheckerrc config file. link-check = "linkchecker site --check-extern --no-warnings --ignore=404.html --ignore-url=127.0.0.1" +serve = "mkdocs serve --strict" [envs.lint] dependencies = [ diff --git a/vizro-core/hatch.toml b/vizro-core/hatch.toml index cc379e372..6b72bd3b8 100644 --- a/vizro-core/hatch.toml +++ b/vizro-core/hatch.toml @@ -71,11 +71,11 @@ dependencies = [ detached = true [envs.docs.scripts] -serve = "mkdocs serve --strict" build = "mkdocs build --strict" # Disable warnings on the linkcheck so that HTTP redirects are accepted. We could ignore only that warning and specify # more advanced settings using a linkcheckerrc config file. link-check = "linkchecker site --check-extern --no-warnings --ignore=404.html --ignore-url=127.0.0.1" +serve = "mkdocs serve --strict" [envs.lint] dependencies = [ From fff2d9cc5fedd1b8b6202f322ac4569e255645c3 Mon Sep 17 00:00:00 2001 From: Antony Milne Date: Mon, 13 May 2024 16:25:50 +0100 Subject: [PATCH 3/8] Add dependency and changelog --- ...13_162508_antony.milne_add_link_checker.md | 48 +++++++++++++++++++ vizro-ai/hatch.toml | 3 +- ...13_162501_antony.milne_add_link_checker.md | 48 +++++++++++++++++++ vizro-core/hatch.toml | 3 +- 4 files changed, 100 insertions(+), 2 deletions(-) create mode 100644 vizro-ai/changelog.d/20240513_162508_antony.milne_add_link_checker.md create mode 100644 vizro-core/changelog.d/20240513_162501_antony.milne_add_link_checker.md diff --git a/vizro-ai/changelog.d/20240513_162508_antony.milne_add_link_checker.md b/vizro-ai/changelog.d/20240513_162508_antony.milne_add_link_checker.md new file mode 100644 index 000000000..f1f65e73c --- /dev/null +++ b/vizro-ai/changelog.d/20240513_162508_antony.milne_add_link_checker.md @@ -0,0 +1,48 @@ + + + + + + + + + diff --git a/vizro-ai/hatch.toml b/vizro-ai/hatch.toml index c55d97eac..86f250fb7 100644 --- a/vizro-ai/hatch.toml +++ b/vizro-ai/hatch.toml @@ -48,7 +48,8 @@ dependencies = [ "mkdocs", "mkdocs-material", "mkdocs-git-revision-date-localized-plugin", - "mkdocstrings[python]" + "mkdocstrings[python]", + "linkchecker", ] detached = true diff --git a/vizro-core/changelog.d/20240513_162501_antony.milne_add_link_checker.md b/vizro-core/changelog.d/20240513_162501_antony.milne_add_link_checker.md new file mode 100644 index 000000000..f1f65e73c --- /dev/null +++ b/vizro-core/changelog.d/20240513_162501_antony.milne_add_link_checker.md @@ -0,0 +1,48 @@ + + + + + + + + + diff --git a/vizro-core/hatch.toml b/vizro-core/hatch.toml index 6b72bd3b8..a79d9843e 100644 --- a/vizro-core/hatch.toml +++ b/vizro-core/hatch.toml @@ -66,7 +66,8 @@ dependencies = [ "mkdocs", "mkdocs-material", "mkdocs-git-revision-date-localized-plugin", - "mkdocstrings[python]" + "mkdocstrings[python]", + "linkchecker", ] detached = true From 1070000d5b97fba8d3d729b429ed1d665d00d1f9 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 13 May 2024 15:27:13 +0000 Subject: [PATCH 4/8] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- vizro-ai/hatch.toml | 2 +- vizro-core/hatch.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/vizro-ai/hatch.toml b/vizro-ai/hatch.toml index 86f250fb7..2bb48a12c 100644 --- a/vizro-ai/hatch.toml +++ b/vizro-ai/hatch.toml @@ -49,7 +49,7 @@ dependencies = [ "mkdocs-material", "mkdocs-git-revision-date-localized-plugin", "mkdocstrings[python]", - "linkchecker", + "linkchecker" ] detached = true diff --git a/vizro-core/hatch.toml b/vizro-core/hatch.toml index a79d9843e..ada814d3e 100644 --- a/vizro-core/hatch.toml +++ b/vizro-core/hatch.toml @@ -67,7 +67,7 @@ dependencies = [ "mkdocs-material", "mkdocs-git-revision-date-localized-plugin", "mkdocstrings[python]", - "linkchecker", + "linkchecker" ] detached = true From 817c1a5e75fbb3f8a939ece986a1640cbf3b07ac Mon Sep 17 00:00:00 2001 From: Antony Milne Date: Mon, 13 May 2024 16:51:08 +0100 Subject: [PATCH 5/8] Fix vizro-ai docs --- vizro-ai/hatch.toml | 5 +++-- vizro-core/.readthedocs.yaml | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/vizro-ai/hatch.toml b/vizro-ai/hatch.toml index 2bb48a12c..daa68982c 100644 --- a/vizro-ai/hatch.toml +++ b/vizro-ai/hatch.toml @@ -56,8 +56,9 @@ detached = true [envs.docs.scripts] build = "mkdocs build --strict" # Disable warnings on the linkcheck so that HTTP redirects are accepted. We could ignore only that warning and specify -# more advanced settings using a linkcheckerrc config file. -link-check = "linkchecker site --check-extern --no-warnings --ignore=404.html --ignore-url=127.0.0.1" +# more advanced settings using a linkcheckerrc config file. openai.com doesn't seem to work well with linkchecking, +# throwing 403 errors, but these are not real errors. +link-check = "linkchecker site --check-extern --no-warnings --ignore=404.html --ignore-url=127.0.0.1 --ignore-url=https://platform.openai.com/docs/models --ignore-url=openai.com --ignore-url=https://openai.com/" serve = "mkdocs serve --strict" [envs.lint] diff --git a/vizro-core/.readthedocs.yaml b/vizro-core/.readthedocs.yaml index ef53d5cc8..4282838d3 100644 --- a/vizro-core/.readthedocs.yaml +++ b/vizro-core/.readthedocs.yaml @@ -11,6 +11,6 @@ build: python: "3.11" commands: - pip install hatch - - cd vizro-ai/ && hatch run docs:build && hatch run docs:link-check + - cd vizro-core/ && hatch run docs:build && hatch run docs:link-check - mkdir --parents $READTHEDOCS_OUTPUT - mv vizro-core/site/ $READTHEDOCS_OUTPUT/html From 5b44a648f973ea44fbefe95039a30876dc60afb2 Mon Sep 17 00:00:00 2001 From: Antony Milne Date: Mon, 13 May 2024 16:59:21 +0100 Subject: [PATCH 6/8] Fix vizro-core docs apart from INCITS --- vizro-core/docs/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vizro-core/docs/index.md b/vizro-core/docs/index.md index aa5b85ad5..bb1dc7952 100644 --- a/vizro-core/docs/index.md +++ b/vizro-core/docs/index.md @@ -38,7 +38,7 @@ Vizro is a toolkit for creating modular data visualization applications. --- [:octicons-arrow-right-24: How is Vizro different to Streamlit?](pages/explanation/faq/#how-does-vizro-differ-from-dash-or-streamlit)
- [:octicons-arrow-right-24: Other FAQs](/pages/explanation/faq/) + [:octicons-arrow-right-24: Other FAQs](pages/explanation/faq/) From 350ba227c98542ced34bedf5cba8480318eae696 Mon Sep 17 00:00:00 2001 From: Jo Stichbury Date: Mon, 13 May 2024 17:44:18 +0100 Subject: [PATCH 7/8] Update documentation-style-guide.md --- vizro-core/docs/pages/explanation/documentation-style-guide.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vizro-core/docs/pages/explanation/documentation-style-guide.md b/vizro-core/docs/pages/explanation/documentation-style-guide.md index 1b28f6d78..0391c96d2 100644 --- a/vizro-core/docs/pages/explanation/documentation-style-guide.md +++ b/vizro-core/docs/pages/explanation/documentation-style-guide.md @@ -6,7 +6,7 @@ This is the style guide we apply to the [Vizro documentation](https://vizro.read We ask anyone kind enough to contribute documentation changes to follow this style for consistency and simplicity. -What follows is a set of lightweight guidelines rather than rules. There are always edge cases and exceptions, and if it's not obvious what the style should be, consult the [Microsoft style guide](https://docs.microsoft.com/en-gb/style-guide/welcome/) for an example of good practice. We also use the [INCITS Inclusive Terminology Guidelines](https://standards.incits.org/apps/group_public/download.php/131246/eb-2021-00288-001-INCITS-Inclusive-Terminology-Guidelines.pdf). +What follows is a set of lightweight guidelines rather than rules. There are always edge cases and exceptions, and if it's not obvious what the style should be, consult the [Microsoft style guide](https://docs.microsoft.com/en-gb/style-guide/welcome/) for an example of good practice. We also check the [ensure inclusive terminology](https://developers.google.com/style/inclusive-documentation) with the Google developer documentation style guide. ## Vizro lexicon From d34fed7c5d93d98c08fc4622df9080824550ecc1 Mon Sep 17 00:00:00 2001 From: Antony Milne <49395058+antonymilne@users.noreply.github.com> Date: Tue, 14 May 2024 09:00:32 +0100 Subject: [PATCH 8/8] Update vizro-core/docs/pages/explanation/documentation-style-guide.md Signed-off-by: Antony Milne <49395058+antonymilne@users.noreply.github.com> --- vizro-core/docs/pages/explanation/documentation-style-guide.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vizro-core/docs/pages/explanation/documentation-style-guide.md b/vizro-core/docs/pages/explanation/documentation-style-guide.md index 0391c96d2..6d456c5e0 100644 --- a/vizro-core/docs/pages/explanation/documentation-style-guide.md +++ b/vizro-core/docs/pages/explanation/documentation-style-guide.md @@ -6,7 +6,7 @@ This is the style guide we apply to the [Vizro documentation](https://vizro.read We ask anyone kind enough to contribute documentation changes to follow this style for consistency and simplicity. -What follows is a set of lightweight guidelines rather than rules. There are always edge cases and exceptions, and if it's not obvious what the style should be, consult the [Microsoft style guide](https://docs.microsoft.com/en-gb/style-guide/welcome/) for an example of good practice. We also check the [ensure inclusive terminology](https://developers.google.com/style/inclusive-documentation) with the Google developer documentation style guide. +What follows is a set of lightweight guidelines rather than rules. There are always edge cases and exceptions, and if it's not obvious what the style should be, consult the [Microsoft style guide](https://docs.microsoft.com/en-gb/style-guide/welcome/) for an example of good practice. We also [ensure inclusive terminology](https://developers.google.com/style/inclusive-documentation) with the Google developer documentation style guide. ## Vizro lexicon