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

minor fixes for integration into sigmf-python #331

Closed
Teque5 opened this issue Jan 10, 2025 · 2 comments · Fixed by #332
Closed

minor fixes for integration into sigmf-python #331

Teque5 opened this issue Jan 10, 2025 · 2 comments · Fixed by #332
Labels

Comments

@Teque5
Copy link
Collaborator

Teque5 commented Jan 10, 2025

While implementing sigmf/sigmf-python#72, I found a change I needed to make in the spec that allow all tests to pass. I would have made a PR but I don't know if it serves another purpose.

All pattern regexes need these chars removed from the end \\$.

18c18
<           "pattern": "^(c|r)(f32|f64|i32|i16|u32|u16|i8|u8)(_le|_be)?",
---
>           "pattern": "^(c|r)(f32|f64|i32|i16|u32|u16|i8|u8)(_le|_be)?\\$",
39c39
<           "pattern": "^[^\\/\\\\:*?\"<>|]+(\\.[^\\/\\\\:*?\"<>|]+)*"
---
>           "pattern": "^[^\\/\\\\:*?\"<>|]+(\\.[^\\/\\\\:*?\"<>|]+)*\\$"
88c88
<           "pattern": "^[0-9a-fA-F]{128}"
---
>           "pattern": "^[0-9a-fA-F]{128}\\$"
182c182
<                 "pattern": "^([\\+-]?\\d{4}(?!\\d{2}\b))((-?)((0[1-9]|1[0-2])(\\3([12]\\d|0[1-9]|3[01]))?|W([0-4]\\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\\d|[12]\\d{2}|3([0-5]\\d|6[1-6])))([T\\s]((([01]\\d|2[0-3])((:?)[0-5]\\d)?|24\\:?00)([\\.,]\\d+(?!:))?)?(\\17[0-5]\\d([\\.,]\\d+)?)?([zZ]|([\\+-])([01]\\d|2[0-3]):?([0-5]\\d)?)?)?)?",
---
>                 "pattern": "^([\\+-]?\\d{4}(?!\\d{2}\b))((-?)((0[1-9]|1[0-2])(\\3([12]\\d|0[1-9]|3[01]))?|W([0-4]\\d|5[0-2])(-?[1-7])?|(00[1-9]|0[1-9]\\d|[12]\\d{2}|3([0-5]\\d|6[1-6])))([T\\s]((([01]\\d|2[0-3])((:?)[0-5]\\d)?|24\\:?00)([\\.,]\\d+(?!:))?)?(\\17[0-5]\\d([\\.,]\\d+)?)?([zZ]|([\\+-])([01]\\d|2[0-3]):?([0-5]\\d)?)?)?)?\\$",

Other notes:

  • Previously we checked core:label to have maxLength 20, but the spec says it MAY be longer, so I guess it's OK if we don't enforce.
  • The names of the schemas in this repo are sigmf-schema, collection-schema, and antenna-schema. In the other repo we had schema-meta & schema-collection. Doesn't the latter make more sense and look better in a file listing?
@Teque5 Teque5 added the bug label Jan 10, 2025
@777arc
Copy link
Member

777arc commented Jan 10, 2025

I've also run into that while playing around with writing a postgres schema for SigMF that uses the same regexs. Def feel free to modify the schema and we can get a new release of it cut.

@777arc
Copy link
Member

777arc commented Jan 10, 2025

as far as the filing naming comment, i saw a bunch of other folks doing xyz-schema.json, there's also some xyz.schema.json but i didnt like that as much. the point is to make it clear its a json schema, not just json

@Teque5 Teque5 closed this as completed Jan 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants