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

Documentation tied to version of compas pkg. #341

Closed
tetov opened this issue Sep 29, 2019 · 13 comments
Closed

Documentation tied to version of compas pkg. #341

tetov opened this issue Sep 29, 2019 · 13 comments

Comments

@tetov
Copy link
Contributor

tetov commented Sep 29, 2019

Documentation tied to version of compas pkg.

Problem description

I'd guess that the majority of users are installing compas from pypi or conda which means that they are installing the repo at a tagged commit. If they want to view the documentation online however they will see documentation from the most recent commit, which could cause confusion.

So the correct (version specific) documentation will be available in the installed package but not online.

Proposed solution

I think it would be good to consider a system that allows documentation tied to tagged commits.

Two examples with both works with Sphinx would be:

Sphinxcontrib-versioning could probably work with our current Invoke solution while a solution like ReadTheDocs would mean having the docs built and hosted by another service.

If there's interest I'd happily help making this change.

@tomvanmele
Copy link
Member

hi anton,

yes, that is indeed an unsolved problem that causes confusion. especially when we make backwards incompatible changes to the API.

as far as i know, it is not possible to use your own theme with RTD, so i would prefer the sphinxcontrib-versioning solution.

would be helpful indeed if you could propose a solution.

thanks,
tom

@tetov
Copy link
Contributor Author

tetov commented Sep 29, 2019

Hi Tom!

I see. Yeah, RTD only allows its own theme or the standard Sphinx theme.

I will try to get the versioning-extension to work in the coming week. There's is some questions regarding the maintenance of the project, see sphinx-contrib/sphinxcontrib-versioning#59, but there seems to be people interested and keen to keep it going.

EDIT
Here's an example of sphinxcontrib-versioning in use, source. Adding it here to give an example, and as a note to self.

@tetov
Copy link
Contributor Author

tetov commented Sep 30, 2019

image

Easiest would be to add the version selection like mockup above. Would that be a good solution?

And make the current version bold or in a different color.

@tomvanmele
Copy link
Member

if clicking on the version number switches the docs to the corresponding version, then that is great :)

@worbit
Copy link
Contributor

worbit commented Oct 1, 2019

pasting here from a parallel discussion:

the “problem” is indeed related to this. however, in the specific case of delaunay and trimesh, the api docs do correspond to the current conda package version (0.7.2) but the examples and tutorials reflect an older state. not sure how these get generated…

context: we encountered in the MAS compas introduction, that the example mesh-delaunay-from-points and mesh-remeshing both import from compas.topology intsead of compas.geometry and compas.datastructures respectively.

@tetov
Copy link
Contributor Author

tetov commented Oct 1, 2019

pasting here from a parallel discussion:

the “problem” is indeed related to this. however, in the specific case of delaunay and trimesh, the api docs do correspond to the current conda package version (0.7.2) but the examples and tutorials reflect an older state. not sure how these get generated…

context: we encountered in the MAS compas introduction, that the example mesh-delaunay-from-points and mesh-remeshing both import from compas.topology intsead of compas.geometry and compas.datastructures respectively.

I'm currently updating the examples (docs/examples/) to make them work with v0.7.2. I'm not sure the examples as they are set up now could be tied to versions.. I'll have a look.

@tomvanmele
Copy link
Member

the examples will need some manual maintenance. there is no way around this. we should clearly mention that people have to report broken examples on the issue tracker...

@tetov
Copy link
Contributor Author

tetov commented Oct 1, 2019

Examples updated, see PR #343
Found a tutorial that needs updating but might be better for someone else to look at since I don't really understand the tutorial yet haha. See issue #344

@tetov
Copy link
Contributor Author

tetov commented Oct 15, 2019

I haven't forgotten this, I've tried to get it working but no luck so far. See linked issue for more details.

sphinx-contrib/sphinxcontrib-versioning#70

@tetov
Copy link
Contributor Author

tetov commented Nov 19, 2019

Documentation will reflect latest release, PR #396. Closing.

@tetov tetov closed this as completed Nov 19, 2019
@tetov
Copy link
Contributor Author

tetov commented Nov 27, 2019

Adding this as a note to future self, we would need to amend old tagged commits to add sphinxcontrib_versioning to the conf.py extension array.
sphinx-contrib/sphinxcontrib-versioning#70 (comment)

@tetov
Copy link
Contributor Author

tetov commented Jul 15, 2020

This might be something to look at again, I've been following the development of a new sphinx plugin, sphinx-multiversion.

I can do some test, maybe this weekend..

@tetov tetov reopened this Jul 15, 2020
@yck011522
Copy link
Contributor

Generic Ping.

I see that compas_fab have this versioning already. I don't know the implementation details but maybe we can use the same system? compas-dev/compas_fab#196

Maybe @gonzalocasas have some experience?

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

No branches or pull requests

4 participants