Materials-Consortia / Materials-Consortia/optimade-python-tools

Support "minimized" data entries in `optimade.adapters`

Open
#943 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

adapters bug enhancement priority/medium suggestions
Dominant language
Python
Stars
91
Forks
54
PR merge metrics
No merged PRs in 30d

Description

Currently, the adapters assume all SHOULD-level fields are present in the entries upon conversion. This can lead to errors or undesired results. I consider this aspect of this issue a bug.

I suggest a general concept of "minimum field requirements" is introduced for adapters that each conversion function can utilize.
E.g., if each conversion function can list the fields it would need, then a general introspective checking method in the EntryAdapter can check whether these are present before running the conversion function and gently let the user know if fields are missing or otherwise. There might even be an introspective method to list the available conversion functions/formats based on the currently supplied fields from this?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the adapters in optimade.adapters, especially EntryAdapter and the conversion functions that assume SHOULD-level fields are present. Identify how minimized entries currently fail during conversion; done means missing fields are detected and communicated without errors or undesired results, with conversion availability reflecting the supplied fields where appropriate.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend-api-design
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.