OpenMS / pyopenms-docs

pyOpenMS readthedocs documentation, additional utilities, addons, scripts, and examples.
https://pyopenms.readthedocs.io
Other
46 stars 55 forks source link

Double-check case sensitivity of anchor links #147

Closed jpfeuffer closed 1 year ago

jpfeuffer commented 3 years ago

Because the case sensitivity might be different between RST and ipynb (stricter).

E.g. (Peptide identification section)[#peptideidentification] to (Peptide identification section)[#PeptideIdentification]

timosachsenberg commented 3 years ago

might need to be added to PR template

jpfeuffer commented 3 years ago

Or "mass-defect" vs "Mass-Defect"

poshul commented 3 years ago

These are all done except for wrap_classes, which was causing me issues.

jpfeuffer commented 3 years ago

What do you mean? Can you post an example reference to the problematic link(s)?

jpfeuffer commented 3 years ago

And thanks!

poshul commented 3 years ago

for example the links to simpleexample and complex example on line 62 don't work in Jupyter. I was still fighting with the syntax to get them to work on Friday, but haven't had a chance to finish up that work, and likely wont in the next couple of days.

jpfeuffer commented 3 years ago

Ah I see. Those are special RST style links SimpleExample_. They point to an additional HTML span element created with e.g. .. _SimpleExample. I don't think this (empty) span is converted into markdown of the ipynb. It is probably better if we use "normal" links to headers that are always present:

`simple example <#A-simple-example>`_

or something like this.

tapaswenipathak commented 2 years ago

@greengypsy: can you check if there is existing documentation for this? If not, add and close?

matteopilz commented 1 year ago

The class & function references are also not working now, how should we do this?

jpfeuffer commented 1 year ago

You mean in ipynb? It never worked. ipynb has no knowledge about the API documentation. We could only link back to the readthedocs page. Could be done with another custom pandoc "plugin" that looks for :py:class: roles during conversion and treats them specially.

matteopilz commented 1 year ago

Yes, in ipynb. It probably wasn't mentioned before, because we only had a few of them. I will look into pandoc and try to find out if we can write a conversion script / plugin.

jpfeuffer commented 1 year ago

Here is a filter with which we change the links: https://github.com/OpenMS/pyopenms-docs/blob/master/docs/pandoc_filters/transformlinks_pandocfilter.py