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

Improve source docstrings in __init__ methods #236

Closed
davidhassell opened this issue Jan 6, 2023 · 0 comments · Fixed by #237
Closed

Improve source docstrings in __init__ methods #236

davidhassell opened this issue Jan 6, 2023 · 0 comments · Fixed by #237
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Milestone

Comments

@davidhassell
Copy link
Contributor

The source parameter of all __init__ methods says something along the lines of "Initialize the parameters from those of source" which, at best, is a little vague. It would be good to provide a bit more detail on what this really means.

See NCAS-CMS/cf-python#492 for more context and more detail.

I propose adding the same boilerplate text to each class. E.g. for cfdm.Field:

            source: optional
                Initialise the `Field` instance from the *source*
                object. All other parameters, apart from *copy*, are
                ignored and their values are instead inferred from
                *source* using the `Field` API. Any parameters
                that can not be retrieved from *source* are assumed to
                have their default value.

                Note that if *source* is a `Field` instance then
                ``cfdm.Field(source=source)`` is equivalent
                to ``source.copy()``.
@davidhassell davidhassell added enhancement New feature or request documentation Improvements or additions to documentation labels Jan 6, 2023
@davidhassell davidhassell added this to the Next release milestone Jan 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant