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

Create JSON schemas for various input files #188

Open
3 tasks
alexdewar opened this issue Jul 24, 2023 · 1 comment
Open
3 tasks

Create JSON schemas for various input files #188

alexdewar opened this issue Jul 24, 2023 · 1 comment
Labels

Comments

@alexdewar
Copy link
Contributor

alexdewar commented Jul 24, 2023

Currently, there is no formal specification for the format of Health-GPS input files. There is a "version" field in many (though not all) of them, which suggests that there is at least an intention to provide backwards compatibility, though there are no unit tests for the config file loading code, so inadvertent changes to the format could easily be introduced.

JSON schemas provide a convenient way to check whether JSON documents adhere to a particular spec: https://json-schema.org/

If we write schemas we can use these to validate the generated input files, e.g. in tests.

Edit: I've converted this to an umbrella issue

@alexdewar
Copy link
Contributor Author

After spending hours writing my first JSON schema manually, I realised there are tools that can help with this. I've tried this one and it seems pretty useful: https://pypi.org/project/genson/

We could auto-generate a bunch of schemas for the input files then tweak them manually, if needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: 🔖 Ready
Development

No branches or pull requests

1 participant