-
Notifications
You must be signed in to change notification settings - Fork 3
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
Add an even better validator #9
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would you mind splitting this into PRs having related commits? (And related commits squashed together.)
@@ -3,7 +3,6 @@ | |||
"$schema": "https://json-schema.org/draft/2019-09/schema", | |||
"title": "Parameter Message", | |||
"description": "The schema for the Parameter Metadata Language from Section 5 of E1.37-5. This schema is subject to change.", | |||
"type": "object", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not 100% sure this needs to be removed, it needs double-checking.
If you merge #1 and I update, the Codespell stuff will disappear from this. In terms of the other commits, we'll still need to have @Bartel-C8 's commit in the middle, I've done limited squashing, let alone with other people's commits too. What do you mean by related (or do you just mean splitting Codespell from JSON validation)? |
See: #6 (comment) |
Please split unrelated changes into different PRs. |
So currently, none of the examples will validate. Here's why (excerpt from the new "Notes on the examples" section in the README): Manufacturer ID zeroAll the example messages use a manufacturer ID of zero, even though that will
Love your input if you would like to share here. It would be relayed to the group next time the group meets. |
I’ll add: I don’t love that none of the examples validate. Maybe a workaround is to temporarily change the minimum allowed manufacturer ID to zero during the validation step. But I don’t love that either. Still thinking about this. |
I've left my comments in #12 as they felt sufficiently different from this PR (and important enough to be worthy of their own issue rather than buried in a random PR.
Feel free to use one or more of the OLP PIDs as examples if you'd like, their definitions (in the OLA Protobuf format) are here, one or either of us could convert them to the JSON Schema format:
Yeah that feels like quite a hack and as per #12 just implies further that they are required. If you want to list ESTA PIDs, then other people probably do (us for starters). |
I've now resynced this PR with master so it just has the validation commits left in it. Although as you'll see/as you predicted they now all fail due to the examples all being zero based: |
@peternewman @ssilverman I think, now that the |
Yes mostly @Bartel-C8 . Queued message fails the validation due to this line:
Plus the draft PIDs with values of -1 fail the validation due to their value. Could I possibly suggest a rather bold step @ssilverman ? Delete the draft PIDs/standards from the master branch (and fix queued message or I think the schema) and merge this PR in. That way the master branch shows that this schema can validate every currently standardised PID. Then open a PR to restore the draft PIDs, which should pass aside from their PID IDs, making it nice and clear what's going on. Possibly one PR per draft standard, as they're likely to move at different speeds. That proves the draft PIDs are essentially covered by the standard, without including examples for PIDs that might not happen/making the validation fail. Either that or ask someone to assign test PID values to these draft PIDs as has been done in the past. |
I support @peternewman's suggestion. I'm glad to see we're now at a stage where the standardised PIDs are validating. Some clarity in separate branches and pull requests for draft PIDs/standards would be welcome. |
3e6d0c1
to
ac42033
Compare
With thanks also to @Bartel-C8 !
This is the only one that flags up the fact some PIDs have values of -1!
See an example run here:
https://github.com/peternewman/rdm-schema/runs/2926896569?check_suite_focus=true
This will need #7 in. It also has some unrelated changes from other PRs which will disappear as they are merged.