python-tuf icon indicating copy to clipboard operation
python-tuf copied to clipboard

docs: python-tuf version should be visible in docs (readthedocs)

Open jku opened this issue 3 years ago • 16 comments

https://theupdateframework.readthedocs.io/en/stable/ works great and automatically updates based on release tags.

But it's hard to see which release the docs are actually for...

I'm not sure if the solution is to build the version number into the main documentation page, or if there's a readthedocs feature we could use to have the tag name visible in the UI?

jku avatar Sep 06 '21 13:09 jku

Why not activating a version build from a tag?

https://theupdateframework.readthedocs.io/en/v0.18.1/ https://readthedocs.org/projects/theupdateframework/versions/

I had to manually go to Versions and click the "Activate" button.

sechkova avatar Sep 07 '21 09:09 sechkova

Yeah that helps... At least from release notes and such we can link to specific versions. https://docs.readthedocs.io/en/stable/automation-rules.html shows that we can make the activation automatic as well: I'll try it.

So maybe it doesn't matter that https://theupdateframework.readthedocs.io/en/latest/ doesn't say anywhere which version it is?

jku avatar Sep 07 '21 11:09 jku

So maybe it doesn't matter that https://theupdateframework.readthedocs.io/en/latest/ doesn't say anywhere which version it is?

latest or stable? I think I'm ok with it but other options that come to my mind is hiding stable and using the "tag" version only or setting the "tag" one as default.

sechkova avatar Sep 07 '21 12:09 sechkova

latest or stable?

Right, I meant "stable" as the problematic one (but would be nice if "latest" was clearly marked as git version as well).

jku avatar Sep 07 '21 12:09 jku

Just found the corresponding upstream issue: https://github.com/readthedocs/readthedocs.org/issues/4529. I think implementing any of the workarounds mentioned there in would go a long way.

lukpueh avatar Mar 16 '22 10:03 lukpueh

hey I'm interested to work in this issue is this still open!!

ashwin0630 avatar Oct 25 '22 04:10 ashwin0630

Sure, thanks. tox -e docs will run the docs build locally so you can try things out.

https://www.sphinx-doc.org/en/master/usage/configuration.html says that variable version can be defined in conf.py and then that can be used as a substitution |version| in the docs.

Maybe you can just import tuf and version = tuf.__version__ in conf.py? Worth trying out

jku avatar Oct 25 '22 08:10 jku

i get an attribute error tuf has no attribute version

ashwin0630 avatar Oct 25 '22 11:10 ashwin0630

Please link to a branch with the changes (that do not work) if you'd like someone to have a look

jku avatar Oct 25 '22 11:10 jku

@jku Hello, I have set up the environment and was trying out your suggestion about setting up version = tuf.__version__. How do I test this?

gkum99 avatar Nov 25 '22 17:11 gkum99

Hello, I have set up the environment and was trying out your suggestion about setting up version = tuf.__version__. How do I test this?

I mentioned this a few posts up:

tox -e docs will run the docs build locally so you can try things out.

Results in docs/build if I recall correctly

jku avatar Nov 25 '22 21:11 jku

@jku I get the following results, is this what you expect? image

gkum99 avatar Nov 26 '22 11:11 gkum99

You don't mention what changed so I don't know... but if docs build from 'develop' does not include the version and a build with your change does, then that seems like a good sign that it will work similarly on readthedocs.

Feel free to do a PR so we get a docs build on readthedocs.

Possible further improvements:

  1. Could include the version string in the intro text as well (using |version| in docs/index.rst)
  2. We could start using development versions so the version number in the docs would reflect that this is documentation for an unreleased python-tuf

You can not fix the second issue (it's a release process fix), but if you want you can try the first one. It's not required though, a PR with the version setting is fine.

jku avatar Nov 28 '22 08:11 jku

@jku i have raised a pull request. kindly review it.

gkum99 avatar Nov 28 '22 15:11 gkum99

I'm reopening: The change seems fine but readthedocs does something on their end that hides this change https://theupdateframework.readthedocs.io/en/latest/index.html

I think we can still try using the version in the actual documentation content: if that doesn't work then this is just not worth this much work.

jku avatar Nov 30 '22 18:11 jku

Hey @jku, Am totally new here don't know how to work on this issue,but want to contribute (getting started ). So can you please guide me. Thank you !!!

abhiii71 avatar Oct 14 '23 18:10 abhiii71