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
193 stars 63 forks source link

Easier access to required units, default values, and constants. #227

Closed jordanperr closed 1 year ago

jordanperr commented 1 year ago

There are constants defined in plant.py which may be needed by people who may not yet have installed OpenOA, and therefore may not have access to the dictionaries attached to the PlantData object. We have duplicated some of these constants in the docstrings as well.

One suggestion would be to place all of these constants into a JSON file.

Here is an example where constants (the unit types) are hard-coded in Python: https://github.com/NREL/OpenOA/blob/91fe859bb0eb6813fc52214ab1b1f9ba8aa436b9/openoa/plant.py#L480

related to #214 and #125

Tasks:

RHammond2 commented 1 year ago

This should be ok to close with #238, unless there is any additional verbiage required to explain or demonstrate any of the functionality.

RHammond2 commented 1 year ago

Given the discussion in #238, I'm unsure of how to proceed here. The single source of truth is the code itself, and everything else in the many forms of documentation (docstrings, documentation files, and schema) is based on the code, which is immutable, ensuring that input units are the same between analysis classes.

RHammond2 commented 1 year ago

@jordanperr would you consider this to be closed given all the documentation and code updates for schematics and metadata?

jordanperr commented 1 year ago

Progress has indeed been made on this issue given the new documentation and the new MetaData classes in V3. The issue of assumption on units and time frequency of timeseries columns can likely be closed. However, I see at least one place where a scientific constant is still hard-coded:

https://github.com/NREL/OpenOA/blob/daf42ac219ac9308f54d27734e4afadf7a888484/openoa/utils/met_data_processing.py#L17

Perhaps the move is to close this issue and open a new issue targeting the scientific constants in particular. One possible solution would be to use a config file for these constants.

jordanperr commented 1 year ago

We already have such an issue here: https://github.com/NREL/OpenOA/issues/125