Skip to content

feat: OpenDataSUS catalog client and unified metadata layer - #320

Draft
luabida wants to merge 2 commits into
AlertaDengue:mainfrom
luabida:feat/saude-metadata
Draft

feat: OpenDataSUS catalog client and unified metadata layer#320
luabida wants to merge 2 commits into
AlertaDengue:mainfrom
luabida:feat/saude-metadata

Conversation

@luabida

@luabida luabida commented Aug 17, 2026

Copy link
Copy Markdown
Member
  • add pysus.api.saude client for dadosabertos.saude.gov.br: buildId discovery, catalog listing, full CKAN package metadata and resource downloads, with offline tests backed by captured fixtures
  • introduce the unified metadata architecture: MetadataBag with eight typed facets (identity, description, temporal, spatial, provenance, structure, access, quality), the MetadataExtractor protocol, and per-client extractors for FTP, DadosGov, DuckLake and Saude
  • wire .metadata/.ametadata() into every remote entity (clients, datasets, groups, files) via MetadataMixin; tabular local files compute structure metadata from their content
  • document both surfaces in docs/source/guides (saude.rst, metadata.rst)

- add pysus.api.saude client for dadosabertos.saude.gov.br: Next.js
  buildId discovery, catalog listing, full CKAN package metadata and
  resource downloads, with offline tests backed by captured fixtures
- introduce the unified metadata architecture: MetadataBag with eight
  typed facets (identity, description, temporal, spatial, provenance,
  structure, access, quality), the MetadataExtractor protocol, and
  per-client extractors for FTP, DadosGov, DuckLake and Saude
- wire .metadata/.ametadata() into every remote entity (clients,
  datasets, groups, files) via MetadataMixin; tabular local files
  compute structure metadata from their content
- document both surfaces in docs/source/guides (saude.rst,
  metadata.rst)
@codecov-commenter

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

❌ Patch coverage is 93.08782% with 122 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (main@e507f83). Learn more about missing BASE report.

Files with missing lines Patch % Lines
pysus/api/saude/catalog.py 74.16% 31 Missing ⚠️
pysus/tests/api/metadata/test_base_classes.py 83.68% 23 Missing ⚠️
pysus/api/metadata/models.py 94.71% 15 Missing ⚠️
pysus/api/saude/resources.py 94.83% 8 Missing ⚠️
pysus/api/dadosgov/metadata.py 80.55% 7 Missing ⚠️
pysus/api/ftp/metadata.py 80.55% 7 Missing ⚠️
pysus/api/ducklake/metadata.py 85.29% 5 Missing ⚠️
pysus/tests/api/saude/conftest.py 91.52% 5 Missing ⚠️
pysus/api/saude/client.py 93.33% 4 Missing ⚠️
pysus/api/saude/download.py 93.93% 4 Missing ⚠️
... and 5 more
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@           Coverage Diff           @@
##             main     #320   +/-   ##
=======================================
  Coverage        ?   93.29%           
=======================================
  Files           ?       92           
  Lines           ?    13384           
  Branches        ?        0           
=======================================
  Hits            ?    12487           
  Misses          ?      897           
  Partials        ?        0           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

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

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