NREL / OpenOA

This library provides a framework for assessing wind plant performance using operational assessment (OA) methodologies that consume time series data from wind plants. The goal of the project is to provide an open source implementation of common data structures, analysis methods, and utility functions relevant to wind plant OA.
https://openoa.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
194 stars 63 forks source link

Feature: Add schema reference guide and functionality #238

Closed RHammond2 closed 1 year ago

RHammond2 commented 1 year ago

This PR addresses the themes of #229 with the following updates:

Address the core aspects that would enable #229, and most of #227.

jordanperr commented 1 year ago

This pull request looks like it goes towards the right direction in separating out the analysis schemas and providing easier-to-use JSON and YAML files for people interested in reading the schemas. But I don't think it actually closes #229. The point of #229 was to remove the static analysis requirements altogether, providing some sort of "AnalysisMethod.generateSchema()" method which generates the required data given the analysis parameters. Perhaps you meant to close #227 with this PR, which is more directly related to this PR? However, it also doesn't completely close #227, since there are still some constants in the code.

From a technical perspective, I think this looks fine. I like that the Metadata objects have been broken out of plant.py and placed in their own module. I also like how the RST documentation reads some parts of the schema programmatically.

Couple questions:

codecov-commenter commented 1 year ago

Codecov Report

Patch coverage: 85.75% and project coverage change: +0.57 :tada:

Comparison is base (64ba413) 62.73% compared to head (395d4e5) 63.30%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## develop_v3 #238 +/- ## ============================================== + Coverage 62.73% 63.30% +0.57% ============================================== Files 25 28 +3 Lines 3792 3911 +119 ============================================== + Hits 2379 2476 +97 - Misses 1413 1435 +22 ``` | [Impacted Files](https://app.codecov.io/gh/NREL/OpenOA/pull/238?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=NREL) | Coverage Δ | | |---|---|---| | [openoa/utils/imputing.py](https://app.codecov.io/gh/NREL/OpenOA/pull/238?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=NREL#diff-b3Blbm9hL3V0aWxzL2ltcHV0aW5nLnB5) | `90.41% <ø> (ø)` | | | [openoa/utils/plot.py](https://app.codecov.io/gh/NREL/OpenOA/pull/238?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=NREL#diff-b3Blbm9hL3V0aWxzL3Bsb3QucHk=) | `5.51% <0.00%> (ø)` | | | [openoa/utils/qa.py](https://app.codecov.io/gh/NREL/OpenOA/pull/238?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=NREL#diff-b3Blbm9hL3V0aWxzL3FhLnB5) | `11.65% <ø> (ø)` | | | [openoa/plant.py](https://app.codecov.io/gh/NREL/OpenOA/pull/238?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=NREL#diff-b3Blbm9hL3BsYW50LnB5) | `81.60% <46.66%> (-3.45%)` | :arrow_down: | | [openoa/schema/schema.py](https://app.codecov.io/gh/NREL/OpenOA/pull/238?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=NREL#diff-b3Blbm9hL3NjaGVtYS9zY2hlbWEucHk=) | `65.78% <65.78%> (ø)` | | | [openoa/analysis/turbine\_long\_term\_gross\_energy.py](https://app.codecov.io/gh/NREL/OpenOA/pull/238?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=NREL#diff-b3Blbm9hL2FuYWx5c2lzL3R1cmJpbmVfbG9uZ190ZXJtX2dyb3NzX2VuZXJneS5weQ==) | `77.72% <66.66%> (+0.19%)` | :arrow_up: | | [openoa/analysis/aep.py](https://app.codecov.io/gh/NREL/OpenOA/pull/238?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=NREL#diff-b3Blbm9hL2FuYWx5c2lzL2FlcC5weQ==) | `85.94% <75.00%> (+0.06%)` | :arrow_up: | | [openoa/analysis/electrical\_losses.py](https://app.codecov.io/gh/NREL/OpenOA/pull/238?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=NREL#diff-b3Blbm9hL2FuYWx5c2lzL2VsZWN0cmljYWxfbG9zc2VzLnB5) | `79.85% <75.00%> (+0.30%)` | :arrow_up: | | [openoa/analysis/wake\_losses.py](https://app.codecov.io/gh/NREL/OpenOA/pull/238?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=NREL#diff-b3Blbm9hL2FuYWx5c2lzL3dha2VfbG9zc2VzLnB5) | `86.85% <75.00%> (+0.05%)` | :arrow_up: | | [openoa/schema/metadata.py](https://app.codecov.io/gh/NREL/OpenOA/pull/238?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=NREL#diff-b3Blbm9hL3NjaGVtYS9tZXRhZGF0YS5weQ==) | `97.26% <97.26%> (ø)` | | | ... and [2 more](https://app.codecov.io/gh/NREL/OpenOA/pull/238?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=NREL) | |

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.