plinder-org / plinder

Protein Ligand INteraction Dataset and Evaluation Resource
https://plinder.sh
Apache License 2.0
166 stars 9 forks source link

Wrong source links from documentation #73

Closed Endyff closed 1 month ago

Endyff commented 1 month ago

In the Python API documentation, e.g. plinder.core.scores.query_ligand_similarity as well as the others, the link for the [source] is https://github.com/plinder-org/plinder/blob/v0.1.dev1+g1a8230e/src/plinder/core/scores/ligand.py#L18-L54 is to non-existing tag v0.1.dev1+g1a8230e so we get 404 - page not found error. The correct url should be https://github.com/plinder-org/plinder/blob/main/src/plinder/core/scores/ligand.py#L18-L54 - linking to main.

padix-key commented 1 month ago

Hi, thanks for the report. When you point the source link to the main branch, you can get the problem that the repository and the doc get out of sync: If after the documentation release lines of code are added or removed in main, the highlighted lines do not correspond to the range of the class/function anymore. Hence, the link points the code with the same version the docs were build for.

But still you are correct: The URL is wrong, it should point to https://github.com/plinder-org/plinder/blob/v0.2.10/src/plinder/core/scores/ligand.py#L18-L54. The reason is the git tag: To generate the URLs plinder.__version__ is accessed which again uses the git tag when the package is built.

I suspect the CI is the culprit here. The docs workflow runs in parallel to the main workflow, so docs does not use the new git tag, as it is generated in the main workflow. Instead it presumably uses the autogenerated version from setuptools-scm, in this case v0.1.dev1+g1a8230e.

I will create a PR and check if my theory is correct :wink: