Skip to main content

npm version License: Apache

mode

MOdel DEfinitions in JS/TS/Py - houses entity definitions for:

Installation

For usage within a JavaScript project:

npm install @mat3ra/mode

For development:

git clone https://github.com/Exabyte-io/mode.git

Contribution

This repository is an open-source work-in-progress and we welcome contributions.

We regularly deploy the latest code containing all accepted contributions online as part of the Mat3ra.com platform, so contributors will see their code in action there.

See ESSE for additional context regarding the data schemas used here.

Useful commands for development:

# run linter without persistence
npm run lint

# run linter and save edits
npm run lint:fix

# compile the library
npm run transpile

# run tests
npm run test

How to Add New Models and Methods

!NOTE: this section is moved to @mat3ra/standata.

The list of model and method entities is compiled from Yaml assets located in the ./assets directory using the build_entities.js script. The assets processed by this script usually involve custom Yaml types such as !combine to generate several entity configurations at once.

A new model or method may be added either by extending parameters of an existing entity or by adding a new asset file such as the following:

!combine
name:
  template: 'Model{{ "-" + parameters.example }}' # set the model name using a template

# Loop over parameters to create combinations
forEach:
  - !parameter
    key: parameters.example # path of where to set the property
    values: ["A", "B", "C"] # values to iterate over
    isOptional: true

# static configuration (same for all created entities
config:
  tags:
    - example_model
    - tutorial
  schema: !esse 'schema-id-placeholder' # add a schema using the !esse type to validate each configuration 

The above asset file will create four model configurations, "Model-A", "Model-B", "Model-C", and "Model". The latter entity is created due to the isOptional flag of the example parameter. There are a few more options available to customize the entity asset, for instance, the !combine type has an exclusions property where conflicting pairs of entity properties can be defined, so that combinations of those will be avoided.

For more examples, please see the asset files in ./assets or code.js for the definition of Yaml types such as !combine or !parameter.

Metadata

Release files for mat3ra-mode 2026.10.9.post0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mat3ra-mode 2026.10.9.post0
File Size Uploaded
mat3ra_mode-2026.10.9.post0.tar.gz 131.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for mat3ra-mode 2026.10.9.post0
File Interpreter ABI Platform
mat3ra_mode-2026.10.9.post0-py3-none-any.whl Python 3 none any Details

Total release size: 139.6 kB

Release files / mat3ra_mode-2026.10.9.post0.tar.gz

Download URL mat3ra_mode-2026.10.9.post0.tar.gz
Size 131.5 kB
Tags Source
SHA-256 checksum
How to use checksums
a6d5ab8298f2aaec0daa8f7adb7a8a9c351b09ff7ddf1e5c22c33e122a46c36b
BLAKE2b-256 checksum
How to use checksums
6e9e6948783c82ee6b44a48eb2a0372123f878b895015af606644823f60f7a98
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.1 importlib_metadata/9.0.1 pkginfo/1.13 requests/2.34.2 requests-toolbelt/1.0.0 tqdm/4.70.1 CPython/3.10.13

Release files / mat3ra_mode-2026.10.9.post0-py3-none-any.whl

Download URL mat3ra_mode-2026.10.9.post0-py3-none-any.whl
Size 8.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b393ab9dd27c1fe50af2f8b8a6a33fd0169ac6b3cb674f5d69512768345269e2
BLAKE2b-256 checksum
How to use checksums
0f8a93160fc2c9302de1e2a1740bfe8fe1bcd6dfa37ab1db523d682e0059100d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.1 importlib_metadata/9.0.1 pkginfo/1.13 requests/2.34.2 requests-toolbelt/1.0.0 tqdm/4.70.1 CPython/3.10.13
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page