Skip to content
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

Fix image link (not showing up on the web) #3454

Merged
merged 1 commit into from
Apr 23, 2019

Conversation

davidbrochart
Copy link
Contributor

The image was pointing to local smc.png file, and not showing in https://docs.pymc.io/notebooks/SMC2_gaussians.html.

@review-notebook-app
Copy link

Check out this pull request on ReviewNB: https://app.reviewnb.com/pymc-devs/pymc3/pull/3454

Visit www.reviewnb.com to know how we simplify your Jupyter Notebook workflows.

@twiecki twiecki merged commit 35813f7 into pymc-devs:master Apr 23, 2019
@twiecki
Copy link
Member

twiecki commented Apr 23, 2019

Thanks!

@davidbrochart
Copy link
Contributor Author

Actually, I can see here that it fetches the image there:

<img alt="../_images/notebooks_SMC2_gaussians_14_0.png" src="../_images/notebooks_SMC2_gaussians_14_0.png" />

So I don't think my change will fix anything.

twiecki added a commit that referenced this pull request Apr 23, 2019
@davidbrochart
Copy link
Contributor Author

The image could be embedded in the notebook:

from IPython.display import Image
Image('smc.png')

But that can't be in the same markdown cell.
Otherwise I don't know how the online documentation is created from the notebook.
cc @aloctavodia

@ColCarroll
Copy link
Member

I still do not understand why your change did not work. In the radon example, a markdown image is used:

![radon](https://www.cgenarchive.org/uploads/2/5/2/6/25269392/7758459_orig.jpg)

I do not understand how that would be different from what you already did?

SMC 2 Gaussians

@davidbrochart
Copy link
Contributor Author

Yes but https://docs.pymc.io/notebooks/SMC2_gaussians.html has this line:

<img alt="../_images/notebooks_SMC2_gaussians_14_0.png" src="../_images/notebooks_SMC2_gaussians_14_0.png" />

instead of:

<img alt="https://github.com/pymc-devs/pymc3/raw/master/docs/source/notebooks/smc.png" src="https://github.com/pymc-devs/pymc3/raw/master/docs/source/notebooks/smc.png" />

I don't know how this static HTML file is built from the notebook.

@ColCarroll
Copy link
Member

Oh shoot. I wrote that 🤦‍♂️. I think markdown/html should be just rendered as markdown/html, but let me go find the right code.

@ColCarroll
Copy link
Member

On review this code only creates the gallery, it does not do the notebook --> html conversion.

Looks like we use nbsphinx. These are the docs for markdown cells, and there is a binder link at the top to the notebook that generates the doc. They also do a remote image with a markdown tag instead of raw html, so maybe we try that?

Remote image: ![Python logo (remote)](https://www.python.org/static/img/python-logo-large.png)

@davidbrochart
Copy link
Contributor Author

Even a local image seems to work:

Local image: ![Jupyter notebook icon](images/notebook_icon.png)

But one or the other, the documentation build has to be triggered, is it done when there is a release?

@ColCarroll
Copy link
Member

I need more coffee. So this original PR was fine, I guess?

Yes, the build has to be triggered, and we started only triggering doc builds manually on a release.

We're planning to cut a release soon. Should we revert-revert this? @twiecki?

@davidbrochart
Copy link
Contributor Author

Maybe the original PR was fine. It would be good to trigger the doc build locally to check.

@ColCarroll
Copy link
Member

I'll try to remember that tonight (~8hrs). I have a server for testing doc builds.

I'll ping when it is up there.

@ColCarroll
Copy link
Member

Somehow this doesn't make the image show up. I edited locally to the markdown image tag, and that one works:
https://pymc3.colindcarroll.com/notebooks/SMC2_gaussians.html

@ColCarroll
Copy link
Member

Do you have time to make that PR, or want me to send one in?

@davidbrochart davidbrochart deleted the fix_doc branch April 24, 2019 05:33
@davidbrochart
Copy link
Contributor Author

Done in #3455.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants