-
Notifications
You must be signed in to change notification settings - Fork 919
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
[QST] Use Numpydoc for docstrings? #652
Comments
Agreed this is the right direction and we should do this. |
@kkraus14 is there someone we know that can do this work? I wonder if @taureandyernv is around and has time? |
I've also changed the example above to prefer global namespaced imports like import cudf
df = cudf.DataFrame(...) rather than highly specific imports from cudf.dataframe.dataframe import DataFrame
df = DataFrame(...) This is because:
|
Also cc @randerzander |
@mrocklin we previously used numpy example formatting, including the ">>>" ipython style prompts, but actually moved away from it to the
This is entirely subjective and based on individual preference. I searched for an extension for the front-end that makes copy/paste exclude interactive prompt characters but didn't find anything. If you and @kkraus14 feel strongly about using numpydoc standards anyway, I wouldn't oppose. That said, doing so probably would not happen before 0.6.
To be fair to numpydoc, Sphinx's This could & should be fixed on an example by example basis, and CI should fail a build if doc builds result in warnings.
I believe we fixed all of these in the 0.5+ docs. If we missed any of them, let's get issues opened for the specific examples. |
I feel somewhat strongly about this. Almost all PyData projects use numpydoc standard today.
OK, maybe I just go ahead and do it? I think that this is a couple hours of work.
I'm surprised to hear this. Were we using the
I think that we generally do the convention above today. Here is one example: cudf/python/cudf/dataframe/dataframe.py Lines 361 to 363 in 866bded
To be clear I'm not saying "imports are wrong today" I'm saying "we're encouraging users into behaviors such that us changing module structure in the future will make imports wrong." |
Ah. Tail is new in branch-0.6. I did a search for "cudf.dataframe" in the API docs page and didn't find any. Yes, we're using the numpydoc extension For example, if you build docs from branch-0.6 right now, there are quite a few warnings and rendering issues with the new file reader/writer docstrings copied straight from Pandas. I spent awhile fighting with them, but there's more to do. |
With #1036 merged I'm closing this as it's resolved 😄 |
It looks like we currently use straight sphinx for docstrings. This looks like the following:
I'd like to raise the possibility that we move to numpydoc. There are a few reasons for this:
Here is what the example above would look like
The text was updated successfully, but these errors were encountered: