Materials-Consortia / Materials-Consortia/optimade-python-tools
Make it easier to serve provider fields with validation
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 91
- Forks
- 54
- PR merge metrics
- No merged PRs in 30d
Description
Following the discussion from #925, we should make it easier to extend our models and make sure they get used for validation in the API.
Currently, this requires changing the associated endpoint, entry collection and mapper code to get working (as many have done in our forked implementations). This should be something that is configurable, presumably via something like: "data_models": {"structures": MyStructureModel} in the config (which can then set the appropriate entry info schemas, mapper resource class, collection response class etc.).
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the discussion in #925, then trace how the associated endpoint, entry collection, and mapper currently connect. Determine how a configurable data_models structure could provide the entry info schemas, mapper resource class, and collection response class while preserving API validation. Done means provider-defined models can be configured and are used consistently for validation and responses.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api, backend-api-design
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100