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

[WIP] Add json schema experimentation #4

Draft
wants to merge 11 commits into
base: main
Choose a base branch
from

Conversation

annakrystalli
Copy link

This work is largely experimental currently but feels it should live and be discussed in this repo for now.

Relates to #3

@annakrystalli annakrystalli marked this pull request as draft October 27, 2022 07:41
@annakrystalli
Copy link
Author

I've made headway in developing a generic hubmeta schema! 🎉

Have a look at this mini report for info and demo: https://annakrystalli.me/hub-infrastructure-experiments/json-schema/jsonvalidate.html

Note that I've modified original examples, primarily to enable generalised validation of multiple round specification. This will affect current hubUtils functionality but now is a good time to change it if necessary. The modified examples are in the /json-schema/modified-hubmeta-examples/ folder.

I've also added examples of json schema automatically generated by a schema generator from each modified example. These can be found in json-schema/hubmeta-schema-generated/.

More details on contents of PRs in folder READMEs

@elray1
Copy link
Contributor

elray1 commented Nov 4, 2022

Thanks, Anna! The changes to structure that you propose here make sense to me.

One thought I had in looking at this is that maybe rather than relying on the encoding round_id: "round_id_from_variable", it might be better to introduce a boolean property that is called round_id_from_variable, and expect:

  • if round_id_from_variable is false, round_id must be present
  • if round_id_from_variable is true, round_id_variable must be present, and must name a variable that is in the task_ids. Actually, in this case, might it be easier just to re-use round_idrather than round_id_variable?

Additionally, as a validation check, maybe we should specify that there are no duplicated values in the concatenated array that contains the round_id values in entries where round_id_from_variable is false and the combined required and optional entries in the task_ids[[round_id_variable]]in entries where round_id_from_variable is true. If this makes sense, we should probably file this as an issue on the hubUtils repo, but I'm just leaving it as a comment here for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants