-
Notifications
You must be signed in to change notification settings - Fork 3
Update contexts #41
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
Update contexts #41
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #41 +/- ##
==========================================
+ Coverage 74.84% 75.01% +0.16%
==========================================
Files 25 26 +1
Lines 1499 1569 +70
==========================================
+ Hits 1122 1177 +55
- Misses 273 286 +13
- Partials 104 106 +2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Update identity parsing
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.
Pull request overview
This PR refactors the UBL context handling and party identity management. The main changes include moving context-related code to a dedicated file, introducing support for different CustomizationIDs in UBL output via OutputCustomizationID, and enhancing party identity handling with scope-based categorization (legal/tax).
Key Changes
- Context definitions moved from
ubl.goto newcontext.gofile with addedOutputCustomizationIDsupport for French UBL contexts - Party identity handling refactored to use scope-based categorization (legal/tax) instead of generic labels
PartyIdentificationchanged from single pointer to slice to support multiple party identifications
Reviewed changes
Copilot reviewed 10 out of 29 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| ubl.go | Removed context-related code and imports (moved to context.go) |
| context.go | New file containing all context definitions, including new OutputCustomizationID field for France contexts |
| context_test.go | New comprehensive test suite for context functionality |
| invoice.go | Added logic to use OutputCustomizationID when present and support ubl-profile meta field override |
| party.go | Changed PartyIdentification to slice; refactored identity handling with scope-based logic (legal/tax) |
| party_parse.go | Major refactoring: extracted helper functions for parsing party identities with scope support |
| party_test.go | Updated to use array indexing for PartyIdentification |
| party_parse_test.go | Removed assertions for "CompanyID" label (replaced by scope) |
| payment_parse_test.go | Removed assertions for "CompanyID" label (replaced by scope) |
| test/data/parse/out/*.json | Updated test data reflecting new identity structure with scopes and extensions |
| test/data/parse/Vat-category-S.xml | Formatting cleanup (trailing whitespace removed) and schemeID added to PartyIdentification |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Pull request overview
Copilot reviewed 10 out of 36 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
No description provided.