Skip to content

Commit

Permalink
[CI] Fix docs build (#537)
Browse files Browse the repository at this point in the history
  • Loading branch information
antonymilne authored Jun 19, 2024
1 parent e1a96b4 commit 7952e00
Show file tree
Hide file tree
Showing 6 changed files with 106 additions and 4 deletions.
4 changes: 3 additions & 1 deletion vizro-ai/.readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ build:
python: "3.11"
commands:
- pip install hatch
- cd vizro-ai/ && hatch run docs:build && hatch run docs:link-check
- cd vizro-ai/ && hatch run docs:pip freeze
- cd vizro-ai/ && hatch run docs:build
- cd vizro-ai/ && hatch run docs:link-check
- mkdir --parents $READTHEDOCS_OUTPUT
- mv vizro-ai/site/ $READTHEDOCS_OUTPUT/html
48 changes: 48 additions & 0 deletions vizro-ai/changelog.d/20240619_105033_antony.milne_fix_docs.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
<!--
A new scriv changelog fragment.
Uncomment the section that is right (remove the HTML comment wrapper).
-->

<!--
### Highlights ✨
- A bullet item for the Highlights ✨ category with a link to the relevant PR at the end of your entry, e.g. Enable feature XXX ([#1](https://github.com/mckinsey/vizro/pull/1))
-->
<!--
### Removed
- A bullet item for the Removed category with a link to the relevant PR at the end of your entry, e.g. Enable feature XXX ([#1](https://github.com/mckinsey/vizro/pull/1))
-->
<!--
### Added
- A bullet item for the Added category with a link to the relevant PR at the end of your entry, e.g. Enable feature XXX ([#1](https://github.com/mckinsey/vizro/pull/1))
-->
<!--
### Changed
- A bullet item for the Changed category with a link to the relevant PR at the end of your entry, e.g. Enable feature XXX ([#1](https://github.com/mckinsey/vizro/pull/1))
-->
<!--
### Deprecated
- A bullet item for the Deprecated category with a link to the relevant PR at the end of your entry, e.g. Enable feature XXX ([#1](https://github.com/mckinsey/vizro/pull/1))
-->
<!--
### Fixed
- A bullet item for the Fixed category with a link to the relevant PR at the end of your entry, e.g. Enable feature XXX ([#1](https://github.com/mckinsey/vizro/pull/1))
-->
<!--
### Security
- A bullet item for the Security category with a link to the relevant PR at the end of your entry, e.g. Enable feature XXX ([#1](https://github.com/mckinsey/vizro/pull/1))
-->
3 changes: 2 additions & 1 deletion vizro-ai/hatch.toml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ dependencies = [
"mkdocs-material",
"mkdocs-git-revision-date-localized-plugin",
"mkdocstrings[python]",
"mkdocstrings-python<1.10.4",
"linkchecker"
]
detached = true
Expand All @@ -58,7 +59,7 @@ 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. 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/"
link-check = "linkchecker site --check-extern --no-warnings --ignore=404.html --ignore-url=127.0.0.1 --ignore-url=https://vizro.readthedocs.io/ --ignore-url=https://platform.openai.com/docs/models --ignore-url=openai.com --ignore-url=https://openai.com/"
serve = "mkdocs serve --strict"

[envs.lint]
Expand Down
4 changes: 3 additions & 1 deletion vizro-core/.readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ build:
python: "3.11"
commands:
- pip install hatch
- cd vizro-core/ && hatch run docs:build && hatch run docs:link-check
- cd vizro-core/ && hatch run docs:pip freeze
- cd vizro-core/ && hatch run docs:build
- cd vizro-core/ && hatch run docs:link-check
- mkdir --parents $READTHEDOCS_OUTPUT
- mv vizro-core/site/ $READTHEDOCS_OUTPUT/html
48 changes: 48 additions & 0 deletions vizro-core/changelog.d/20240619_102218_antony.milne_fix_docs.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
<!--
A new scriv changelog fragment.
Uncomment the section that is right (remove the HTML comment wrapper).
-->

<!--
### Highlights ✨
- A bullet item for the Highlights ✨ category with a link to the relevant PR at the end of your entry, e.g. Enable feature XXX ([#1](https://github.com/mckinsey/vizro/pull/1))
-->
<!--
### Removed
- A bullet item for the Removed category with a link to the relevant PR at the end of your entry, e.g. Enable feature XXX ([#1](https://github.com/mckinsey/vizro/pull/1))
-->
<!--
### Added
- A bullet item for the Added category with a link to the relevant PR at the end of your entry, e.g. Enable feature XXX ([#1](https://github.com/mckinsey/vizro/pull/1))
-->
<!--
### Changed
- A bullet item for the Changed category with a link to the relevant PR at the end of your entry, e.g. Enable feature XXX ([#1](https://github.com/mckinsey/vizro/pull/1))
-->
<!--
### Deprecated
- A bullet item for the Deprecated category with a link to the relevant PR at the end of your entry, e.g. Enable feature XXX ([#1](https://github.com/mckinsey/vizro/pull/1))
-->
<!--
### Fixed
- A bullet item for the Fixed category with a link to the relevant PR at the end of your entry, e.g. Enable feature XXX ([#1](https://github.com/mckinsey/vizro/pull/1))
-->
<!--
### Security
- A bullet item for the Security category with a link to the relevant PR at the end of your entry, e.g. Enable feature XXX ([#1](https://github.com/mckinsey/vizro/pull/1))
-->
3 changes: 2 additions & 1 deletion vizro-core/hatch.toml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ dependencies = [
"mkdocs-material",
"mkdocs-git-revision-date-localized-plugin",
"mkdocstrings[python]",
"mkdocstrings-python<1.10.4",
"linkchecker"
]
detached = true
Expand All @@ -76,7 +77,7 @@ detached = true
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"
link-check = "linkchecker site --check-extern --no-warnings --ignore=404.html --ignore-url=127.0.0.1 --ignore-url=https://vizro.readthedocs.io/"
serve = "mkdocs serve --strict"

[envs.lint]
Expand Down

0 comments on commit 7952e00

Please sign in to comment.