Expand Exisiting Verifications

  1. A new verification logic file should be added to the contrain/library folder which already includes several verification logic

  • At a minimum (for rule-based verification) the logic should be wrapped into a verify() function as shown below where df is a pandas.DataFrame that contains the data needed for the verification

  • For more complicated verifications (e.g., procedure-based) the functions in the checklib.CheckLibBase() class can be overloaded

from constrain.checklib import RuleCheckBase


class NewVerificationLogicClassName(RuleCheckBase):
    points = ["point_1", "point_2"]

    def verify(self):
        self.result = (self.df["point_1"] > self.df["point_2"])
  1. The new verification class name should be added to the list of class already listed in the __init__.py file located in that same directory

  2. A library file that includes all the information needed by the verification logic should be created or appended if it already exists