https://github.com/exabyte-io/esse

JSON schemas and examples representing structural data, characteristic properties, modeling workflows and related data about materials standardizing the diverse landscape of information

https://github.com/exabyte-io/esse

Science Score: 49.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 1 DOI reference(s) in README
  • Academic publication links
    Links to: arxiv.org, acs.org
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (13.4%) to scientific vocabulary

Keywords

density-functional-theory digital-transformation machine-learning materials materials-design materials-genome materials-informatics materials-science simulation-modeling
Last synced: 6 months ago · JSON representation

Repository

JSON schemas and examples representing structural data, characteristic properties, modeling workflows and related data about materials standardizing the diverse landscape of information

Basic Info
Statistics
  • Stars: 7
  • Watchers: 9
  • Forks: 4
  • Open Issues: 19
  • Releases: 141
Topics
density-functional-theory digital-transformation machine-learning materials materials-design materials-genome materials-informatics materials-science simulation-modeling
Created over 9 years ago · Last pushed 6 months ago
Metadata Files
Readme License

README.md

PyPI version npm version License: Apache

ESSE

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.

ESSE has a dual-nature as both a Python and a Node.js package.

1. Installation

1.1. Python

ESSE is compatible with Python 3.8+.

1.1.1. PyPI

bash pip install mat3ra-esse

1.1.2. Repository

bash virtualenv .venv source .venv/bin/activate pip install -e PATH_TO_ESSE_REPOSITORY

1.2. Node

1.2.1. NPM

bash npm install @mat3ra/esse

2. Usage

ESSE contains separate but equivalent interfaces for Python and Javascript. The package provides ESSE class that can be initialized and used as below.

2.1. Usage in Python

```python from mat3ra.esse import ESSE

helper = ESSE() schema = helper.getschemaby_id("material") ```

2.2. Usage in Node/JS/TS

```javascript const { ESSE } = require("@mat3ra/esse/lib/js/esse");

const helper = new ESSE(); const schema = helper.getSchemaById("material"); ```

3. Directory Structure

ESSE contains 3 main directories, schema, example and src outlined below.

3.1. Schema

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.

  • Primitive directory contains a set of custom primitives that extends default standard primitive types allowed by schema, such as String and Number. Primitives are solely defined by the default primitives and can not be re-constructed from each other.
  • Abstract directory contains unit-less schemas that are constructed from default and custom primitives.
  • Reusable directory contains the schemas that are widely used in other schemas to avoid duplication, constructed from the abstract and primitive schemas.
  • Reference directory contains the schemas defining the rules to structure the references to data sources.

3.2. Example

This directory contains the examples formed according to the schemas and implements the same directory structure as the schema directory.

3.3. src

This directory contains Python and Javascript interfaces implementing the functionality to access and validate schemas and examples.

4. Conventions

4.1. Generative vs Non-generative keys

Generative keys are the fields which allow for user input prior to calculation of the final property values. A flag is included in the schema comments on the fields in property schemas: isGenerative:true marks which fields to use as subschemas in the generation of a user input schema. On properties allowing user inputs, additional fields may be tagged, as in the file_content property

5. Development

The schemas and examples are stored as JSON assets. The JSON assets are used to generate JS/TS and PY modules that can be used to access the schemas and examples in the corresponding runtimes. The modules are generated using the build_schemas.py and build_schema.js scripts. The JS modules are generated during the transpilation step of the npm. The PY modules are generated during the development and distributed within the pip package.

The following outlines the development process workflow:

  1. Setup: clone the repository and install the dependencies for both JS and PY (as explained below).
  2. Edit code and commit changes.
  3. Pre commit is used to regenerate the modules.
  4. Push the changes to GitHub.
  5. GH workflow is used to generate the fully resolved file (without "$ref"s and "$allOf" etc.) and examples and publish them to schemas.mat3ra.com.
  6. Publish the new version of the package to PyPI and npm.

The pre-commit is using both JS and PY runtime(s) to regenerate the schemas and examples.

NOTE: The PY and JS modules are built from the same JSON sources, but using different runtimes (scripts) and thus may still be different. Only for JS the fully resolved schemas (with merged "$allOf") are created. They are used for the docs website.

5.1. Development in Python

When developing in python the following should be taken into account:

  1. The modules containing the schemas and examples are generated using the build-schemas.py script. There is a setup for it to be run automatically on every commit, but it is recommended to run it manually before committing to make sure that the changes are reflected in the modules. This can be done with pre-commit run --all-files. The pre-commit package can be installed with pip install pre-commit. To rebuild schemas manually, run (note -e in install):

    bash python -m venv .venv source .venv/bin/activate pip install -e ".[tests]" pip install pre-commit pre-commit --install git config --unset-all core.hooksPath python build_schemas.py

  2. Tests can be run using the following commands:

    bash python -m venv .venv source .venv/bin/activate pip install ".[tests]" python -m unittest discover --verbose --catch --start-directory tests/py/esse/

5.2. Development in Javascript/Typescript

See package.json for the list of available npm commands. The JS modules are generated using the build_schema.js script. There is a setup for it to be run automatically when the package is installed (see "transpile" directive). To rebuild schemas manually, run:

bash npm install npm run transpile

5.3. General Dev Suggestions

This repository is an open-source work-in-progress and we welcome contributions. We suggest forking this repository and introducing the adjustments there, the changes in the fork can further be considered for merging into this repository as it is commonly done on GitHub (see [^3] below).

Other suggestions:

  • Use unique IDs for schemas
  • Do not use circular references in the schemas, instead leave the type as object and add explanation to description.

Links

[^1]: Data-centric online ecosystem for digital materials science [^2]: CateCom: A Practical Data-Centric Approach to Categorization of Computational Models [^3]: GitHub Standard Fork & Pull Request Workflow

Owner

  • Name: Mat3ra.com
  • Login: Exabyte-io
  • Kind: organization
  • Email: info@mat3ra.com
  • Location: San Francisco, CA, USA

Materials R&D Cloud

GitHub Events

Total
  • Release event: 20
  • Watch event: 1
  • Delete event: 27
  • Issue comment event: 5
  • Push event: 294
  • Pull request review event: 130
  • Pull request review comment event: 98
  • Pull request event: 58
  • Create event: 65
Last Year
  • Release event: 20
  • Watch event: 1
  • Delete event: 27
  • Issue comment event: 5
  • Push event: 294
  • Pull request review event: 130
  • Pull request review comment event: 98
  • Pull request event: 58
  • Create event: 65

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 3
  • Total pull requests: 267
  • Average time to close issues: 3 months
  • Average time to close pull requests: 27 days
  • Total issue authors: 3
  • Total pull request authors: 16
  • Average comments per issue: 1.0
  • Average comments per pull request: 0.17
  • Merged pull requests: 181
  • Bot issues: 0
  • Bot pull requests: 7
Past Year
  • Issues: 0
  • Pull requests: 67
  • Average time to close issues: N/A
  • Average time to close pull requests: 14 days
  • Issue authors: 0
  • Pull request authors: 4
  • Average comments per issue: 0
  • Average comments per pull request: 0.12
  • Merged pull requests: 35
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • timurbazhirov (1)
  • csadorf (1)
  • mpkocher (1)
Pull Request Authors
  • VsevolodX (61)
  • k0stik (58)
  • spectre007 (39)
  • pranabdas (26)
  • timurbazhirov (15)
  • AcylSilane (14)
  • adewyer (10)
  • triplepoint (10)
  • tjduigna (7)
  • seankwarren (7)
  • dependabot[bot] (7)
  • chu-k (5)
  • unsigned6 (5)
  • radik (1)
  • syehorov (1)
Top Labels
Issue Labels
Pull Request Labels
dependencies (7) javascript (6) keep-and-merge-later (3) milestone (2) prototyping (2) python (1)

Packages

  • Total packages: 3
  • Total downloads:
    • npm 1,525 last-month
  • Total dependent packages: 0
    (may contain duplicates)
  • Total dependent repositories: 0
    (may contain duplicates)
  • Total versions: 82
  • Total maintainers: 1
proxy.golang.org: github.com/exabyte-io/esse
  • Versions: 4
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent packages count: 5.5%
Average: 5.6%
Dependent repos count: 5.8%
Last synced: 6 months ago
proxy.golang.org: github.com/Exabyte-io/esse
  • Versions: 4
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent packages count: 5.5%
Average: 5.6%
Dependent repos count: 5.8%
Last synced: 6 months ago
npmjs.org: @mat3ra/esse

Mat3ra's Excellent Source of Schemas and Examples (ESSE) for Digital Materials R&D

  • Versions: 74
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 1,525 Last month
Rankings
Dependent repos count: 35.4%
Average: 43.0%
Dependent packages count: 50.6%
Maintainers (1)
Last synced: 6 months ago

Dependencies

package-lock.json npm
  • 565 dependencies
package.json npm
  • chai 4.3.4 development
  • eslint ^7.32.0 development
  • eslint-config-airbnb ^19.0.2 development
  • eslint-config-prettier ^8.3.0 development
  • eslint-plugin-import ^2.25.3 development
  • eslint-plugin-jsdoc ^37.1.0 development
  • eslint-plugin-jsx-a11y ^6.5.1 development
  • eslint-plugin-prettier ^4.0.0 development
  • eslint-plugin-react ^7.27.1 development
  • eslint-plugin-react-hooks ^4.3.0 development
  • eslint-plugin-simple-import-sort ^7.0.0 development
  • husky ^7.0.4 development
  • lint-staged ^12.1.2 development
  • mocha ^9.2.0 development
  • nyc 15.1.0 development
  • prettier ^2.5.1 development
  • prettyjson ^1.1.3 development
  • @babel/cli 7.16.0
  • @babel/core 7.16.0
  • @babel/eslint-parser 7.16.3
  • @babel/preset-env 7.16.4
  • @babel/register 7.16.0
  • ajv ^4.1.7
  • file ^0.2.2
  • json-schema-deref-sync 0.14.0
  • lodash 4.17.21
  • yamljs ^0.3.0
requirements-dev.txt pypi
  • PyYAML ==5.4 development
  • Unidecode ==1.1.1 development
  • coverage ==5.5 development
  • exabyte-json-include ==2021.05.06 development
  • jsonschema ==2.6.0 development
  • python-slugify ==2.0.1 development
  • toml ==0.10.2 development
setup.py pypi
  • exabyte_json_include >=2020.10.19
  • jsonschema ==2.6.0
  • python-slugify ==2.0.1
  • pyyaml >=4.2b1,<6
.github/workflows/cicd.yml actions
  • ./actions/js/publish * composite
  • ./actions/js/test * composite
  • ./actions/js/validate * composite
  • ./actions/py/publish * composite
  • ./actions/py/test * composite
  • actions/checkout v2 composite
schema/property/meta.json cpan
pyproject.toml pypi
requirements.txt pypi
  • PyYAML ==5.4
  • Unidecode ==1.1.1
  • coverage ==5.5
  • exabyte-json-include ==2021.05.06
  • jsonschema ==2.6.0
  • python-slugify ==2.0.1
  • toml ==0.10.2