Skip to content

Conversation

@khaeru
Copy link
Owner

@khaeru khaeru commented Mar 2, 2025

  • Add .model.v{21,30}.Annotation
    • Add BaseAnnotation.value attribute: read-only on v21.Annotation, mutable on v30.Annotation. This is an Information Model change in SDMX 3.0.0 that is not mentioned in the list of changes.
    • Adjust usage in code, tests.
    • Add tests for v{21,30}.Annotation.
    • Read <com:AnnotationValue> from SDMX-ML 3.0.0 and store (partly addresses Read SDMX-ML returned by IMF sources #226).
  • More as recorded in doc/whatsnew.rst.

PR checklist

  • Checks all ✅
  • Update documentation
  • Update doc/whatsnew.rst

@khaeru khaeru added enh Enhancements & new features xml SDMX-ML format reader Read file formats defined by the SDMX standards sdmx-3 Support for SDMX 3.0 (2021), 3.1 (2025), etc. labels Mar 2, 2025
@khaeru khaeru self-assigned this Mar 2, 2025
@codecov
Copy link

codecov bot commented Mar 2, 2025

Codecov Report

Attention: Patch coverage is 99.11700% with 4 lines in your changes missing coverage. Please review.

Project coverage is 98.21%. Comparing base (5588f01) to head (3504cdf).
Report is 32 commits behind head on main.

Files with missing lines Patch % Lines
sdmx/reader/xml/v30.py 82.35% 3 Missing ⚠️
sdmx/reader/xml/v21.py 99.19% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #227      +/-   ##
==========================================
- Coverage   98.90%   98.21%   -0.69%     
==========================================
  Files         101      101              
  Lines        8406     8646     +240     
==========================================
+ Hits         8314     8492     +178     
- Misses         92      154      +62     
Files with missing lines Coverage Δ
sdmx/format/xml/common.py 100.00% <100.00%> (ø)
sdmx/format/xml/v21.py 100.00% <ø> (ø)
sdmx/format/xml/v30.py 100.00% <ø> (ø)
sdmx/message.py 100.00% <100.00%> (ø)
sdmx/model/common.py 99.90% <100.00%> (+<0.01%) ⬆️
sdmx/model/v21.py 100.00% <100.00%> (ø)
sdmx/model/v30.py 100.00% <100.00%> (ø)
sdmx/reader/xml/common.py 100.00% <100.00%> (ø)
sdmx/testing/data.py 100.00% <ø> (ø)
sdmx/tests/model/test_common.py 100.00% <100.00%> (ø)
... and 9 more

... and 18 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

khaeru added 2 commits March 4, 2025 15:06
- Add BaseAnnotation.value attribute, read-only on v21.Annotation.
- Adjust usage in code, tests.
- Add tests for v{21,30}.Annotation.
- Read and store <com:AnnotationValue> from SDMX-ML 3.0.0.
- Copyedit some text.
- Add a table with version correspondence.
- Use complete "3.0.0" labels throughout.
khaeru added a commit to khaeru/sdmx-test-data that referenced this pull request Mar 4, 2025
IMF/CL_FREQ-3.0-structure.xml contains the elements:
- <common:AnnotationValue>
- <common:Link>
khaeru added a commit that referenced this pull request Mar 5, 2025
@khaeru khaeru linked an issue Mar 5, 2025 that may be closed by this pull request
khaeru added 5 commits March 7, 2025 17:31
- Also ReportedAttribute.get_child().
- Ensure bool(ReportedAttribute) is True.
- Test instantiation of TextAttributeValue.
- Add tests.
Construct an lxml.etree.XMLSchema instance that can handle XHTML
embedded in MetadataMessage.
Use metadata structure to aid reading metadata messages.
- Write {Metad,D}ataSet.annotations.
- Write <md:Report id="…"> attribute and annotations.
- Do not (incorrectly) write MetadataReport.target.
- Write <md:Target id="…"> attribute and annotations.
- Handle {v21,v30}.DataSet and subclasses via tag_for_class().
khaeru added a commit to khaeru/sdmx-test-data that referenced this pull request Mar 7, 2025
- IMF/CL_FREQ-3.0-structure.xml contains the elements:
  - <common:AnnotationValue>
  - <common:Link>
- IMF/datastructure-0.xml contains <str:ConceptIdentity> and
  <str:ConceptRole>, with the latter referring to external item schemes.
- IMF/hierarchicalcodelist-1.xml contains <str:Hierarchy> *without* the
  leveled=… attribute.
khaeru added a commit that referenced this pull request Mar 7, 2025
khaeru added a commit to khaeru/sdmx-test-data that referenced this pull request Mar 13, 2025
- IMF/CL_FREQ-3.0-structure.xml contains the elements:
  - <common:AnnotationValue>
  - <common:Link>
- IMF/datastructure-0.xml contains <str:ConceptIdentity> and
  <str:ConceptRole>, with the latter referring to external item schemes.
- IMF/hierarchicalcodelist-1.xml contains <str:Hierarchy> *without* the
  leveled=… attribute.
khaeru added 11 commits March 14, 2025 13:48
- Allows sorted() on collections including both IA and str.
- Expand tests.
Allow use of named stashes, instead of LIFO.
Document +describedBy error in SDMX 2.1 IM.
- Ensure annotations, name, description are associated to the correct
  objects.
- Handle <str:Level> as a reference and store HierarchicalCode.level.
- Use reader.model.Annotation everywhere.
Retrieve an ID from an attribute according to whether structure-specific
or generic SDMX-ML
- Collapse generic and structure-specific readers of {Group,Series}Key.
- Document standards error/lacuna regarding multi-valued
  AttributeValue.
@khaeru khaeru merged commit 5a6ea56 into main Mar 14, 2025
20 checks passed
@khaeru khaeru deleted the enh/2025-w08 branch June 30, 2025 09:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enh Enhancements & new features reader Read file formats defined by the SDMX standards sdmx-3 Support for SDMX 3.0 (2021), 3.1 (2025), etc. xml SDMX-ML format

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Read SDMX-ML returned by IMF sources

2 participants