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

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

Open
jku opened this issue Sep 6, 2021 · 16 comments
Open

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

jku opened this issue Sep 6, 2021 · 16 comments
Labels
backlog Issues to address with priority for current development goals documentation Documentation of the project as well as procedural documentation good first issue Bite-sized items for first time contributors

Comments

@jku
Copy link
Member

jku commented Sep 6, 2021

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 jku added the documentation Documentation of the project as well as procedural documentation label Sep 6, 2021
@sechkova
Copy link
Contributor

sechkova commented Sep 7, 2021

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.

@jku
Copy link
Member Author

jku commented Sep 7, 2021

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?

@sechkova
Copy link
Contributor

sechkova commented Sep 7, 2021

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.

@jku
Copy link
Member Author

jku commented Sep 7, 2021

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).

@sechkova sechkova added the backlog Issues to address with priority for current development goals label Sep 15, 2021
@lukpueh
Copy link
Member

lukpueh commented Mar 16, 2022

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

@lukpueh lukpueh added the good first issue Bite-sized items for first time contributors label Mar 16, 2022
@ashwin0630
Copy link

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

@jku
Copy link
Member Author

jku commented Oct 25, 2022

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

@ashwin0630
Copy link

i get an attribute error tuf has no attribute version

@jku
Copy link
Member Author

jku commented Oct 25, 2022

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

@gkum99
Copy link
Contributor

gkum99 commented Nov 25, 2022

@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?

@jku
Copy link
Member Author

jku commented Nov 25, 2022

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

@gkum99
Copy link
Contributor

gkum99 commented Nov 26, 2022

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

@jku
Copy link
Member Author

jku commented Nov 28, 2022

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.

@gkum99
Copy link
Contributor

gkum99 commented Nov 28, 2022

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

@jku jku closed this as completed in 791879d Nov 30, 2022
jku added a commit that referenced this issue Nov 30, 2022
fixes #1568 Include python-tuf version in documentation
@jku
Copy link
Member Author

jku commented Nov 30, 2022

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 jku reopened this Nov 30, 2022
@abhiii71
Copy link

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 !!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backlog Issues to address with priority for current development goals documentation Documentation of the project as well as procedural documentation good first issue Bite-sized items for first time contributors
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants