Tribler/py-ipv8

Basic tutorial does not work

bacox opened this issue · 4 comments

bacox commented

If you run one of the basic tutorials (https://py-ipv8.readthedocs.io/en/latest/basics/overlay_tutorial.html) using the latest release, it will crash. In this case, the function run_forever is not in the latest release. There is a mismatch between de version of the docs online and the latest release.

I think the following points are of interest:

  1. The documentation on readthedocs is based on the main branch of the repo and not on the latest released version. It would be nice if the documentation of readthedocs is based on the latest release.
  2. It would also be great if you can select the version in readthedocs.

Thanks for the feedback. I'll check if I can instruct ReadTheDocs to save historical documentation. If it seems like too much overhead, this idea will be dropped: the bleeding edge code is usually compatible with the latest release anyway.

mg98 commented

I also encountered this.

I think if we just

git checkout 2.11
git checkout -b stable
git push -u origin stable

the docs would

  • default to the latest release (stable)
  • give you the option to select historical releases
  • still show latest (master)

https://docs.readthedocs.io/en/stable/versions.html

@mg98 thanks for the suggestion: new branches are not an option for us but we do support/have historical tags, which your linked docs suggest are also supported.

As it turns out, I can have old versions built with a single click:
versions

However, old versions are not compatible with the new ReadTheDocs build system and they fail to build. So, unless I do revisionist history and push new settings to ancient versions of IPv8 by force-pushing (which is a NO-NO unless it is a life-or-death situation), I'll only be able to store old documentation from the current version (2.12) onward. Not ideal, but, with that I consider this issue solved.

By the way, here is 2.12: https://py-ipv8.readthedocs.io/en/2.12/