hec.rating.reference_rating_set

class ReferenceRatingSetException(hec.rating.abstract_rating_set.AbstractRatingSetException):

Exception class for ReferenceRatingSet objects

A sub-class of AbstractRatingSet that performs all ratings in the CWMS database

ReferenceRatingSet(specification: Any, **kwargs: Any)

Initializer for ReferenceRatingSet objects.

Arguments:
  • specification (Any): A RatingSpecification object to initialize from. This is typed as Any to avoid circular import dependencies.
  • datastore (CwmsDataStore, must be passed by name): The CwmsDataStore object used to perform the ratings in the database.
Raises:
@staticmethod
def from_xml( xml: str, datastore: hec.AbstractDataStore) -> ReferenceRatingSet:

Creates a ReferenceRatingSet object from an XML instance

Arguments:
  • xml_str (str): The XML instance
  • datastore (Optional[AbstractDataStore]): The AbstractDataStore object for the database where the ratings are performed.
Returns:

ReferenceRatingSet: The ReferenceRatingSet object