Skip to content

Conversation

@jotare
Copy link
Contributor

@jotare jotare commented Oct 31, 2025

Description

Proposal of a v2 for the Hydration API. More flexible, more expressive and more extensible

How was this PR tested?

Describe how you tested this PR.

@jotare jotare requested a review from a team October 31, 2025 14:41
@codecov
Copy link

codecov bot commented Oct 31, 2025

Codecov Report

❌ Patch coverage is 97.50000% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 85.88%. Comparing base (85212e2) to head (0e39628).
⚠️ Report is 46 commits behind head on main.

Files with missing lines Patch % Lines
...ucliadb_models/src/nucliadb_models/hydration_v2.py 97.50% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3358      +/-   ##
==========================================
- Coverage   85.91%   85.88%   -0.03%     
==========================================
  Files         530      532       +2     
  Lines       43458    43645     +187     
  Branches    12104    12156      +52     
==========================================
+ Hits        37335    37485     +150     
- Misses       5534     5563      +29     
- Partials      589      597       +8     
Flag Coverage Δ
nidx 79.10% <ø> (-0.43%) ⬇️
nucliadb 74.77% <0.00%> (-0.12%) ⬇️
nucliadb-ingest 45.05% <0.00%> (-0.16%) ⬇️
nucliadb-reader 44.75% <0.00%> (-0.18%) ⬇️
nucliadb-search 48.96% <0.00%> (-0.20%) ⬇️
nucliadb-standalone 47.89% <0.00%> (-0.19%) ⬇️
nucliadb-train 45.54% <0.00%> (-0.16%) ⬇️
nucliadb-writer 48.63% <0.00%> (-0.18%) ⬇️
nucliadb_dataset 74.11% <0.00%> (-1.70%) ⬇️
nucliadb_sdk 83.07% <0.00%> (-2.24%) ⬇️
nucliadb_telemetry 82.91% <ø> (ø)
nucliadb_utils 81.61% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 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.

FieldId = Annotated[
str,
StringConstraints(
pattern=r"^[0-9a-f]{32}/[acftu]/[a-zA-Z0-9:_-]+$",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Apply fix for splits

@bloodbare
Copy link
Contributor

    "chunks": [
        {
            "given": ["chunk_id1", "chunk_id2"],
            "select": {
                "fields": ["g/title", "f/da-summary"],
                "before": 5,
                "after": 5,
                "images": ["page"],
                "conversation": "first_and_last",
                "metadata_extension": ["origin", "classification_labels"],
                "labels": true,
                "all": false                
            }
        }
    ],
    "entities": [
        {
            "given": ["entity_id1"],
            "select": {
                "relations": ["XXXX"],
                "limit": 5
            }
        }
    ],
    "resources": [
        {
            "given": ["resource_id1", "resource_id2"],
            "select": {
                "fields": ["f/body"]
            }
        }
    ]

}```

@jotare
Copy link
Contributor Author

jotare commented Nov 20, 2025

Not what we wanted for a public API

@jotare jotare closed this Nov 20, 2025
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.

3 participants