Metadata-Version: 2.4
Name: ord-schema
Version: 0.5.3
Summary: Schema for the Open Reaction Database
License-Expression: Apache-2.0
Project-URL: Homepage, https://github.com/Open-Reaction-Database/ord-schema
Classifier: Programming Language :: Python :: 3
Classifier: Operating System :: OS Independent
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
License-File: AUTHORS
Requires-Dist: inflection>=0.5.1
Requires-Dist: joblib>=1.0.0
Requires-Dist: numpy>=1.26.4
Requires-Dist: openpyxl>=3.0.5
Requires-Dist: pandas>=1.0.4
Requires-Dist: protobuf<6,>=4.22.3
Requires-Dist: psycopg[binary,pool]>=3
Requires-Dist: pyarrow>=14
Requires-Dist: pygithub>=1.51
Requires-Dist: python-dateutil>=1.10.0
Requires-Dist: rdkit>=2021.9.5
Requires-Dist: sqlalchemy>=2
Requires-Dist: tenacity<10,>=8.0.0
Requires-Dist: tqdm>=4.61.2
Provides-Extra: docs
Requires-Dist: Pygments>=2.13.0; extra == "docs"
Requires-Dist: Sphinx>=5.3.0; extra == "docs"
Requires-Dist: ipython>=8.4.0; extra == "docs"
Requires-Dist: sphinx-rtd-theme>=1.1.1; extra == "docs"
Requires-Dist: sphinx-tabs>=3.4.0; extra == "docs"
Provides-Extra: examples
Requires-Dist: matplotlib>=3.3.4; extra == "examples"
Requires-Dist: scikit-learn>=0.24.1; extra == "examples"
Requires-Dist: tensorflow>=2.4.1; extra == "examples"
Requires-Dist: wget>=3.2; extra == "examples"
Provides-Extra: tests
Requires-Dist: ruff>=0.9.9; extra == "tests"
Requires-Dist: coverage>=5.2.1; extra == "tests"
Requires-Dist: pytest>=7.1.1; extra == "tests"
Requires-Dist: pytest-cov>=3.0.0; extra == "tests"
Requires-Dist: pytest-xdist>=3.0.2; extra == "tests"
Requires-Dist: ty>=0.0.28; extra == "tests"
Requires-Dist: testing-postgresql>=1.3.0; extra == "tests"
Requires-Dist: treon>=0.1.3; extra == "tests"
Dynamic: license-file

# Open Reaction Database: Schema (ord-schema)

[![DOI:10.1007/978-3-319-76207-4_15](https://zenodo.org/badge/DOI/10.1021/jacs.1c09820.svg)](https://doi.org/10.1021/jacs.1c09820)
[![PyPI version](https://badge.fury.io/py/ord-schema.svg)](https://badge.fury.io/py/ord-schema)

This repository contains the schema for the Open Reaction Database initiative; please see the documentation
at https://docs.open-reaction-database.org.

This repository does not contain the database itself; that is stored
in [ord-data](https://github.com/open-reaction-database/ord-data). Rather, `ord-schema` is
designed to store the database schema and tools for creating, validating, and submitting data to the database.

## Installation

```shell
$ pip install ord-schema
```

## Examples

The `examples/` directory contains examples of dataset creation and use. To run locally, install with:

```shell
$ pip install "ord-schema[examples]"
```

Click here to run the examples with Binder:
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/open-reaction-database/ord-schema/HEAD?labpath=examples)

## Development

To install in editable/development mode (recommended: [uv](https://docs.astral.sh/uv/)):

```shell
$ git clone https://github.com/open-reaction-database/ord-schema.git
$ cd ord-schema
$ uv sync --extra tests
```

With tests and examples (notebooks, heavier deps):

```shell
$ uv sync --extra examples --extra tests
```

You can still use pip if you prefer: `pip install -e ".[tests]"`.

If you make changes to the protocol buffer definitions, [install](https://grpc.io/docs/protoc-installation/) `protoc`
and run `./compile_proto_wrappers.sh` to rebuild the wrappers.

## Conventions

### 1. convention: compound stoichiometry

##### Created: 2023.07.04

##### Last updated: 2023.07.04

##### Description: 
1. The preferred field for compound stoichiometry is the map `Compound.features` or `ProductCompound.features`.
2. The key should be "stoichiometric_coefficient" or "stoichiometric_ratio".
3. The value should be a `Data` message with its `float_value` representing the compound's stoichiometric 
coefficient or ratio.

##### Related links: 
[#683](https://github.com/open-reaction-database/ord-schema/issues/683) 
[#684](https://github.com/open-reaction-database/ord-schema/pull/684)
