-
Notifications
You must be signed in to change notification settings - Fork 19
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
Utilize Schemas from Spec Repository #72
Comments
One alternative to git submodule is for the github action that publishes to pypi to clone the spec repo as part of building the package, and then for folks doing local dev there can be a line in the install instructions that involves cloning it. There may also be some pyproject.toml way to do it, I know that you can specify a dependency by giving it the github url but we're not talking about a python package, it just needs the json schema. The other thing is that json schemas are supposed to be available via url, so if we standardize the url its available at we can hardcode it in this repo. |
I like the idea of having the URL, but will there be a separate URL for each version of the spec? I wouldn't want the spec to change and break the python module. At least with |
Alright I just tried something on the main repo to see if it would work- what we can do is use githubs release system and the fact you can get to any raw file using the tag in the URL, to deal with version control of the json schema without going out of our way. Eg the latest one is- https://raw.githubusercontent.com/sigmf/SigMF/v1.2.2/sigmf-schema.json |
Plan A
__specification__ = "1.2.3"
_schema_base_url = "https://raw.githubusercontent.com/sigmf/SigMF/v{specification}/{name}-schema.json"
Why this way?good
bad
Plan B
good
bad
|
For Plan B, I wouldn't be concerned with the size of the JSON, the schema is super minimal and we would only need to copy it when the major or minor version changes which is like a few times a year, most changes are patch-level due to descriptions being tweaked. The main downside to B is just the manual aspect of having to grab the latest, but if we want the ability to handle multiple versions down the road, I like the idea of just copying them in and that way we always have the older versions. |
So yeah I like B, we just need a standard directory and file naming convention to use in this repo for storing the jsons |
I'll get to Plan B next week... too many hours on advent of code lately. |
Now that the specification repository is using it's own schemas to generate the documentation, we can now use those schemas in the validator instead of having our own.
I dislike
git submodule
, but I don't see a better way. Since the spec schemas is based upon the one here I suspect this will be an easy transition.Any alternatives to
git submodule
? If no, we can try to get this working during grcon next week.The text was updated successfully, but these errors were encountered: