Skip to content

Conversation

wfvining
Copy link
Collaborator

@wfvining wfvining commented Mar 5, 2020

Ports the implementation of the QCRad algorithm from SolarArbiter/solarforecastarbiter-core

Changes from SolarForecastArbiter

  • removes the mask_flags decorator
  • don't set Series.name for returned masks
  • Updated documentation for functions. Mostly rewording, but also refine focus/meaning in some places

wfvining added 15 commits March 5, 2020 08:55
First cut porting the implementation from solarforeacstarbiter.

* Adds qcrad filtering functions to quality.irradiance
* Adds tests directory and test module to cover the new irradiance
  checks.
* Adds a licenses.rst file to the documentation to keep track of
  opensource liscences and copyright notices.
The QCRad implementation does not use pandas directly

Clearsky functions are not implemented yet.
- Two lines before functions.
- Remove trailing empty lines.
adds __init__.py files in tests tree to satisfy pytest's package
structure requirements.
Enables the autodoc, autosummary, and napoleon sphinx extensions to
generate docs from docstrings.

Adds api file to documentation tree with documentation for the qcrad
functions in `quality.irradiance`
- Properly format math expressions.
- Remove references from summary lines.
- Clean up return types for check_irradiance_limits_qcrad
- Format notes/warnings with reST directives
These docstrings contian a '\' character (escapes the _ in the
generated docs) that should be interpreted literally.
The qcrad checks do not fully excercise this function on their own.
PEP 8 recommends line breaks before binary operators rather than
after.
- Use the imperative voice in first line ("test for..." rather than
  "tests for...").
- Single line doc strings fit on one line (including quotes)
- No blank line after function doc string.
@wfvining wfvining requested a review from cwhanse March 5, 2020 18:19
Copy link
Member

@cwhanse cwhanse left a comment

Choose a reason for hiding this comment

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

Are the tests also taken from solarforecastarbiter? Asking if I should check them.

@wfvining
Copy link
Collaborator Author

wfvining commented Mar 5, 2020

Yes, the tests are also from solarforecastarbiter.

wfvining and others added 5 commits March 5, 2020 14:12
For check_*_limits_qcrad functions limits only needs to have keys
corresponding to the specific measurement being
checked (ghi/dhi/dni). This change makes it clear what keys are
actually required for each function. Additional keys are
allowed (i.e. we use QCRAD_LIMITS as the default for all functions)
but are ignored.
Co-authored-by: Cliff Hansen <cwhanse@sandia.gov>
The name of the series was used in solarforecastarbiter, but it does
not add value here. This removes it so it.

Because the name is not set, we also have to update the tests to
ignore `Series.name`.
Forgot to run the linter locally after updating the test suite.
@wholmgren
Copy link
Member

A general request as you port algorithms from SFA to pvanalytics... I'd like to think that SFA will eventually use the implementations here, and it would be helpful if the PRs summarized any changes made in the process. Perhaps the initial PR comment could be edited to keep track of the changes.

Including the name doesn't add any information for functions that
return only one value.
@wfvining wfvining requested a review from cwhanse March 12, 2020 18:49
@wfvining wfvining merged commit 94994a5 into master Mar 24, 2020
@wfvining wfvining deleted the qcrad branch March 24, 2020 18:41
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.

3 participants