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

Fix incorrect docstring in automate.py regarding date_ranges #298

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion aospy/automate.py
Original file line number Diff line number Diff line change
Expand Up @@ -384,10 +384,13 @@ def submit_mult_calcs(calc_suite_specs, exec_options=None):
The region(s) over which any regional reductions will be performed.
If 'all', use all regions in the ``regions`` attribute of each
``Proj``.
date_ranges : 'default' or tuple of datetime.datetime objects
date_ranges : 'default' or a list of tuples of datetime.datetime objects
Copy link
Contributor

Choose a reason for hiding this comment

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

E501 line too long (80 > 79 characters)

The range of dates (inclusive) over which to perform calculations.
If 'default', use the ``default_start_date`` and
``default_end_date`` attribute of each ``Run``.
Else provide a list, each containing a tuple of start and end dates
Copy link
Collaborator

Choose a reason for hiding this comment

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

No reason for you to know this :), but in the master (i.e. unreleased) version of aospy we also support partial datetime strings (e.g. '0001'), np.datetime64, or cftime.datetime objects as well. It would be great if you could update the docstring here to reflect that too. Maybe something along the lines of:

Else provide a list of tuples, each containing a pair of start and end dates,
such as ``date_ranges=[(start, end)]`` where ``start`` and ``end`` are 
each ``datetime.datetime`` objects, partial datetime strings (e.g. '0001'),
``np.datetime64`` objects, or ``cftime.datetime`` objects.

such as ``date_ranges=[(sdate, edate)]``, where ``sdate`` and ``edate``
Copy link
Contributor

Choose a reason for hiding this comment

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

E501 line too long (83 > 79 characters)

are each datetime.datetime objects.
output_time_intervals : {'ann', season-string, month-integer}
The sub-annual time interval over which to aggregate.

Expand Down