-
Notifications
You must be signed in to change notification settings - Fork 902
Beautification of rst documentation #11367
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
Conversation
Can one of the admins verify this patch? |
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.
I think you can squash the 2nd commit into the 1st commit.
:ref:`MPI_Put` :ref:`MPI_Get_accumulate` :ref:`MPI_Reduce` | ||
* :ref:`MPI_Put` | ||
* :ref:`MPI_Get_accumulate` | ||
* :ref:`MPI_Reduce` |
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.
In list-ifying all the See Also's, I don't think I have a strong opinion, but I do have an opinion. 😄
We took our cue from other Linux and MacOS man pages on how to do the See Also's. For example, man ls
in MacOS 13.1:
And if I man uptime
on Ubuntu 22.04:
Meaning: if we want to keep with conventions of other man pages, we should probably add commas to our list of man pages, not bullets.
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.
I partially agree ;)
The man-page comma-separated links might be good for a terminal view, but definitely not for a HTML page view. The links gets bunched together. I think this should be fixed via some other means, e.g. by some customization of the conf.py
file. I'll have a look whether this could be done.
48cfa42
to
83618ad
Compare
e9d79f9
to
201733d
Compare
@jsquyres I believe a first merge would be appropriate? |
I'm good with your ERRORS change/combination of 2 lists. You have a minor RST error that CI found:
|
I'll check! |
I didn't get why the |
It was in https://jenkins.open-mpi.org/jenkins/job/open-mpi.pull_request-v2/job/PR-11367/7/console -- one of the other CI tests (I think it was the |
Listified the elements and ensured links were properly set. Signed-off-by: Nick Papior <nickpapior@gmail.com>
Signed-off-by: Nick Papior <nickpapior@gmail.com>
Direct links to papers should preferably be done using DOI links. Publishers may (at will) change their URLs but they *will* obey doi.org/<doi> links meaning that links to published articles with DOI's will always be stable using: doi.org/<doi> links. I uncovered this link by doing make linkcheck which caused problems for the changed link (in feature/ulmf). Signed-off-by: Nick Papior <nickpapior@gmail.com>
Basically all files have had a go to be updated and beautified, too many to list here. Signed-off-by: Nick Papior <nickpapior@gmail.com>
Signed-off-by: Nick Papior <nickpapior@gmail.com>
Signed-off-by: Nick Papior <nickpapior@gmail.com>
Also removed mentioning of some C++ bindings. It seemed weird to only have them in the *create_errhandler documents, hence removed. Signed-off-by: Nick Papior <nickpapior@gmail.com>
These changes also revealed some typos and we fixed lots of links and codes that were present. Signed-off-by: Nick Papior <nickpapior@gmail.com>
Signed-off-by: Nick Papior <nickpapior@gmail.com>
Signed-off-by: Nick Papior <nickpapior@gmail.com>
Signed-off-by: Nick Papior <nickpapior@gmail.com>
Signed-off-by: Nick Papior <nickpapior@gmail.com>
Signed-off-by: Nick Papior <nickpapior@gmail.com>
6fe5a58
to
c5fdcc0
Compare
I tweaked / fixed some other typos in the example in the MPI_Pack.3.rst commit. |
I have tried to figure out the man-page stuff... But I must admit the documentation for sphinx/docutils is not wrapping my head... I think this will deserve a second go later. Here would be a base-plan on how to use it: This should just be placed at the bottom of the
Here: def man_role(name, rawtext, text, lineno, inliner, options={}, content=[]):
""" This does not work yet!
A work in progress, this is mainly to indicate what we intent to do
for man-page references.
Adding multiple arguments to inline roles in Sphinx is not ideal.
Instead it would be better to have roles as:
:man3:`MPI_Init`
which would result in MPI_Init(3) in the man-page, but a regular
link in the web-page.
It should be able to handle:
:man3:`custom title <MPI_Init>` and result in custom title (omitting (3)).
"""
# The man<> name can get the number
n = name[3]
if '<' in text:
# there must be a space:
# :manX:`MPI_toahe <MPI_Init>`
ref_text, link = text.split("<", 1)
ref_text = ref_text[:-1] # remove end space
link = link[:-1] # remove end >
else:
ref_text = f"{text}({n})"
link = text
# lower-case the link
link = link.lower()
raise NotImplementedError(f"still no :{name}: role... please hold!")
def setup(app):
app.add_role("man1", man_role)
app.add_role("man3", man_role)
app.add_role("man5", man_role) |
@zerothi Now that this has merged on |
When you cherry-pick these commits to v5.0.x, please include 3515978, which fixes a problem that showed up in our nightly testing (not sure why it didn't show in the PR CI). |
I'll have a look end of this week! |
Listified the elements and ensured links were
properly set.
This will close #11340 (eventually)
Signed-off-by: Nick Papior nickpapior@gmail.com