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

Converted dateTimeContinuted.py to numpydoc status #60

Merged
merged 1 commit into from Jun 30, 2020

Conversation

squisty
Copy link
Contributor

@squisty squisty commented Jun 18, 2020

No description provided.

@param timescale Timescale for resultant datetime
Parameters
----------
timescale : `dateTime.DateTime.Timescale`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
timescale : `dateTime.DateTime.Timescale`
timescale : `dateTime.DateTime.Timescale`, optional

@@ -49,3 +57,4 @@ def __repr__(self):

def __reduce__(self):
return (DateTime, (self.nsecs(), ))

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This blank line is causing the flake8 failure.

@ktlim
Copy link
Contributor

ktlim commented Jun 19, 2020

The commit message could be improved a bit. Aside from the typo, we recommend that it be imperative rather than past tense: https://developer.lsst.io/work/flow.html#writing-commit-summary-lines

@squisty squisty force-pushed the tickets/DM-15815 branch 2 times, most recently from 37839b9 to 2fe3899 Compare June 25, 2020 23:33
Copy link
Contributor

@jdswinbank jdswinbank left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These changes look great — a few minor suggestions in the comments.

However, we still have to set daf_base up to actually build with the Sphinx/numpydoc system. At the moment, I just get:

$ package-docs clean && package-docs build
Traceback (most recent call last):
  File "/opt/lsst/software/stack/conda/miniconda3-py37_4.8.2/envs/lsst-scipipe-1a1d771/bin/package-docs", line 8, in <module>
    sys.exit(main())
  File "/opt/lsst/software/stack/conda/miniconda3-py37_4.8.2/envs/lsst-scipipe-1a1d771/lib/python3.7/site-packages/click/core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "/opt/lsst/software/stack/conda/miniconda3-py37_4.8.2/envs/lsst-scipipe-1a1d771/lib/python3.7/site-packages/click/core.py", line 717, in main
    rv = self.invoke(ctx)
  File "/opt/lsst/software/stack/conda/miniconda3-py37_4.8.2/envs/lsst-scipipe-1a1d771/lib/python3.7/site-packages/click/core.py", line 1134, in invoke
    Command.invoke(self, ctx)
  File "/opt/lsst/software/stack/conda/miniconda3-py37_4.8.2/envs/lsst-scipipe-1a1d771/lib/python3.7/site-packages/click/core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/opt/lsst/software/stack/conda/miniconda3-py37_4.8.2/envs/lsst-scipipe-1a1d771/lib/python3.7/site-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/opt/lsst/software/stack/conda/miniconda3-py37_4.8.2/envs/lsst-scipipe-1a1d771/lib/python3.7/site-packages/click/decorators.py", line 17, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/opt/lsst/software/stack/conda/miniconda3-py37_4.8.2/envs/lsst-scipipe-1a1d771/lib/python3.7/site-packages/documenteer/stackdocs/packagecli.py", line 63, in main
    root_dir = discover_package_doc_dir(root_dir)
  File "/opt/lsst/software/stack/conda/miniconda3-py37_4.8.2/envs/lsst-scipipe-1a1d771/lib/python3.7/site-packages/documenteer/stackdocs/rootdiscovery.py", line 46, in discover_package_doc_dir
    return str(_search_parents(initial_dir))
  File "/opt/lsst/software/stack/conda/miniconda3-py37_4.8.2/envs/lsst-scipipe-1a1d771/lib/python3.7/site-packages/documenteer/stackdocs/rootdiscovery.py", line 118, in _search_parents
    raise FileNotFoundError(msg)
FileNotFoundError: Cannot detect a conf.py Sphinx configuration file from /mnt/lsst/src/lsst/daf_base/doc. Are you inside a Sphinx documenation repository?

That means following the instructions at https://developer.lsst.io/stack/layout-of-doc-directory.html — we can talk about this later.

Parameters
----------
container : `lsst.daf.base.PropertySet` or `lsst.daf.base.PropertyList`
Container from which to get the value
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe “Container including the element”?

container : `lsst.daf.base.PropertySet` or `lsst.daf.base.PropertyList`
Container from which to get the value
name : `str`
Name of item
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

“Name of element”?

Just to keep the terminology consistent through the dosctring.

Returns
-------
datetime : `datetime.datetime`
A converted python datetime object.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
A converted python datetime object.
The resultant Python `datetime.datetime` object.

Returns
-------
useType : `str` or none
Use type for the given input. Returns none if input
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Use type for the given input. Returns none if input
Type to use for the supplied value. `None` if the input is `bool` or a non-integral value.

@timj
Copy link
Member

timj commented Jun 26, 2020

There seems to be a bad merge commit on this branch that should be cleaned up with a simple rebase.

@squisty squisty merged commit 8a53f90 into master Jun 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants