Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

introduce is_required field for all output_types #99

Closed
nickreich opened this issue Sep 26, 2024 · 6 comments · Fixed by #103
Closed

introduce is_required field for all output_types #99

nickreich opened this issue Sep 26, 2024 · 6 comments · Fixed by #103
Assignees

Comments

@nickreich
Copy link
Contributor

The idea here is that we want to separate out whether or not a specific output_type is required for a submission from the specification of which output_type_ids are required or optional.

Noting that we already have implemented this for sample output_type.

@annakrystalli
Copy link
Member

annakrystalli commented Oct 7, 2024

In the process of implementing this it occured to me that it could be much less invasive and easier to propagate throughout the hubverse if, instead of introducing the is_required property as a property of output_type_id, it could be a property at the the output_type level. e.g.

{
    "output_type": {
        "quantile": {
            "output_type_id": {
                "required": [0.25, 0.5, 0.75]
            },
            "value": {
                "type": "integer",
                "minimum": 0
            },
            "is_required": true
        }
    }
}

This has both practical and conceptual benefits in my view:

  • Practical: It would make implementing the change across packages much easier because we are not mixing the values expected in the output type id column with an additional logical property that needs to be ignored.
  • Conceptual: Whether an output type is required or not is an output type level property not an output type id level property. As such it feel conceptually more accurate to nest it at the output type level. This becomes clear when trying to write output_type_id object descriptions in the schema. If we include the is_required property in the output_type_id object, it again feels like we're mixing two distinct things together.

@elray1
Copy link
Contributor

elray1 commented Oct 7, 2024

This makes sense to me. Maybe we should also change the location of this setting for the sample output type, for consistency.

@nickreich
Copy link
Contributor Author

I agree as well. Seems like a good solution.

@annakrystalli
Copy link
Member

@elray1 yes I thought that too. Will implement for samples too.

@annakrystalli annakrystalli mentioned this issue Oct 9, 2024
@annakrystalli annakrystalli linked a pull request Oct 9, 2024 that will close this issue
@annakrystalli annakrystalli moved this from In Progress to Ready for Review in hubverse Development overview Oct 9, 2024
@annakrystalli annakrystalli moved this from Ready for Review to In Progress in hubverse Development overview Oct 9, 2024
@annakrystalli annakrystalli moved this from In Progress to Ready for Review in hubverse Development overview Oct 9, 2024
@zkamvar
Copy link
Member

zkamvar commented Oct 9, 2024

Question: do we have a practical way to do an integration test of the schemas before approval?

That is: do we currently have a system for us to run tests on hub with our packages using the new schema or is it all manual?

@annakrystalli
Copy link
Member

Question: do we have a practical way to do an integration test of the schemas before approval?

Not really. We test that they are correct json and that jsonvalidate can parse them correctly and therefore use them to validate config.

I think the practical element is the difficulty here.

The features of interest of new versions are the basis for new functionality/ associated introduction of back-compatibility which requires new features and updating or creating new example data and tests in our packages. This happens within our packages and the direction is necessarily the creation of a new schema PR first and then packages are updated and tested against the new schema version PR before it is merged.

Having said that, I have opened the following issue for suggestions on how to improve our tests so thoughts on the above welcome there: #89

@annakrystalli annakrystalli moved this from Ready for Review to Reviewed/Ready to Merge in hubverse Development overview Oct 16, 2024
@github-project-automation github-project-automation bot moved this from Reviewed/Ready to Merge to Done in hubverse Development overview Nov 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging a pull request may close this issue.

4 participants