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

Fix bug in `iter_validator` that failed with `None` values #201

Closed RHammond2 closed 2 years ago

RHammond2 commented 2 years ago

This is a small, isolated fix to address an issue for the PlantData.analysis_type validator doesn't correctly accept None as valid input. This fix converts an input of None to be type(None) in the actual validation so that a passed value of None will correctly validate to be a valid input.

@jordanperr this will solve the one issue we discussed earlier, and now allows the regression tests to fail somewhere else because of unrelated issues.

RHammond2 commented 2 years ago

This PR now simplifies the analysis_type validation routine to be self-contained rather than relying on two separate methods, in addition to changing self._asset to self.asset in the PlantData.parse_geometry()