Skip to content

Add data source LU1 (Luxembourg STATEC)#282

Closed
NXDinh wants to merge 3 commits into
khaeru:mainfrom
NXDinh:add-source-LU1
Closed

Add data source LU1 (Luxembourg STATEC)#282
NXDinh wants to merge 3 commits into
khaeru:mainfrom
NXDinh:add-source-LU1

Conversation

@NXDinh
Copy link
Copy Markdown

@NXDinh NXDinh commented May 22, 2026

Summary

Adds the Luxembourg national statistical office — STATEC, dissemination platform LUSTAT — as data source LU1.

id / SDMX agency LU1
Office STATEC (Luxembourg)
URL https://lustat.statec.lu/rest
Format SDMX-ML, SDMX-REST 2.1
Dataflows 904

LU1 is the service's own SDMX agency id, so a bare Client("LU1").dataflow() resolves without an explicit agency_id argument.

Changes

  • sdmx/sources.json — new LU1 entry. The supports block disables the five structural endpoints the service answers with HTTP 404 (agencyscheme, dataconsumerscheme, metadataflow, metadatastructure, structureset).
  • sdmx/tests/test_sources.pyTestLU1(DataSourceTest) with endpoint_args for the data endpoint and an xfail mapping for the endpoints that return 400 (organisationschemeHTTPError) or 501 (structureNotImplementedError), alongside the usual sdmx-internal metadata / registration entries. This mirrors TestUY110.
  • doc/sources.rstLU1 source section.
  • doc/whatsnew.rst — changelog entry.

The 404-vs-400/501 split follows the policy under "Handling and testing limitations and (un)supported endpoints" in doc/sources.rst: each endpoint was probed live to record its actual HTTP status.

Verification

DataSourceTest against the live service — pytest -m source -k TestLU1 --sdmx-fetch-data:

13 passed, 21 xfailed, 0 failed

The whatsnew.rst bullet uses the :ref: role; I'll add the :pull: reference in a follow-up commit once this PR is numbered.

NXDinh and others added 2 commits May 22, 2026 13:58
Registers the Luxembourg national statistical office (STATEC, platform
LUSTAT) as `LU1` — the server's real SDMX agency id, so a bare
`Client("LU1").dataflow()` works without an explicit agency argument.

- sources.json: entry with a `supports` block calibrated against the
  live service (the resources it answers with 404/501).
- test_sources.py: TestLU1 — `endpoint_args` for the data endpoint and
  `xfail` for metadata/registration (not in SDMX-REST v2.1).
- whatsnew.rst: changelog entry.

DataSourceTest against the live service: 13 endpoints pass, 21 xfail,
0 failures.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
A live re-probe of LUSTAT showed two endpoints in the initial LU1
entry were miscategorised relative to the source-policy documented
in doc/sources.rst:

- organisationscheme returns HTTP 400 Bad Request
- structure returns HTTP 501 Not Implemented

`supports: false` is reserved for HTTP 404; 400/501 endpoints belong
in the test class `xfail` mapping (as in TestUY110).

- sources.json: LU1 `supports` now lists only the five 404 endpoints.
- test_sources.py: TestLU1 `xfail` adds organisationscheme (HTTPError)
  and structure (NotImplementedError).
- sources.rst: add the LU1 source section.
- whatsnew.rst: use the `:ref:` role for the LU1 entry.

DataSourceTest: 13 passed, 21 xfailed, 0 failed.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Copilot AI review requested due to automatic review settings May 22, 2026 18:18
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Adds a new SDMX data source entry for Luxembourg STATEC (LUSTAT) and wires it into docs and the data-source test suite.

Changes:

  • Add LU1 to sdmx/sources.json with base URL and declared capabilities.
  • Add TestLU1 to exercise LU1 endpoints and mark known unsupported/failing endpoints as xfail.
  • Document the new source in doc/sources.rst and mention it in doc/whatsnew.rst.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
sdmx/tests/test_sources.py Adds a new DataSourceTest subclass for LU1 and documents expected failures.
sdmx/sources.json Registers the LU1 source ID, name, URL, and advertised “supports” matrix.
doc/whatsnew.rst Adds LU1 to the “Next release” notes.
doc/sources.rst Adds a new LU1 reference section for the docs.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread sdmx/sources.json
Comment on lines +346 to +355
"id": "LU1",
"name": "Luxembourg STATEC",
"url": "https://lustat.statec.lu/rest",
"supports": {
"agencyscheme": false,
"dataconsumerscheme": false,
"metadataflow": false,
"metadatastructure": false,
"structureset": false
}
Comment thread doc/sources.rst

.. _LU1:

``LU1``: STATEC (Luxembourg)
@NXDinh NXDinh closed this May 22, 2026
@NXDinh NXDinh deleted the add-source-LU1 branch May 22, 2026 18:27
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