-
Notifications
You must be signed in to change notification settings - Fork 91
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
Convert documentation from epydoc to reStructuredText #387
Conversation
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.
Looks mostly okay so far. I had some other thoughts about the overall thing, but I think I lost those about half-way down the page of code changes…
4c94f7b
to
d630c40
Compare
I've slightly reworded/abbreviated the docstrings because the first line should be a summary line (on its own) and fit in the char limit of PEP 8 (I think for docstrings the limit is even stricter to 72 chars but I'm not going to apply it). |
Because of sphinx.ext.autodoc this is related to #9. |
Which is great and something that should absolutely be done, but it's not really related to/part of converting epydoc to rST. |
d630c40
to
bfdbfcb
Compare
@Freso Force pushed. This time I think I've committed only the appropriate changes. 🙏 |
1b16fc2
to
44680cd
Compare
@Freso Ping. 😉 |
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.
No longer any complaints, I think. It’s pretty much a straight up 1:1 port of epydoc → (Sphinx flavoured) reStructuredText.
One comment maybe. A lot of L{…}
were changed to just …
. Maybe it’d make sense to use the :any:
role/directive for these? Like :any:`…`
. Either way, that’s not something to hold this PR up for.
eeb4c94
to
83b2543
Compare
Done! |
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.
Aaand… some small changes/fixups needed now. :)
I do think it’s probably fine to squash all the :any:
related changes to a single commit.
:type release: unicode | ||
:param title: title of the disc (with disambiguation) | ||
:param releaseTitle: title of the release (without disambiguation) | ||
:type tracks: list of :any:`TrackMetadata` |
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.
:type tracks: list of :any:`TrackMetadata` | |
:type tracks: :class:`list` of :any:`TrackMetadata` |
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 I'm going to use this:
:type tracks: list(:class:`TrackMetadata`)
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.
My suggestion was for an as 1:1 conversion as possible. Do you have a link to documentation for how list(SomeClass)
is interpreted by Sphinx?
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.
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.
If it's out of scope, I'll add these (and similar changes in #389) 😄
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 wouldn’t say they’re out‐of‐scope for this PR—it’s still converting epydoc format to reST/Sphinx format.
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.
Also not sure what https://www.pydev.org/manual_adv_type_hints.html is, but it’s not upstream Sphinx docs at least. Trying to see if I can find this documented in Sphinx’s docs too.
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 asked about it on IRC in #sphinx-doc, but maybe just leave it out for now? If we either determine that there’s an official reST/Sphinx way we can do that, or we can make another PR to make it conform to the Eclipse way of doing things. Seems like it’s a reach for the scope of this PR which is so close now, so it also seems like this is such a small thing to hold the merging of the PR back on the basis of.
You mean a separate commit from 44680cd, right? |
Eh. I’d actually think it’d be fine to squash all of the commits here into a single one. It’s relatively small and self‐contained change, pretty much a 1:1 conversion of epydoc to (Sphinx‐style) reST. This is probably one of the few times where I’ll say it’s probably overkill to keep them as 3+ separate commits. :) |
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.
If we’re changing the list of Foo
to list(Foo)
, let’s be consistent. This is one thing I’d say should maybe be its own commit though, because it deviates a teeny tiny bit from a straight 1:1 conversion—but if the syntax is legit, then I think it’s fine to keep it as part of this PR.
(Also, after pointing out a number of list of
and dict of
s, I just stopped. grep
yourself to find all of them. :))
835adc3
to
9274cd2
Compare
9274cd2
to
0bbd2fa
Compare
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.
A couple of minor things left unresolved, but eh, it’s fine to go in now, I’d say. It’ll need a lot of polish after getting in anyway, so we can clean up things in follow‐up PRs and commits.
@@ -205,8 +205,6 @@ def getTrackQuality(self): | |||
class ReadTrackTask(task.Task): | |||
""" | |||
I am a task that reads a track using cdparanoia. | |||
|
|||
@ivar reads: how many reads were done to rip the track |
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.
Is there a reason this is removed instead of replaced? Is it because it’s referring to something that’s been removed? I’m slightly leaning towards converting it and then removing it in #389. But eh.
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.
Is it because it’s referring to something that’s been removed?
That's it.
Thanks to Freso for all the useful comments! Signed-off-by: JoeLametta <JoeLametta@users.noreply.github.com>
0bbd2fa
to
69f8f39
Compare
I think I’ve resolved all actually resolved remarks now. None of the remaining remarks need fixing for this PR to go in. My vote is to just get it in and move on to #389 and other endeavours that actually improve the documentation instead of simply converting it. |
Merged! 🎆 |
No description provided.