Skip to content

Commit

Permalink
add ref to examples in fn docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
prakaa committed Sep 26, 2022
1 parent 5900767 commit 70cc97d
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 2 deletions.
6 changes: 5 additions & 1 deletion src/nemseer/downloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,8 @@ def get_sqlloader_forecast_tables(
- Removes numbering from enumerated tables for `P5MIN`
- e.g. `CONSTRAINTSOLUTION(x)` are all reduced to `CONSTRAINTSOLUTION`
Examples:
See :ref:`querying table availability <quick_start:table availability>`
Args:
year: Year
month: Month
Expand Down Expand Up @@ -248,7 +250,9 @@ def get_sqlloader_forecast_tables(

def get_sqlloader_years_and_months() -> Dict[int, List[int]]:
"""Years and months with data on NEMWeb MMSDM Historical Data SQLLoader
Examples:
See :ref:`querying date ranges \
<quick_start:date range of available data>`
Returns:
Months mapped to each year. Data is available for each of these months.
"""
Expand Down
4 changes: 4 additions & 0 deletions src/nemseer/forecast_type/run_time_generators.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,10 @@ def generate_runtimes(
may not be accurate for all :term:`forecast types`, e.g. :term:`MTPASA` which is not
run at a set time.
Examples:
See :ref:`getting valid run times for a set of forecasted time \
<quick_start:getting valid run times for a set of forecasted times>`.
Args:
forecasted_start: Forecasts pertaining to times at or after this
datetime are retained.
Expand Down
8 changes: 7 additions & 1 deletion src/nemseer/nemseer.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ def download_raw_data(
1. :attr:`run_start` and :attr:`run_end`
2. :attr:`forecasted_start` and :attr:`forecasted_end`
Examples:
See :ref:`downloading raw data examples <quick_start:downloading raw data>`.
Arguments:
forecast_type: One of :data:`nemseer.forecast_types`
tables: Table or tables required. A single table can be supplied as
Expand Down Expand Up @@ -135,7 +138,7 @@ def compile_data(
For each queried table, this function:
1. If required, downloads raw forecast data for the table and converts to the
requested data structure.
requested data structure.
2. Otherwise, compiles table data from either of or both of the caches.
3. Applies user-requested filtering to :term:`run times` and
:term:`forecasted times` to any raw data.
Expand All @@ -144,6 +147,9 @@ def compile_data(
If :attr:`data_format` = "df" (default), a :class:`pandas.DataFrame` is returned.
Otherwise, if :attr:`data_format` = "xr", a :class:`xarray.Dataset` is returned.
Examples:
See :ref:`compiling data examples <quick_start:compiling data>`.
Arguments:
run_start: Forecast runs at or after this datetime are queried.
run_end: Forecast runs before or at this datetime are queried.
Expand Down

0 comments on commit 70cc97d

Please sign in to comment.