From ea80ae2837c4d00d77007674b02ed55bf430c6ea Mon Sep 17 00:00:00 2001 From: Tomas Pereira de Vasconcelos Date: Wed, 20 Nov 2024 16:26:12 +0000 Subject: [PATCH 1/8] Upgrade to `kaleido==1.0.0rc0` --- requirements/docs.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements/docs.txt b/requirements/docs.txt index 7d3ebb50..2230eb79 100644 --- a/requirements/docs.txt +++ b/requirements/docs.txt @@ -28,5 +28,5 @@ matplotlib # Cleanup generated files pre_commit_hooks -# TODO: revert this (https://github.com/plotly/Kaleido/issues/226) -kaleido<0.4 +# TODO: move this line (https://github.com/plotly/Kaleido/issues/226) +kaleido==1.0.0rc0 From 5397ce6cd513f2bda69d9c996e1ea25850ba3a50 Mon Sep 17 00:00:00 2001 From: Tomas Pereira de Vasconcelos Date: Wed, 20 Nov 2024 17:13:06 +0000 Subject: [PATCH 2/8] Install `chromium-browser` in readthedocs build instances --- .readthedocs.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.readthedocs.yaml b/.readthedocs.yaml index 40d9f961..c128eeaa 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -3,9 +3,12 @@ version: 2 build: - os: ubuntu-22.04 + os: ubuntu-lts-latest tools: python: "3.9" + apt_packages: + # chromium-browser is required by Kaleido to generate Plotly figures via fig.write_image() + - chromium-browser python: install: From a09347959f8f22f587dbaf12dfdaf613172d4633 Mon Sep 17 00:00:00 2001 From: Tomas Pereira de Vasconcelos Date: Wed, 20 Nov 2024 19:07:05 +0000 Subject: [PATCH 3/8] Update kaleido dep --- Makefile | 2 +- requirements/cicd_utils.txt | 3 ++- requirements/docs.txt | 3 --- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 7f1910f4..f2cd9b8c 100644 --- a/Makefile +++ b/Makefile @@ -94,7 +94,7 @@ clean-pyc: ## remove Python file artifacts .PHONY: clean-cov clean-cov: ## remove coverage artifacts @echo "==> Removing coverage artifacts..." - find . \( -name 'coverage.*.xml' -o -name '.coverage.*' \) -exec rm -fr {} + + find . \( -name 'coverage.*.xml' -o -name 'coverage.xml' -o -name '.coverage.*' \) -exec rm -fr {} + rm -fr coverage/ diff --git a/requirements/cicd_utils.txt b/requirements/cicd_utils.txt index 28618904..c9d8580e 100644 --- a/requirements/cicd_utils.txt +++ b/requirements/cicd_utils.txt @@ -1,6 +1,7 @@ # ./cicd_utils/cicd/compile_plotly_charts.py minify-html -kaleido +# TODO: unpin after 1.0.0 (https://github.com/plotly/Kaleido/issues/226) +kaleido==1.0.0rc0 # ./cicd_utils/cicd/scripts/extract_latest_release_notes.py markdown-it-py diff --git a/requirements/docs.txt b/requirements/docs.txt index 2230eb79..5bb51f9a 100644 --- a/requirements/docs.txt +++ b/requirements/docs.txt @@ -27,6 +27,3 @@ matplotlib # Cleanup generated files pre_commit_hooks - -# TODO: move this line (https://github.com/plotly/Kaleido/issues/226) -kaleido==1.0.0rc0 From bc9df1f802650b06f1eda912de758475ac3a7f07 Mon Sep 17 00:00:00 2001 From: Tomas Pereira de Vasconcelos Date: Thu, 21 Nov 2024 21:56:08 +0000 Subject: [PATCH 4/8] Update kaleido dep --- requirements/cicd_utils.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements/cicd_utils.txt b/requirements/cicd_utils.txt index c9d8580e..a8dea5c3 100644 --- a/requirements/cicd_utils.txt +++ b/requirements/cicd_utils.txt @@ -1,7 +1,7 @@ # ./cicd_utils/cicd/compile_plotly_charts.py minify-html # TODO: unpin after 1.0.0 (https://github.com/plotly/Kaleido/issues/226) -kaleido==1.0.0rc0 +kaleido>=1.0.0rc0 # ./cicd_utils/cicd/scripts/extract_latest_release_notes.py markdown-it-py From 65496578888d67f940c57313e8245ac5192cd5f6 Mon Sep 17 00:00:00 2001 From: Tomas Pereira de Vasconcelos Date: Fri, 22 Nov 2024 14:54:52 +0000 Subject: [PATCH 5/8] Set `KALEIDO_DEBUG=1` --- .readthedocs.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.readthedocs.yaml b/.readthedocs.yaml index c128eeaa..b80cbd92 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -9,6 +9,9 @@ build: apt_packages: # chromium-browser is required by Kaleido to generate Plotly figures via fig.write_image() - chromium-browser + jobs: + pre_build: + - KALEIDO_DEBUG=1 python: install: From 8da121353bf53fe293ae15e6dec164278c4c8b4e Mon Sep 17 00:00:00 2001 From: Tomas Pereira de Vasconcelos Date: Fri, 22 Nov 2024 15:36:54 +0000 Subject: [PATCH 6/8] Export env var --- .readthedocs.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.readthedocs.yaml b/.readthedocs.yaml index b80cbd92..203ce2fb 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -11,7 +11,7 @@ build: - chromium-browser jobs: pre_build: - - KALEIDO_DEBUG=1 + - export KALEIDO_DEBUG=1 python: install: From e4a9e14586466e42849f462fc0eaa13fe768a12e Mon Sep 17 00:00:00 2001 From: Tomas Pereira de Vasconcelos Date: Sat, 23 Nov 2024 23:09:20 +0000 Subject: [PATCH 7/8] wip: `print(which_browser())` --- .readthedocs.yaml | 3 --- docs/conf.py | 8 ++++++++ tox.ini | 2 +- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.readthedocs.yaml b/.readthedocs.yaml index 203ce2fb..c128eeaa 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -9,9 +9,6 @@ build: apt_packages: # chromium-browser is required by Kaleido to generate Plotly figures via fig.write_image() - chromium-browser - jobs: - pre_build: - - export KALEIDO_DEBUG=1 python: install: diff --git a/docs/conf.py b/docs/conf.py index 279c55c5..193d621d 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -368,6 +368,14 @@ def _fix_html_charts() -> None: def setup(app: Sphinx) -> None: + from choreographer.system import which_browser + + print("-" * 80) + print("-" * 80) + print(which_browser()) + print("-" * 80) + print("-" * 80) + compile_plotly_charts() # app.connect("html-page-context", register_jinja_functions) diff --git a/tox.ini b/tox.ini index 8f4674d9..76f11217 100644 --- a/tox.ini +++ b/tox.ini @@ -63,7 +63,7 @@ passenv = skip_install = true deps = pre-commit commands = - all: pre-commit run --show-diff-on-failure {posargs:} + all: pre-commit run --all-files --show-diff-on-failure {posargs:} quick: pre-commit run black-jupyter --all-files pre-commit run ruff --all-files autoupgrade: pre-commit autoupdate {posargs:} From be2473f59d8cbcc4e3c4d724052d3547b911c4f4 Mon Sep 17 00:00:00 2001 From: Tomas Pereira de Vasconcelos Date: Sat, 23 Nov 2024 23:20:30 +0000 Subject: [PATCH 8/8] revert to `kaleido<0.4` --- docs/conf.py | 8 -------- requirements/cicd_utils.txt | 2 +- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 193d621d..279c55c5 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -368,14 +368,6 @@ def _fix_html_charts() -> None: def setup(app: Sphinx) -> None: - from choreographer.system import which_browser - - print("-" * 80) - print("-" * 80) - print(which_browser()) - print("-" * 80) - print("-" * 80) - compile_plotly_charts() # app.connect("html-page-context", register_jinja_functions) diff --git a/requirements/cicd_utils.txt b/requirements/cicd_utils.txt index a8dea5c3..eea35d5a 100644 --- a/requirements/cicd_utils.txt +++ b/requirements/cicd_utils.txt @@ -1,7 +1,7 @@ # ./cicd_utils/cicd/compile_plotly_charts.py minify-html # TODO: unpin after 1.0.0 (https://github.com/plotly/Kaleido/issues/226) -kaleido>=1.0.0rc0 +kaleido<0.4 # ./cicd_utils/cicd/scripts/extract_latest_release_notes.py markdown-it-py