-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Updating ROS2-Doc Cotr. Guildelines #5414
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
base: rolling
Are you sure you want to change the base?
Conversation
Signed-off-by: Nils-Christian Iseke <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only .. code-block:: console should be used for commands.
why we need to enforce this? i personally would like to keep the flexibility that i can choose. and i think nothing wrong is bash
with no $
if that is the case, correct? that is actually provided as supported tag. or do we have any downside to use bash
with no $
?
how about keeping this preference or recommendation with extra note on line 491? so that people can choose either of them?
source/The-ROS2-Project/Contributing/Contributing-To-ROS-2-Documentation.rst
Show resolved
Hide resolved
I think the benefits would be: (1) it makes it clear that the given command needs to be run in a terminal and (2) it's consistent, i.e., there's only 1 way to present a terminal command. However, I'm personally fine with keeping it as-is ( |
I'd love it if we only have the console as valid option for commands. But I also don't understand what advantage flexibility would have here: it means one more degree of freedom for the person writing and reading this and potentially leads to confusion. At least it would have confused me a few years ago when I came across ROS without any background in programming. And the goal of the PRs marathon was to enforce console :) |
@christophebedard @Nils-ChristianIseke thanks for the comments. i am just not convinced why we do this...
i would bring this topic to Sphinx documentation project if i were you, because that is not us to provide those options? i just do not understand why we maintain this special constraint by ourself? if there is not strong justification, i prefer the less rules (avoid specific rules) for maintainability and maintainers.
if that is the plan, how do we enforce this rule. coming back to my original concern how we maintain this... do we need to develop and maintain the specific checker tool or something? |
I don't want to push hard on this, but here are my thoughts:
I don't think this is a Sphinx thing. I think it's a Shinx user thing. Sphinx offers Code-block consistency (i.e., always using So I don't see it as a special or unnecessary constraint/rule. I see it as a way to simplify the instructions and reduce the potential issues, as mentioned above.
It would be great to have this, but I don't think it should stop us from making this change to our instructions/guidelines. I can try to look into ways to specifically check Sphinx code-block directives using If we can't reach a consensus, then let's just keep the note about |
@fujitatomoya friendly ping :) If you disagree i will modify this PR, happy to get this closed soon. |
@Nils-ChristianIseke ah sorry i missed this.
i think this makes sense.
i agree with this. i mean, we actually had a rule i am okay to take this, but personally i would not put the enforcement rule without having the capability to check that in CI. i am almost sure that there is going to be inconsistency (some people rely on this inconsistency) and maintenance cost for patrol... until we figure out the checker. |
Just to confirm, are you ok (despite some reservations) to merge it this way? I believe that in reviews, the reviewer only needs to mention it once rather than commenting on every example? See #5573 for an example. |
can you rephrase this? what is that supposed to mean? i am not positive on this, but i think that is okay to merge. but let me bring this enforcement rule consensus for next ROS PMC meeting for the agreement before merge. does that make sense? |
Sure :). I would assume that your concern about review noise— pointing out the misuse of bash if we were to use this rule—might not be a significant issue in practice. As you could point it out once for each PR. Actually, I would assume that the suggested guideline might reduce review noise overall, since it would lead to a simpler and clearer contribution guideline regarding bash/console. That said thank you for bringing it to the next PMC Meeting. Sorry for pushing on this—just hoping to get some of my stale PRs closed :). |
no worries, thanks for explanation and your patience.
yeah that is where our assumption becomes different... 😅 (i do not want to talk in negative...) i think some developers do not even read the guideline before contribution, and then i think this is gonna be highway-patrol thing... maintainers need to keep eyes on this rule. and if we miss, there is a guideline but actually that is not how implemented, eventually inconsistent situation. actually looking at https://docs.ros.org/en/rolling/The-ROS2-Project/Contributing/Contributing-To-ROS-2-Documentation.html#writing-pages and this PR, it does not say this is the strict rule to take the PR? that means this PR still can be kind of preference. |
#. Commands meant to be run in a terminal *with* output lines | ||
|
||
* Use ``.. code-block:: console`` with ``$`` on all command lines: | ||
* Use ``.. code-block:: console`` with ``$`` on all command lines. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Nils-ChristianIseke thanks for being so patient to wait for this.
CC: @christophebedard
we had a discussion on this in today's ROS PMC(Project Management Committee) meeting.
we concluded to take this PR with following one condition here to keep this preference and recommendation explicitly until we figure out the enforcement automatic checker.
* Use ``.. code-block:: console`` with ``$`` on all command lines. | |
* It is highly recommended to use ``.. code-block:: console`` with ``$`` on all command lines for consistency and clarity. |
@@ -476,7 +476,6 @@ Compare the above with a ``bash`` ``code-block``: | |||
[INFO] [1742150439.022947971] [my_turtle]: Starting turtlesim with node name /my_turtle | |||
[INFO] [1742150439.026043867] [my_turtle]: Spawning turtle [turtle1] at x=[5.544445], y=[5.544445], theta=[0.000000] | |||
|
|||
To simplify code blocks, ``bash`` can still be used without ``$`` for commands meant to be run in a terminal if the code block does not include any output lines. | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After switching to .. code-block:: console we should update the cont. guidelines.
Only .. code-block:: console should be used for commands.
Addded a note (for outputs containing #) instead of an example, as I feel the contr. guidelines are already too long.