-
Notifications
You must be signed in to change notification settings - Fork 36
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
Apply NumPy docstyle to remaining files in "signac" root. #343
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.
Some optional arguments do not list types. I highlighted some of them with inline comments.
Additionally, should we explicitly say optional like suggested in numpydoc? x : int, optional
Otherwise, looks good.
signac/sync.py
Outdated
exclude : str | ||
A filename exclusion pattern. All files matching this pattern will be | ||
excluded from the synchronization process. (Default value = None) | ||
doc_sync : |
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.
Do doc_sync
and strategy
need a type?
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 have no idea what to put for the type of doc_sync
. It supports None
, False
, 'copy'
, and callables. Users are supposed to provide one of the properties/functors from the DocSync
class, but I'm not sure how to express that as a type. @csadorf Do you have thoughts? Maybe this?
doc_sync : | |
doc_sync : attribute or callable provided by :py:class:`~signac.sync.DocSync` |
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 went ahead and committed a slightly edited version of that suggestion above.
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 that's fine, but maybe you can add an example on how to use this function as part of the general description? I think that would make it much easier for users to understand how to use this.
@cbkerr Excellent suggestions, thanks for catching the things I missed. I agree we should adopt the use of the "optional" keyword, but I realize that it is missing in many many places. I will create a separate issue for that so that we remember to apply it everywhere once our docstrings have all been converted. |
* numpydoc style(signac/contrib/schema.py) (#318) * numpydoc style(signac/contrib/project.py) (#320) * numpydoc style(signac/contrib/job.py) (#319) * numpydoc style(signac/contrib/linked_view.py, signac/contrib/utility.py, signac/core/utility.py) (#326) * numpydoc style(signac/contrib/errors.py, signac/contrib/filesystems.py, signac/contrib/filterparser.py, signac/contrib/hashing.py) (#322) * numpydoc style (signac/contrib/collection.py) (#329) * Make core submodule adhere to numpydoc conventions. (#339) * add a docstring for public module (#337) * numpydoc style (signac/contrib/import_export.py) (#333) * Apply NumPy docstyle to remaining files in "signac" root. (#343) * Apply fixes from minirst. (#356) * Enforce pydocstyle in core, common, contrib. (#354) Co-authored-by: Bradley Dice <[email protected]> Co-authored-by: Alyssa Travitz <[email protected]> Co-authored-by: Abhavya Chandra <[email protected]> Co-authored-by: vyasr <[email protected]> Co-authored-by: Pengji <[email protected]> Co-authored-by: Mike Henry <[email protected]>
Description
This PR applies NumPy docstyle to remaining files in the
signac
directory (i.e. the level of__init__.py
).Motivation and Context
Progress on #315. After this, remaining PRs should remove
core
,common
, andcontrib
from the "skipped" directories inmatch-dir
insetup.cfg
.Types of Changes
1The change breaks (or has the potential to break) existing functionality.
Checklist:
If necessary: