Skip to content

docs: adding plottly support to gallery examples - #2346

Merged
germa89 merged 24 commits into
mainfrom
doc/adding-plotly-support-to-docs
May 27, 2025
Merged

docs: adding plottly support to gallery examples#2346
germa89 merged 24 commits into
mainfrom
doc/adding-plotly-support-to-docs

Conversation

@germa89

@germa89 germa89 commented Sep 19, 2023

Copy link
Copy Markdown
Collaborator

@germa89 germa89 self-assigned this Sep 19, 2023
@codecov

codecov Bot commented Sep 19, 2023

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.28%. Comparing base (f0ce90f) to head (4781da1).
Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2346      +/-   ##
==========================================
- Coverage   88.33%   88.28%   -0.05%     
==========================================
  Files         187      187              
  Lines       14906    14906              
==========================================
- Hits        13167    13160       -7     
- Misses       1739     1746       +7     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@germa89

germa89 commented Sep 19, 2023

Copy link
Copy Markdown
Collaborator Author

It renders a white empty space:

image

@germa89

germa89 commented Sep 20, 2023

Copy link
Copy Markdown
Collaborator Author

Currently it is needing something on ansys-sphinx-theme. Nothing we can do about this at the moment. Converting in draft.

@germa89
germa89 marked this pull request as draft September 20, 2023 13:50
@germa89 germa89 added the DO NOT MERGE Not ready to be merged yet label Sep 20, 2023
@germa89

germa89 commented Sep 21, 2023

Copy link
Copy Markdown
Collaborator Author

If depends on ansys-sphinx-theme, we need first for this to resolve: ansys/ansys-sphinx-theme#301

@germa89

germa89 commented Sep 21, 2023

Copy link
Copy Markdown
Collaborator Author

Closing for the moment.

@germa89 germa89 closed this Sep 21, 2023
@germa89
germa89 deleted the doc/adding-plotly-support-to-docs branch September 21, 2023 11:41
@germa89
germa89 restored the doc/adding-plotly-support-to-docs branch October 15, 2024 09:00
@germa89 germa89 reopened this Oct 15, 2024
@github-actions github-actions Bot added examples Publishing PyMAPDL examples documentation Documentation related (improving, adding, etc) labels Oct 15, 2024
@germa89

germa89 commented Oct 15, 2024

Copy link
Copy Markdown
Collaborator Author

Still it does not work... I get a white space instead of the plot.

image

I did build the documentation using the CICD, download the html artifact and open it with the browser. I believe, I do not require to have a live http server.... But I might be wrong

@jorgepiloto @Revathyvenugopal162

@jorgepiloto

jorgepiloto commented Oct 17, 2024

Copy link
Copy Markdown
Member

Could you try this config, @germa89? https://github.com/plotly/plotly-sphinx-gallery/blob/9a82c6de451843cd86368a07770adc661f2918fe/docs/conf.py#L187-L198

GitHub
Demo of gallery of examples using plotly for visualization and sphinx-gallery - plotly/plotly-sphinx-gallery

@germa89

germa89 commented Nov 25, 2024

Copy link
Copy Markdown
Collaborator Author

Could you try this config, @germa89? https://github.com/plotly/plotly-sphinx-gallery/blob/9a82c6de451843cd86368a07770adc661f2918fe/docs/conf.py#L187-L198

GitHub**plotly-sphinx-gallery/docs/conf.py at 9a82c6de451843cd86368a07770adc661f2918fe · plotly/plotly-sphinx-gallery**Demo of gallery of examples using plotly for visualization and sphinx-gallery - plotly/plotly-sphinx-gallery

Testing this in dbb3516

GitHub
Demo of gallery of examples using plotly for visualization and sphinx-gallery - plotly/plotly-sphinx-gallery

@germa89

germa89 commented Nov 26, 2024

Copy link
Copy Markdown
Collaborator Author

@jorgepiloto it is still broken... Maybe I am doing something wrong? Can you check the example and/or configuration?

@germa89

germa89 commented Feb 10, 2025

Copy link
Copy Markdown
Collaborator Author

Closing because of stale. @jorgepiloto

@germa89 germa89 closed this Feb 10, 2025
@germa89 germa89 reopened this Mar 17, 2025
@Revathyvenugopal162

Copy link
Copy Markdown
Contributor

tested with latest artifact and working as expected in edge
Screenshot 2025-03-26 at 17 20 33

Comment thread .github/workflows/doc-build.yml Outdated
@germa89
germa89 marked this pull request as ready for review March 26, 2025 17:28
@germa89
germa89 requested a review from a team as a code owner March 26, 2025 17:28
@germa89
germa89 requested a review from clatapie March 26, 2025 17:28
@clatapie

Copy link
Copy Markdown
Contributor

Here is the plot I obtain when downloading the PR's artifacts (973c746):
image

As visible on the following screenshot, the widget are working even though the initial plot is a little bit cropped:
image

Comment thread .github/workflows/doc-build.yml Outdated
Comment thread .github/workflows/doc-build.yml Outdated
Comment thread pyproject.toml Outdated
Comment thread pyproject.toml Outdated
@github-actions github-actions Bot removed the CI/CD Related with CICD, Github Actions, etc label Mar 27, 2025
@germa89

germa89 commented Mar 28, 2025

Copy link
Copy Markdown
Collaborator Author

@Revathyvenugopal162 now you know the struggle! 🤣

@github-actions github-actions Bot removed dependencies maintenance General maintenance of the repo (libraries, cicd, etc) labels Apr 1, 2025
@germa89

germa89 commented Apr 23, 2025

Copy link
Copy Markdown
Collaborator Author

Safari shows nothing on the artifacts. Edge and Chrome (same engine) shows the graph cropped.

I am going to merge and see how the deployed docs looks like (which is what matters). If it does not look good, I will revert the merge.

@germa89
germa89 enabled auto-merge (squash) April 23, 2025 12:37
@germa89
germa89 merged commit 9b0672e into main May 27, 2025
@germa89
germa89 deleted the doc/adding-plotly-support-to-docs branch May 27, 2025 11:09
@germa89

germa89 commented May 27, 2025

Copy link
Copy Markdown
Collaborator Author

Hello guys

After merging this, it looks nice:

https://mapdl.docs.pyansys.com/version/dev/examples/gallery_examples/00-mapdl-examples/2d_plate_with_a_hole.html#analytical-comparison

image

But when you load....

image

Surprise!...

You can open the same page in Incognito and it will look ok until you reload.

I guess something is stuck on the page memory... probably because of this line:

html_js_files = ["https://cdn.plot.ly/plotly-3.0.1.min.js"]

I will check after your feedback @Revathyvenugopal162 @jorgepiloto @clatapie @RobPasMue

PyAnsys

@germa89 germa89 mentioned this pull request May 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

DO NOT MERGE Not ready to be merged yet documentation Documentation related (improving, adding, etc) examples Publishing PyMAPDL examples

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Plotly capabilities to gallery examples

5 participants