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

api: inline documentation (docstrings) #3092

Closed
1 task
jorgeorpinel opened this issue Jan 8, 2020 · 6 comments · Fixed by #3130 or #3426
Closed
1 task

api: inline documentation (docstrings) #3092

jorgeorpinel opened this issue Jan 8, 2020 · 6 comments · Fixed by #3130 or #3426
Labels
enhancement Enhances DVC p2-medium Medium priority, should be done, but less important question I have a question? research

Comments

@jorgeorpinel
Copy link
Contributor

jorgeorpinel commented Jan 8, 2020

I don't think we use docstrings much since the code is meant to be self-documenting for developers.

However, for dvc.api (currently a single file: https://github.com/iterative/dvc/blob/master/dvc/api.py) I think we should have significant code documentation (multi-line file and function docstrings, other comments).

Let's find a good docstring format we want to use and maintain e.g. Sphinx?

  • Should probably also work on iterative/dvcx/issues/1 along with this one.
@jorgeorpinel jorgeorpinel changed the title api: code documentation api: inline documentation (docstrings) Jan 8, 2020
@jorgeorpinel

This comment has been minimized.

@efiop
Copy link
Contributor

efiop commented Jan 14, 2020

@jorgeorpinel Why is the second comment marked as "resolved"?

EDIT: oh, because of the PR, right...

@shcheklein
Copy link
Member

Reopening this since I don't think we put even reasonably good enough docstrings for external API. We should describe parameters, important edge cases, etc. Alternatively we can consider linking with the docs website, but I would (as a user) prefer to have everything I would need in docstrings.

@shcheklein shcheklein reopened this Jan 19, 2020
@jorgeorpinel
Copy link
Contributor Author

jorgeorpinel commented Jan 19, 2020

True @shcheklein. I guess I thought we would do that in #3176 (so I marked this issue as closable by #2316). Do we need both issues? (This and #3176)

@shcheklein
Copy link
Member

@jorgeorpinel it feels they have a bit different purpose - one is about the style guide, this one is about actual docs (e.g. do we need to specify arguments, return values, may be even examples? etc?)

@jorgeorpinel
Copy link
Contributor Author

jorgeorpinel commented Jan 20, 2020

OK

do we need to specify arguments, return values, may be even examples? etc?

I think definitely yes arguments and return values. Not sure about examples... Maybe not for now but link to the new api ref in dvc.org (Do we need a new redirect similar to man.dvc.org BTW? api.dvc.org/{fn})

BUT we still need to decide on #3176 before I can write these parts of the docstrings.

p.s. does this issue have a priority? None assigned at the moment. And #3176 has "p3 nice to have". Cc @efiop

@efiop efiop added the p2-medium Medium priority, should be done, but less important label Jan 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Enhances DVC p2-medium Medium priority, should be done, but less important question I have a question? research
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants