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

Refactor existing validate_base specification into a ThresholdSpecification

    Details

    • Type: Story
    • Status: Done
    • Resolution: Done
    • Fix Version/s: None
    • Component/s: QA
    • Labels:

      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

            Hide
            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.

            Show
            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.
            Hide
            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.

            Show
            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

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

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Summary Panel