Skip to content
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

Address sporadic test failure in UNICEF / provisionagreement #88

Open
khaeru opened this issue Sep 2, 2021 · 0 comments
Open

Address sporadic test failure in UNICEF / provisionagreement #88

khaeru opened this issue Sep 2, 2021 · 0 comments
Labels
bug data-source Issues related to specific web services/data source(s) xml SDMX-ML format

Comments

@khaeru
Copy link
Owner

khaeru commented Sep 2, 2021

Daily test runs of TestUNICEF.test_endpoint[provisionagreement] sometimes (not always) fail with messages like this one:

E           RuntimeError: 1 uncollected items

sdmx/reader/xml.py:277: RuntimeError
----------------------------- Captured stdout call -----------------------------

--- <class 'sdmx.message.StructureMessage'> ---
{2: <sdmx.StructureMessage>
  <Header>
    id: 'IREF683155'
    prepared: '2021-08-25T05:11:51+00:00'
    receiver: <Agency not_supplied>
    sender: <Agency UNICEF>
    source: 
    test: False
  DataflowDefinition (49): CHILD_RELATED_SDG PT_FGM CHLD_PVTY CME_COUNT...
  DataProviderScheme (1): DATA_PROVIDERS
  ProvisionAgreement (49): CHILD_RELATED_SDG_UNICEF_UNICEF CHLD_PROT_FG...}

--- <class 'sdmx.model.Agency'> ---
{'UNICEF': <Agency UNICEF>}

--- _stash ---
{252: {'Name': {250: ('en', 'UNICEF for Work Transition')}, 'Description': {}}}

------------------------------ Captured log call -------------------------------
INFO     sdmx.client:client.py:445 Request https://sdmx.data.unicef.org/ws/public/sdmxapi/rest/provisionagreement/UNICEF/latest

The response at that URL gives a message including the following (chosen based on the uncollected items):

<mes:Structure>
  <mes:Structures>
    <str:ProvisionAgreements>
      …
      <str:ProvisionAgreement urn="urn:sdmx:org.sdmx.infomodel.registry.ProvisionAgreement=UNICEF:WT_UNICEF_UNICEF(1.0)" isExternalReference="false" agencyID="UNICEF" id="WT_UNICEF_UNICEF" isFinal="false" version="1.0">
        <com:Name xml:lang="en">UNICEF for Work Transition</com:Name>
        <str:StructureUsage>
          <Ref package="datastructure" agencyID="UNICEF" id="WT" version="1.0" class="Dataflow"/>
        </str:StructureUsage>
        <str:DataProvider>
          <Ref maintainableParentID="DATA_PROVIDERS" package="base" maintainableParentVersion="1.0" agencyID="UNICEF" id="UNICEF" class="DataProvider"/>
        </str:DataProvider>
      </str:ProvisionAgreement>
    </str:ProvisionAgreements>
  </mes:Structures>
</mes:Structure>
  • Investigate the parse failure.
  • Fix, adding tests.
@khaeru khaeru added bug xml SDMX-ML format data-source Issues related to specific web services/data source(s) labels Sep 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug data-source Issues related to specific web services/data source(s) xml SDMX-ML format
Projects
None yet
Development

No branches or pull requests

1 participant