-
Notifications
You must be signed in to change notification settings - Fork 37
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
Json schema #526
base: main
Are you sure you want to change the base?
Json schema #526
Conversation
…ed schema against the reference standard, and the example configuration against the updated version successfully using jsonschema) towards #506
…g schema, towards #506
…g schema, towards #506; example configuration now validates (although, it is pending improvement and standardisation, eg of dates --- but that will involve breaking changes, so is a separate bigger task
…ions (i.e. that null is correct value, not 0); towards #506
there are still some issues... that's why there are tests... |
…e yaml constructuor modificatino for parsing dates and keys as strings; hopefully test passes in workflow now (does locally)
So, the test for valid yaml schema appears to check out fine
----- but somehow unexpectedly, I think that the work around to ensure that yaml keys are treated as strings not integers although intended to only apply within the scope of the test function must be working more globally, as an error related to this occurs now in a subsequent test ---- expecting a string, but getting an int: A couple of failing tests on the image list
Not sure how to resolve this right now -- but that's the issue, can address tomorrow. Must be some simple way to specify the parsing of keys only as strings only within the scope of the schema validation test. |
…Test workflow appears to pass now, without unintended downstream consequences of modifying pyyaml constructors.
Thanks for the work Carl! As this looks like a work-in-progress to me, let's keep it i the development branch for now, rather than merging into the main. This work deserve more thinkings and discussion, circle back to the goal of replacing with Json schema, I see there are opportunities to break down based on different functional inputs, and possibly to separate the input data parameters with meta data information etc. |
Hi Shirley,
Yes, it's describing the current state -- it's future work to change
things. I was thinking of doing the changes incrementally, rather than all
at once,
Enjoy the weekend when it comes,
Carl
…On Fri, 21 Mar 2025 at 09:14, Shirley Shiqin Liu ***@***.***> wrote:
Thanks for the work Carl! As this looks like a work-in-progress to me,
let's keep it i the development branch for now, rather than merging into
the main. This work deserve more thinkings and discussion, circle back to
the goal of replacing with Json schema, I see there are opportunities to
break down based on different functional inputs, and possibly to separate
the input data parameters with meta data information etc.
—
Reply to this email directly, view it on GitHub
<#526 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADDCCMXBN4TU3PLYIKWVAOL2VM4U5AVCNFSM6AAAAABZHHYLS2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDONBRG44DIMJQHE>
.
You are receiving this because you authored the thread.Message ID:
***@***.***
com>
[image: shiqin-liu]*shiqin-liu* left a comment
(healthysustainablecities/global-indicators#526)
<#526 (comment)>
Thanks for the work Carl! As this looks like a work-in-progress to me,
let's keep it i the development branch for now, rather than merging into
the main. This work deserve more thinkings and discussion, circle back to
the goal of replacing with Json schema, I see there are opportunities to
break down based on different functional inputs, and possibly to separate
the input data parameters with meta data information etc.
—
Reply to this email directly, view it on GitHub
<#526 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADDCCMXBN4TU3PLYIKWVAOL2VM4U5AVCNFSM6AAAAABZHHYLS2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDONBRG44DIMJQHE>
.
You are receiving this because you authored the thread.Message ID:
***@***.***
com>
|
This pull request addresses #506, introducing
region-json-schema.json
) against which we can validate our example configuration file (and later, user configuration files) based on the 2020-12 draft specificationBased on my local interactive tests our current example configuration file appears to validate against the region JSON schema, however the inclusion of the test is to ensure that this remains the case in our continuous integration workflow.
There is much more to do, but this will ultimately involve breaking changes to region configuration files. For example, consistent formatting of dates, and metadata for data objects.
But for now, we now have a draft JSON schema configuration file definition that validates, and this is something that we can build from. This addresses #506 in a most basic way; however, let's leave that issue open until we introduce checking of user configurations.
Checking of user configurations will require more rigorous thinking through of what are required vs optional fields. Further, changes to configuration formatting requirements will cascade to code changes (hopefully, simplifications) to accommodate these. So, this is all part of a bigger task.