Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarify the "all models" documentation page #912

Merged
merged 3 commits into from
Aug 26, 2021
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ The release history and changelog can be found in [the changelog](CHANGELOG.md).
## Documentation

This document, guides, and the full module API documentation can be found online at [https://optimade.org/optimade-python-tools](https://optimade.org/optimade-python-tools).
In particular, documentation of the OPTIMADE API response data models (implemented here with [pydantic](https://github.com/samuelcolvin/pydantic)) can be found online under [OPTIMADE Data Models](https://optimade.org/optimade-python-tools/all_models).

## Installation

Expand Down
12 changes: 11 additions & 1 deletion docs/all_models.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
# All models
# OPTIMADE Data Models

This page provides documentation for the `optimade.models` submodule, where all the OPTIMADE (and JSON:API)-defined data models are located.

For example, the three OPTIMADE entry types, `structures`, `references` and `links`, are defined primarily through the corresponding attribute models:

- [`StructureResourceAttributes`](#optimade.models.structures.StructureResourceAttributes)
- [`ReferenceResourceAttributes`](#optimade.models.references.ReferenceResourceAttributes)
- [`LinksResourceAttributes`](#optimade.models.links.LinksResourceAttributes)

As well as validating data types when creating instances of these models, this package defines several OPTIMADE-specific validators that ensure consistency between fields (e.g., the value of `nsites` matches the number of positions provided in `cartesian_site_positions`).

::: optimade.models