Uploaded image for project: 'Data Management'
  1. Data Management
  2. DM-9877

Refactor existing validate_base specification into a ThresholdSpecification

    XMLWordPrintable

Details

    • Story
    • Status: Done
    • Resolution: Done
    • None
    • QA

    Description

      In https://sqr-017.lsst.io/#specification-tests we talk about creating more types of Specifications (windows, tolerances, generic functions). Probably the best way to accommodate this is to create a new family of Specification subclasses, where Specification is now an abstract base class.

      This refactoring work will also make DM-9559 easier to implement (creating Specifications from specification repositories).

      Attachments

        Issue Links

          Activity

            This work for refactoring the Specification and ThresholdSpecification classes is mostly done, and pending the Name review in DM-9850. I'll move back to DM-9559 now and handle YAML parsing.

            jsick Jonathan Sick added a comment - This work for refactoring the Specification and ThresholdSpecification classes is mostly done, and pending the Name review in DM-9850 . I'll move back to DM-9559 now and handle YAML parsing.

            This PR refactors the specification class system so that Specification is now an abstract base class that can support multiple specification types. The original type of specification is now called a 'threshold specification' implemented in the ThresholdSpecification class.

            Also introduces the deserialize method that's intended to replace from_json. This takes key-value pairs as keyword arguments that are presumably parsed from a serialization (like JSON). The idea is that the schema will be more transparent in docstrings by doing this.

            jsick Jonathan Sick added a comment - This PR refactors the specification class system so that Specification is now an abstract base class that can support multiple specification types. The original type of specification is now called a 'threshold specification' implemented in the ThresholdSpecification class. Also introduces the deserialize method that's intended to replace from_json. This takes key-value pairs as keyword arguments that are presumably parsed from a serialization (like JSON). The idea is that the schema will be more transparent in docstrings by doing this.

            People

              jsick Jonathan Sick
              jsick Jonathan Sick
              Jonathan Sick
              John Parejko, Jonathan Sick
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Jenkins

                  No builds found.