-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor: refactor visualisations #56
Conversation
The problem now is that I don't know why the Sphinx Gallery isn't working properly (It seems that it does not correctly use |
I don't think it's possible to cover the second one because we're running coverage tests in Python 3.7. The code snippet in the second image will only be runned if you have a Python version greater than 3.7. I suggest we add a |
Yes, the problem persists on local machine |
@KD-7 Found a dirty but effective solution. My guess is that some other plugin is interfering with the way sphinx gallery works. If I adjust the position of the extension so that sphinx gallery is the first one (as shown below), it works without any exceptions. But the images are not generated correctly (this is because of our example code).
Edit. It seems that if we put |
The reason why image is not shown is because of their If we use class SphinxGalleryOrcaRenderer(ExternalRenderer):
def render(self, fig_dict):
stack = inspect.stack()
# Name of script from which plot function was called is retrieved
try:
filename = stack[3].filename # let's hope this is robust...
except: # python 2
filename = stack[3][1]
filename_root, _ = os.path.splitext(filename)
filename_html = filename_root + ".html"
filename_png = filename_root + ".png"
... In our case, since we are not calling Note: When we use our
If we call
We can see that for the first one, |
@KD-7 Ready for review again. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Excellent work, we just need to add two things:
- Examples for all the plotters
- Design considerations for visualisations
Let's do this in two new PRs. |
Address #53, #54