Skip to content

Move the German addons to gobl.de.xinvoice - #927

Draft
pedrorfdez wants to merge 3 commits into
mainfrom
de-addons-external
Draft

Move the German addons to gobl.de.xinvoice#927
pedrorfdez wants to merge 3 commits into
mainfrom
de-addons-external

Conversation

@pedrorfdez

@pedrorfdez pedrorfdez commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

The German XRechnung and ZUGFeRD addons move out of core into github.com/invopop/gobl.de.xinvoice, following the pattern already used for Denmark, France, Brazil, Mexico, Portugal and Saudi Arabia. addons/external.go now lists both keys as approved external addons.

Removed: addons/de/, the generated data/addons/de-*.json and data/rules/de-xrechnung.json (external addons have no generated files in core — checked against dk-oioubl), and the two XRechnung examples, which move to the new module. data/schemas/tax/addon-list.json still lists both keys, sourced from the external registration.

Sequencing: gobl.ubl and gobl.cii no longer import the deleted packages as of their latest releases, so nothing breaks on merge. Consumers that validate documents declaring these keys pick the registration up through gobl.dev/bundle (PR linked below). Repos that do not bump GOBL are unaffected.

Pre-Review Checklist

  • Opened this PR as a draft
  • Read the CONTRIBUTING.md guide.
  • Performed a self-review of my code.
  • Added thorough tests with at least 90% code coverage.
  • Modified or created example GOBL documents to show my changes in use, if appropriate.
  • Added links to the source of the changes in tax regimes or addons, either structured or in the comments.
  • Run go generate . to ensure that the Schemas and Regime data are up to date.
  • Reviewed and fixed all linter warnings.
  • Been obsessive with pointer nil checks to avoid panics.
  • Updated the CHANGELOG.md with an overview of my changes.
  • Marked this PR as ready for review.

And if you are part of the org:

  • Requested a review from Copilot and fixed or dismissed (with a reason) all the feedback raised.
  • Requested a review from @samlown.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@codecov

codecov Bot commented Aug 12, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.97%. Comparing base (c7be72d) to head (f4c1cd6).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #927      +/-   ##
==========================================
- Coverage   94.99%   94.97%   -0.03%     
==========================================
  Files         327      324       -3     
  Lines       17732    17540     -192     
==========================================
- Hits        16845    16658     -187     
  Misses        547      547              
+ Partials      340      335       -5     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@pedrorfdez
pedrorfdez marked this pull request as ready for review August 12, 2026 10:25
@pedrorfdez
pedrorfdez requested a balanced review from Copilot August 12, 2026 10:25
@pedrorfdez

Copy link
Copy Markdown
Contributor Author

codecov/project is down 0.87%, codecov/patch is 100%. The CI runs with -coverpkg=./..., so the deleted German addon tests (428 lines) were also contributing coverage to the shared rules, pay and bill validation paths, so that contribution disappears with them.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Moves German XRechnung and ZUGFeRD addons from core to the approved external gobl.de.xinvoice module.

Changes:

  • Registers both German addon keys as external addons.
  • Removes core implementations, tests, generated data, and examples.
  • Documents the migration and required imports.

Reviewed changes

Copilot reviewed 13 out of 15 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
CHANGELOG.md Documents migration and imports.
addons/addons.go Removes bundled German addon imports.
addons/external.go Registers German external addons.
addons/de/zugferd/zugferd.go Removes core ZUGFeRD implementation.
addons/de/xrechnung/xrechnung.go Removes core XRechnung registration.
addons/de/xrechnung/bill_invoices.go Removes XRechnung invoice rules.
addons/de/xrechnung/bill_invoices_test.go Removes invoice rule tests.
addons/de/xrechnung/pay_instructions_test.go Removes payment rule tests.
data/addons/de-xrechnung-v3.json Removes generated addon data.
data/addons/de-zugferd-v2.json Removes generated addon data.
data/rules/de-xrechnung.json Removes generated rule data.
examples/de/invoice-de-de-xr.yaml Removes domestic XRechnung example.
examples/de/invoice-de-es-xr.yaml Removes cross-border XRechnung example.
examples/de/out/invoice-de-de-xr.json Removes generated example output.
examples/de/out/invoice-de-es-xr.json Removes generated example output.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread addons/external.go
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@pedrorfdez
pedrorfdez marked this pull request as draft August 12, 2026 14:09
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 this pull request may close these issues.

2 participants