khaeru / sdmx

SDMX information model and client in Python
https://sdmx1.readthedocs.io
Apache License 2.0
24 stars 18 forks source link

Fix #149 #150

Closed khaeru closed 9 months ago

khaeru commented 9 months ago

Closes #149.

PR checklist

codecov[bot] commented 9 months ago

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (c56574a) 98.33% compared to head (fc8fc0e) 95.97%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #150 +/- ## ========================================== - Coverage 98.33% 95.97% -2.37% ========================================== Files 87 87 Lines 6443 6480 +37 ========================================== - Hits 6336 6219 -117 - Misses 107 261 +154 ``` | [Files](https://app.codecov.io/gh/khaeru/sdmx/pull/150?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Paul+Natsuo+Kishimoto) | Coverage Δ | | |---|---|---| | [sdmx/model/common.py](https://app.codecov.io/gh/khaeru/sdmx/pull/150?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Paul+Natsuo+Kishimoto#diff-c2RteC9tb2RlbC9jb21tb24ucHk=) | `99.89% <100.00%> (+<0.01%)` | :arrow_up: | | [sdmx/reader/xml/v21.py](https://app.codecov.io/gh/khaeru/sdmx/pull/150?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Paul+Natsuo+Kishimoto#diff-c2RteC9yZWFkZXIveG1sL3YyMS5weQ==) | `97.70% <100.00%> (-0.12%)` | :arrow_down: | | [sdmx/testing/\_\_init\_\_.py](https://app.codecov.io/gh/khaeru/sdmx/pull/150?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Paul+Natsuo+Kishimoto#diff-c2RteC90ZXN0aW5nL19faW5pdF9fLnB5) | `99.28% <ø> (ø)` | | | [sdmx/tests/writer/test\_writer\_xml.py](https://app.codecov.io/gh/khaeru/sdmx/pull/150?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Paul+Natsuo+Kishimoto#diff-c2RteC90ZXN0cy93cml0ZXIvdGVzdF93cml0ZXJfeG1sLnB5) | `100.00% <100.00%> (ø)` | | | [sdmx/writer/xml.py](https://app.codecov.io/gh/khaeru/sdmx/pull/150?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Paul+Natsuo+Kishimoto#diff-c2RteC93cml0ZXIveG1sLnB5) | `97.66% <98.52%> (+0.08%)` | :arrow_up: | ... and [18 files with indirect coverage changes](https://app.codecov.io/gh/khaeru/sdmx/pull/150/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Paul+Natsuo+Kishimoto)
khaeru commented 9 months ago

@goatsweater please let me know if you are able to check this branch against any other examples beyond the specimen you shared in #149. Meanwhile I will complete the PR checklist and prepare to merge/release.

goatsweater commented 9 months ago

I'll run it against some of our production data tomorrow and let you know how things go.

goatsweater commented 9 months ago

Overall things look good. I did notice that ConceptIdentity references are now getting a version="1.0" when no version was supplied in the source. Nothing else unexpected noticed.

Output:

<str:ConceptIdentity>
  <Ref agencyID="AGENCYID" id="AUX2" maintainableParentID="CS_SAMPLE_BETA" maintainableParentVersion="1.0" version="1.0" package="conceptscheme" class="Concept"/>
</str:ConceptIdentity>

Source:

<structure:ConceptIdentity>
  <Ref id="AUX2" maintainableParentID="CS_SAMPLE_BETA" maintainableParentVersion="1.0" agencyID="AGENCYID" package="conceptscheme" class="Concept" />
</structure:ConceptIdentity>
khaeru commented 9 months ago

Great, thanks.

It doesn't make sense that a non-maintainable individual item (e.g. Concept) has a version="..."; only the maintainableParentVersion="…" for the ConceptScheme or similar should be there.

I'll check and address that, then merge and release.