ade.js houses entity definitions for use in the Mat3ra platform.
For usage within a javascript project:
npm install @exabyte-io/ade.js
For development:
git clone https://github.com/Exabyte-io/ade.js.git
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
# run tests with coverage
npm run test:coverage
# run tests with coverage and check thresholds
npm run test:coverage:check
# generate HTML coverage report
npm run test:coverage:html
This project includes comprehensive code coverage reporting with multiple viewing options:
- Run
npm run test:coverage:html
to generate an HTML coverage report locally - Open
coverage/index.html
in your browser to view the report
The project uses GitHub Actions to automatically generate and display coverage reports:
-
PR Coverage Comments: Every pull request automatically gets a coverage report comment showing:
- Overall coverage percentages
- Coverage changes compared to the base branch
- Detailed file-by-file coverage breakdown
-
Coverage Artifacts: Coverage reports are uploaded as GitHub artifacts for each PR and commit
- Download from the Actions tab in GitHub
- Available for 30 days for main branch, 7 days for PRs
-
GitHub Pages (Optional): Coverage reports are published to GitHub Pages for easy browser viewing
- Available at:
https://exabyte-io.github.io/ade.js/
- Updated on every push to main branch
- Available at:
The project enforces minimum coverage thresholds:
- Statements: 85%
- Branches: 80%
- Functions: 80%
- Lines: 85%
- Codecov: Coverage data is automatically uploaded to Codecov for historical tracking and trend analysis
TheADe
package sits just below the WoDe
package in the Mat3ra workflow
ecosystem, where ADe
houses entity definitions for:
Application
- uniquely determined byname, [version], [build]
Executable
- defined for a given application and accessible from application by nameFlavor
- defined for a given executable and accessible from executable by nameTemplate
- a jinja template for an application input file
The relevant data parameterizing these entities is housed in the Application Flavors repository. This includes the supported applications, executables, flavors, and defined templates.
Templates themselves are organized by application in a top-level assets
directory in application-flavors
and the API for loading and working with templates can be found in
each application's assets.js
module.
At build time, all templates are loaded and compiled into a single monolithic
JS file using build_templates.js
so that it can be used in the client as well as in NodeJS.
This is how templates are consumed from applicaton-flavors
in ADe
.