Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions .github/workflows/cicd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ jobs:

steps:
- name: Checkout this repository
uses: actions/checkout@v4
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
lfs: true

- name: Checkout actions repository
uses: actions/checkout@v4
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
repository: Exabyte-io/actions
token: ${{ secrets.BOT_GITHUB_TOKEN }}
Expand All @@ -43,12 +43,12 @@ jobs:

steps:
- name: Checkout this repository
uses: actions/checkout@v4
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
lfs: true

- name: Checkout actions repository
uses: actions/checkout@v4
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
repository: Exabyte-io/actions
token: ${{ secrets.BOT_GITHUB_TOKEN }}
Expand All @@ -70,12 +70,12 @@ jobs:

steps:
- name: Checkout this repository
uses: actions/checkout@v4
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
lfs: true

- name: Checkout actions repository
uses: actions/checkout@v4
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
repository: Exabyte-io/actions
token: ${{ secrets.BOT_GITHUB_TOKEN }}
Expand All @@ -102,10 +102,10 @@ jobs:

steps:
- name: Checkout this repository
uses: actions/checkout@v4
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0

- name: Checkout actions repository
uses: actions/checkout@v4
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
repository: Exabyte-io/actions
token: ${{ secrets.BOT_GITHUB_TOKEN }}
Expand All @@ -128,12 +128,12 @@ jobs:

steps:
- name: Checkout this repository
uses: actions/checkout@v4
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
lfs: true

- name: Checkout actions repository
uses: actions/checkout@v4
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
repository: Exabyte-io/actions
token: ${{ secrets.BOT_GITHUB_TOKEN }}
Expand Down
20 changes: 11 additions & 9 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

#### Below is an example of how to rebuild JS and PY assets if JSON assets have changed.
# SRC_PATTERN="\.json$"
# if git diff --cached --name-only | grep --quiet -E "$SRC_PATTERN"
# then
# echo "JSON assets changed. Running build scripts."
# echo "Re-building JS and PY assets using JS script."
# npm run build:js-and-python-modules
# fi
SRC_PATTERN="constants\.json$"
if git diff --cached --name-only | grep --quiet -E "$SRC_PATTERN"
then
echo "JSON assets changed. Running build scripts."
# Run your custom script to generate constants.py and constants.js
npm run build:constants

# Stage the newly generated files
git add src/py/mat3ra/utils/constants.py
git add src/js/shared/constants.js
fi

# Automatically lint staged files in pre-commit hook
npm run transpile
npx lint-staged
git add dist/js
819 changes: 420 additions & 399 deletions dist/js/index.d.ts

Large diffs are not rendered by default.

546 changes: 280 additions & 266 deletions dist/js/index_browser.d.ts

Large diffs are not rendered by default.

546 changes: 280 additions & 266 deletions dist/js/index_server.d.ts

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions dist/js/shared/constants.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,6 @@ declare namespace _default {
export { tolerance };
export { units };
export { ATOMIC_COORD_UNITS };
export { HASH_TOLERANCE };
}
export default _default;
36 changes: 17 additions & 19 deletions dist/js/shared/constants.js
Original file line number Diff line number Diff line change
@@ -1,37 +1,35 @@
"use strict";
// This file is autogenerated from src/shared/constants.yaml
// DO NOT EDIT DIRECTLY! Edit above YAML file and run 'npm run build:constants'.
Object.defineProperty(exports, "__esModule", { value: true });
exports.HASH_TOLERANCE = exports.ATOMIC_COORD_UNITS = exports.units = exports.tolerance = exports.coefficients = void 0;
exports.coefficients = {
EV_TO_RY: 0.0734986176,
BOHR_TO_ANGSTROM: 0.52917721092,
ANGSTROM_TO_BOHR: 1 / 0.52917721092,
EV_A_TO_RY_BOHR: 1 / 25.71104309541616,
"EV_TO_RY": 0.0734986444,
"BOHR_TO_ANGSTROM": 0.529177210544,
"ANGSTROM_TO_BOHR": 1.8897261259077822,
"EV_A_TO_RY_BOHR": 0.0388938075966032
};
exports.tolerance = {
// in crystal coordinates
length: 0.01,
lengthAngstrom: 0.001,
pointsDistance: 0.001,
"length": 0.01,
"lengthAngstrom": 0.001,
"pointsDistance": 0.001
};
exports.units = {
bohr: "bohr",
angstrom: "angstrom",
degree: "degree",
radian: "radian",
alat: "alat",
"bohr": "bohr",
"angstrom": "angstrom",
"degree": "degree",
"radian": "radian",
"alat": "alat"
};
/**
* @summary Coordinates units for a material's basis.
*/
exports.ATOMIC_COORD_UNITS = {
crystal: "crystal",
cartesian: "cartesian",
"crystal": "crystal",
"cartesian": "cartesian"
};
// Only 3 digits will be considered for lattice and basis params for hashing
exports.HASH_TOLERANCE = 3;
exports.default = {
coefficients: exports.coefficients,
tolerance: exports.tolerance,
units: exports.units,
ATOMIC_COORD_UNITS: exports.ATOMIC_COORD_UNITS,
HASH_TOLERANCE: exports.HASH_TOLERANCE,
};
Loading
Loading