Skip to main content

Generated from aind-library-template

Reason this release was yanked:

This patch version increment included breaking changes intended for v6.0.0

Project description

aind-data-schema-models

License Code Style semantic-release: angular Interrogate Coverage Python

Installation

aind-data-schema-models is a dependency of aind-data-schema. You should not need to install it directly.

Contributing

Install the dev dependencies:

pip install -e .[dev]

How to add a new model class

tl;dr

Add new classes to the _generators/models/*.csv files or create new files containing Enum-derived classes directly in the src folder.

Run ./run_all.sh in the top-level folder to rebuild models from their CSV files.

Details

The model class files, brain_atlas.py etc, are auto-generated. You should never need to modify the class files directly.

Instead, take a look at the jinja2 templates in the folder _generators/templates. The filename of the template is used to pull the corresponding .csv file and populate the data DataFrame. In the template you can pull data from the various columns and use them to populate each of the fields in your class.

To re-build all the models, run the run_all.sh bash script in the root folder, which loops through the template files and runs them through the generate_code function.

There are a few special cases, e.g. if data are missing in columns they will show up as float: nan. See the organizations.txt template for examples of how to handle this.

Documentation

Internal registries need to be enumerated in the aind-data-schema file src/aind_data_schema/utils/docs/registries_generator.py in the variable registries. This list controls what classes will have documentation automatically generated and cross-referenced correctly.

If you add a new external registry, you need to write the documentation manually in the aind-data-schema file docs/source/aind_data_schema_models/external.md.

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

aind_data_schema_models-5.7.4.tar.gz (340.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

aind_data_schema_models-5.7.4-py3-none-any.whl (308.7 kB view details)

Uploaded Python 3

File details

Details for the file aind_data_schema_models-5.7.4.tar.gz.

File metadata

  • Download URL: aind_data_schema_models-5.7.4.tar.gz
  • Upload date:
  • Size: 340.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for aind_data_schema_models-5.7.4.tar.gz
Algorithm Hash digest
SHA256 ab40a51b94515ffd83a3f743e6d2fb11a61e0eb625bd8245dc9fb12f37b2016b
MD5 137b2e6ae065d3242fc4460129ff45bb
BLAKE2b-256 d239d5a91014fec598b56514deeba28d43eb1816dda28b48e0afeb9a54e96ba1

See more details on using hashes here.

File details

Details for the file aind_data_schema_models-5.7.4-py3-none-any.whl.

File metadata

File hashes

Hashes for aind_data_schema_models-5.7.4-py3-none-any.whl
Algorithm Hash digest
SHA256 48f59d22566f3a0be9e18c36ace50b97da29aad20210f9c38f2161bf6495c201
MD5 d7abf5e272fa4198e9d18ad4348bc6b1
BLAKE2b-256 4a1424ec7818f126127373dbee0e6d9a09df694faedcf2fffa64a9901ce91576

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page