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.

Download files

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

Source Distribution

mat3ra_mode-2026.8.18.post0.tar.gz (131.3 kB view details)

Uploaded Source

Built Distribution

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

mat3ra_mode-2026.8.18.post0-py3-none-any.whl (8.1 kB view details)

Uploaded Python 3

File details

Details for the file mat3ra_mode-2026.8.18.post0.tar.gz.

File metadata

  • Download URL: mat3ra_mode-2026.8.18.post0.tar.gz
  • Upload date:
  • Size: 131.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/9.0.0 pkginfo/1.12.1.2 requests/2.34.2 requests-toolbelt/1.0.0 tqdm/4.70.0 CPython/3.10.13

File hashes

Hashes for mat3ra_mode-2026.8.18.post0.tar.gz
Algorithm Hash digest
SHA256 38446a67a2e693d6692fd451b0f937cde7325518648e8a1509b51d7ffb931b30
MD5 9953e1baf74a6b5432c8350c98222f6b
BLAKE2b-256 97c899dcff7ce6e03c0682017df53e605b8d202ad07d7b0fcf3431e788e406fc

See more details on using hashes here.

File details

Details for the file mat3ra_mode-2026.8.18.post0-py3-none-any.whl.

File metadata

  • Download URL: mat3ra_mode-2026.8.18.post0-py3-none-any.whl
  • Upload date:
  • Size: 8.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/9.0.0 pkginfo/1.12.1.2 requests/2.34.2 requests-toolbelt/1.0.0 tqdm/4.70.0 CPython/3.10.13

File hashes

Hashes for mat3ra_mode-2026.8.18.post0-py3-none-any.whl
Algorithm Hash digest
SHA256 c5af0ad5f5741770e5bb03261904f42ba9f31c32ac7e700e608161c78e446447
MD5 abf7d66568eabe82dfb97087eea15b9c
BLAKE2b-256 5b88f8d007380e4ef4b0d0da3a3e7b7e78a2738400ef8f60029f66ed8ef56b53

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

2026.8.18.post0 This release

2 files

Supported by

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