Track which document repealed each section #36
+621
−6
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.
Summary
Implements the
selex:upphavd_avattribute to track which ändringsförfattning repealed each section. This resolves the TODO comment atformatters/format_sfs_text.py:718.Changes
New files:
temporal/parse_anteckningar.py- Parser for Swedish amendment notes (anteckningar)upph.), amended (ändr.), and new (ny/nya) paragraphsupph. 29 kap. 15, 16 §§test/test_parse_anteckningar.py- Comprehensive test suite (27 tests)Modified files:
sfs_processor.py- Build repeal_map from andringsforfattningar and pass to formatterformatters/format_sfs_text.py- Addselex:upphavd_avattribute with ID normalizationtest/test_format_sfs_text.py- Integration tests for repeal_map functionality (8 tests)Example Output
Before:
After:
Testing
2010:800.jsonScope
Phase 1 (this PR):
upph. 15 §,upph. 29 kap. 15 §upph. 29 kap. 15, 16 §§upph. 29 kap. 22 a §Phase 2 (future):
upph. 23 kap.betecknas🤖 Generated with Claude Code