Busabase
Busabase is an open-source (MIT) database and workspace for AI agents — data, docs, skills, and apps in one place. Run it locally, self-host it inside your network, or use Busabase Cloud, and turn age
翻訳待ち
JSON schemas and examples representing structural data, characteristic properties, modeling workflows and related data about materials standardizing the diverse landscape of information
翻訳待ち
データPython · TypeScriptGitHub @mat3raオンライン所有者未確認
Have you tried it? One tap is enough. No sign-in needed.
The maker's introduction consists of the line above. Read the repository README for more details. Repository README ↗
Loading the full README.
Read the full README ↗Essential Source of Schemas and Examples (ESSE) contains data format definitions (schemas) and examples for common entities used in digital materials science (see refs. 1, 2 below).
Although the schemas are used to facilitate the operations of mat3ra.com, they are designed to be generic and can be used in other applications. The open-source packages developed by Mat3ra.com use the schemas available in this repository.
The latest variants of schemas and examples are available at schemas.mat3ra.com, which has three surfaces:
extends, contains, variant), laid out by architectural layer — primitives at the centre, root entities around them, catalogues on the rim. Search for a schema, fly to it, and follow what it extends, contains and is used by.The map is built from graph.json, an extracted reference graph that is also published at schemas.mat3ra.com/graph.json and doubles as a lint over the corpus.
ESSE has a dual-nature as both a Python and a Node.js package.
ESSE is compatible with Python 3.8+.
pip install mat3ra-esse
virtualenv .venv
source .venv/bin/activate
pip install -e PATH_TO_ESSE_REPOSITORY
npm install @mat3ra/esse
ESSE contains separate but equivalent interfaces for Python and Javascript.
The package provides ESSE class that can be initialized and used as below.
from mat3ra.esse import ESSE
helper = ESSE()
schema = helper.get_schema_by_id("material")
# standalone schema validation and cleaning
from mat3ra.esse import validate_and_clean
data = {"a": "x", "b": 1, "c": "drop"}
schema = {
"type": "object",
"properties": {
"a": {"type": "string"},
"b": {"type": "integer"}
}
}
validate_and_clean(data, schema)
print(data) # {"a": "x", "b": 1}
# alternative: schema-aware cleaning via generated pydantic models
# also see how it is used in ade: https://github.com/mat3ra/ade/blob/main/src/py/mat3ra/ade/application.py
from pydantic import ConfigDict
from mat3ra.esse.models.software.application import ApplicationSchemaBase
class Application(ApplicationSchemaBase):
# drop keys the schema doesn't declare at construction time
model_config = ConfigDict(extra="ignore")
config = {"name": "espresso", "version": "6.3", "buildConfig": {"moduleName": "6.3-gnu"}}
app = Application(**config)
print(app.model_dump(exclude_none=True)) # {"name": "espresso", "version": "6.3", ...}
const { ESSE } = require("@mat3ra/esse/lib/js/esse");
const helper = new ESSE();
const schema = helper.getSchemaById("material");
# schema validation and cleaning
const { validateAndClean } = require("@mat3ra/esse/lib/js/esse");
const data = {"a": "x", "b": 1, "c": "drop"};
const schema = {
"type": "object",
"properties": {
"a": {"type": "string"},
"b": {"type": "integer"}
}
}
const result = validateAndClean(data, schema);
console.log(result); // {"a": "x", "b": 1}
ESSE contains 3 main directories, schema, example and src outlined below, plus docs (documentation sources) and plan (design documents).
The schema directory contains the schemas specifying the rules to structure data. A set of core schemas, outlined below, are defined to facilitate the schema modularity.
This directory contains the examples formed according to the schemas and implements the same directory structure as the schema directory.
This directory contains Python and Javascript interfaces implementing the functionality to access and validate schemas and examples.
Markdown sources for the concept documentation, rendered to HTML at deploy time. Pages may embed generated fragments (<!-- generated:name -->) that are expanded from the entity graph, so counts and relationship listings cannot drift from the schemas.
Design documents, filed by status (upcoming/, review/, implemented/, context/) per the convention in mat3ra/agents. See plan/README.md.
This is the beginning of the README. Read the rest at the original. Read the full README ↗