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

Add a way to skip required fields? #9

Closed
ericvsmith opened this issue Dec 11, 2023 · 0 comments · Fixed by #11
Closed

Add a way to skip required fields? #9

ericvsmith opened this issue Dec 11, 2023 · 0 comments · Fixed by #11

Comments

@ericvsmith
Copy link
Contributor

The file format documentation says that the prelim_order and swimmoff_order fields of a RelayEvent (E0) record are required, and the code in fact enforces that. However, I'm receiving files from HyTek Meet Manager 8 where these values are not provided. I'd still like to be able to accept these files, because for my uses these fields are not used.

What do you think about a parameter to decode_records (and friends) which would skip the m1 required test? Maybe call it enforce_required, and default it to True?

I'm open to other ideas. Thanks!

Now that I think about it, I'd probably need this on the encode_record side, eventually.

ericvsmith added a commit to ericvsmith/sdif that referenced this issue Jan 6, 2024
…code_record, and records.decode_records. See issue tdsmith#9.
tdsmith added a commit that referenced this issue Jan 7, 2024
Meet Manager fairly regards certain fields as optional which are listed
as M1 in the published spec. We should support serializing and
deserializing SDIF files where these values are absent.

Adds a new strict mode that requires we match the spec exactly, which is
off by default. Notes on the RelayName model that these fields are
Optional even though they're "m1".

Fixes #9.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant