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

Stricten requirements on base info fields

Open
#1,492 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
91
Forks
54
PR merge metrics
No merged PRs in 30d

Description

The cited fields in OPTIMADE have quite strictly defined values, IMO:
https://github.com/Materials-Consortia/optimade-python-tools/blob/5160a2c47f02d070144a62bd391edc2ca63367af/optimade/models/baseinfo.py#L71-L80

  • Items of formats must match regex ^(json|_.*)$
  • Items of available_endpoints are as well limited to the supported endpoints plus ^_
  • entry_types_by_format are essentially limited by the same requirements

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 with optimade/models/baseinfo.py at lines 71-80 and inspect how formats, available_endpoints, and entry_types_by_format are currently validated. Tighten validation to match the restrictions listed in the issue, then verify that supported values and values beginning with '_' remain accepted while other values are rejected.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.