fix: include xml in wheel/sdist; Segement tag positional; optional validate - #155
Merged
nerdoc merged 4 commits intoSep 21, 2026
Merged
Conversation
The data/ directories under pydifact/syntax are not Python packages, so setuptools dropped their XML files from sdist and wheel, and XML-based segment validation was silently skipped in installed copies.
The implementation only accepts positional *args, so the overload must not advertise `tag` as a keyword parameter (pyright reportInconsistentOverload).
Parser, from_str(), from_segments() and Interchange.from_file() accept `validate` (default True). With validate=False, neither the parsed segments nor the UNB header of an interchange are validated.
Member
|
Oh yes, that's a good idea to let the user override the validate method. I'll have a look at this. |
Member
|
Thank you. Yes, this was forgotten to include. I cought this up. If something else is missing, please tell me. |
Contributor
Author
|
Nice! Thank you! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi @nerdoc ,
I have some points i stumbled over, when updating from 0.1.8 to 0.2.3:
pyright gives an error for the

Segment.__init__overloads: fixed by enforcingtagas a positional argumentwe get a warning about:
MissingImplementationWarningapparently the xml schema files are not present. I added them in this PR, or is there a reason to not include them?we also have to work with edifacts, that do not comply 100% with the schema and we also have our own validation, so i made the
validateoption available fromInterchange, andParserand pass them down on functions likefrom_str