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

Task: refactor docs or decide not to uses sphnix docs format for CLI #398

Open
1 task done
MVrachev opened this issue Sep 28, 2023 · 2 comments
Open
1 task done
Labels
documentation Improvements or additions to documentation needs-triage The issue needs triage

Comments

@MVrachev
Copy link
Member

MVrachev commented Sep 28, 2023

What is the task about?

While working on an issue while building the docs I got the error:

rstuf/cli/repository_service_tuf/helpers/cli.py:docstring of repository_service_tuf.helpers.cli.calculate_blake2b_256:4:Field list ends without a blank line; unexpected unindent.

I looked at the code and I noticed we are using a different style for our docs there and it seems that it's the sphnix
docstring format: https://sphinx-rtd-tutorial.readthedocs.io/en/latest/docstrings.html#the-sphinx-docstring-format
The error I got was not in any way connected to the code I touched.
The function where I got the error is:

def calculate_blake2b_256(filepath: str) -> str:

When I decided to experiment by removing the :param from the filepath docstring documentation I noticed that other functions in this file had the same problem.

I want to ask what the other maintainers think: do we want to use the sphnix docs?
If so, let's use this issue to remind us to propose a pr adding the same format at the other files as well.
What do you all think: @kairoaraujo @KAUTH?

PS: The solution for this concrete error is to make each parameter doc to be one-line:
https://stackoverflow.com/a/63599880

Code of Conduct

  • I agree to follow this project's Code of Conduct
@MVrachev MVrachev added needs-triage The issue needs triage documentation Improvements or additions to documentation labels Sep 28, 2023
@kairoaraujo
Copy link
Member

I want to ask what the other maintainers think: do we want to use the sphnix docs? If so, let's use this issue to remind us to propose a pr adding the same format at the other files as well. What do you all think: @kairoaraujo @KAUTH?

We do use sphinx docs.
It is in our documentation structure. Check out our development documentation strucutre.

So, it builds our documentation specifics for CLI.
Which is rendered on https://repository-service-tuf.readthedocs.io/projects/rstuf-cli/en/latest/devel/, in that case, more specifically on the https://repository-service-tuf.readthedocs.io/projects/rstuf-cli/en/latest/devel/#component-level with all the implementation.

Basically we have one unique documentation.

@MVrachev
Copy link
Member Author

This means that we need to use the :param prefix when documenting our attributes.
See: https://sphinx-rtd-tutorial.readthedocs.io/en/latest/docstrings.html#the-sphinx-docstring-format
We don't do that and sphnix doesn't complain because of that for multi-lines documented parameters.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation needs-triage The issue needs triage
Projects
None yet
Development

No branches or pull requests

2 participants