Skip to content

Make relationship meta.description optional and add role - #2450

Open
rartino wants to merge 5 commits into
Materials-Consortia:mainfrom
rartino:relationship-meta-role
Open

rartino wants to merge 5 commits into
Materials-Consortia:mainfrom
rartino:relationship-meta-role

Conversation

@rartino

@rartino rartino commented Oct 31, 2026

Copy link
Copy Markdown
Member

Note: meant to go on top of #2442

BaseRelationshipMeta requires description whenever a relationship carries meta. However, the specification has made it OPTIONAL since v1.0.1, so "meta": {} is valid. OPTIMADE v1.3 also adds the OPTIONAL role key, e.g. "input"/"output" for files related to calculations. Servers that send role without description currently fail validation.

This PR makes description optional and adds role (optimade_version=">= 1.3"). It updates the existing test, which asserted that an empty meta is invalid, and regenerates the OpenAPI schemas.

@codecov

codecov Bot commented Oct 31, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 94.92537% with 17 lines in your changes missing coverage. Please review.
✅ Project coverage is 90.51%. Comparing base (7db767d) to head (0f5ba2a).

Files with missing lines Patch % Lines
optimade/models/property_definitions.py 95.51% 10 Missing ⚠️
optimade/server/schemas.py 91.04% 6 Missing ⚠️
optimade/validator/validator.py 92.85% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2450      +/-   ##
==========================================
+ Coverage   90.21%   90.51%   +0.29%     
==========================================
  Files          78       79       +1     
  Lines        5039     5366     +327     
==========================================
+ Hits         4546     4857     +311     
- Misses        493      509      +16     
Flag Coverage Δ
project 90.51% <94.92%> (+0.29%) ⬆️
validator 90.51% <94.92%> (+0.29%) ⬆️

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

☔ 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.

This branch has not been deployed

No deployments
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