generated from Exabyte-io/template-definitions
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into epic/SOF-4861
- Loading branch information
Showing
19 changed files
with
325 additions
and
219 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,60 +1,4 @@ | ||
{ | ||
"extends": ["airbnb", "prettier", "eslint:recommended"], | ||
"settings": { | ||
"import/resolver": { | ||
"node": { | ||
"paths": ["src"] | ||
}, | ||
"exports": {} | ||
} | ||
}, | ||
"parser": "@babel/eslint-parser", | ||
"env": { | ||
"browser": true, | ||
"node": true, | ||
"mocha": true | ||
}, | ||
"plugins": ["prettier", "simple-import-sort", "jsdoc"], | ||
"rules": { | ||
"prettier/prettier": "error", | ||
"comma-dangle": ["error", "always-multiline"], | ||
"array-element-newline": ["error", "consistent"], | ||
"no-plusplus": ["error", { "allowForLoopAfterthoughts": true }], | ||
"one-var": ["error", { "uninitialized": "always", "initialized": "never" }], | ||
"brace-style": ["error", "1tbs", { "allowSingleLine": true }], | ||
"prefer-template": "off", | ||
"camelcase": "off", | ||
"max-len": "off", | ||
"no-console": "off", | ||
"no-unused-expressions": "warn", | ||
"no-confusing-arrow": "off", | ||
"no-underscore-dangle": "off", | ||
"no-return-assign": "off", | ||
"consistent-return": "off", | ||
"arrow-body-style": "off", | ||
"import/prefer-default-export": "off", | ||
"import/no-named-as-default-member": "warn", | ||
"no-param-reassign": ["warn", { "props": false }], | ||
"max-classes-per-file": "warn", | ||
"simple-import-sort/imports": [ | ||
"warn", | ||
{ | ||
"groups": [ | ||
// Side effect imports. | ||
["^\\u0000"], | ||
// Packages. | ||
// Things that start with a letter (or digit or underscore), or `@` followed by a letter. | ||
["^@?\\w"], | ||
// Absolute imports | ||
[ | ||
"^(components|configs|constants|containers|domain|enhancers|hocs|libs|pages|reducers|services|store|modules|dictionaries)(/.*|$)" | ||
], | ||
// Relative imports. | ||
// Anything that starts with a dot. | ||
["^\\."] | ||
] | ||
} | ||
] | ||
} | ||
"extends": ["@exabyte-io/eslint-config"] | ||
} | ||
|
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,38 @@ | ||
import lodash from "lodash"; | ||
|
||
import {MODEL_TREE, MODEL_NAMES} from "./tree"; | ||
import { MODEL_NAMES, MODEL_TREE } from "./tree"; | ||
|
||
export const PseudopotentialMethodConfig = { | ||
type: 'pseudopotential', | ||
subtype: 'us', | ||
type: "pseudopotential", | ||
subtype: "us", | ||
}; | ||
|
||
export const LocalOrbitalMethodConfig = { | ||
type: 'localorbital', | ||
subtype: 'pople', | ||
type: "localorbital", | ||
subtype: "pople", | ||
}; | ||
|
||
export const UnknownMethodConfig = { | ||
type: 'unknown', | ||
subtype: 'unknown' | ||
type: "unknown", | ||
subtype: "unknown", | ||
}; | ||
|
||
export function allowedTypes(model) { | ||
return lodash.keys(lodash.get(MODEL_TREE, `${model.type}.${model.subtype}.methods`, [])).map(x => { | ||
return { | ||
slug: x, | ||
name: lodash.get(MODEL_NAMES, x, x) | ||
} | ||
}); | ||
return lodash | ||
.keys(lodash.get(MODEL_TREE, `${model.type}.${model.subtype}.methods`, [])) | ||
.map((x) => { | ||
return { | ||
slug: x, | ||
name: lodash.get(MODEL_NAMES, x, x), | ||
}; | ||
}); | ||
} | ||
|
||
export function allowedSubtypes(model, type) { | ||
return lodash.get(MODEL_TREE, `${model.type}.${model.subtype}.methods.${type}`, []).map(x => { | ||
return lodash.get(MODEL_TREE, `${model.type}.${model.subtype}.methods.${type}`, []).map((x) => { | ||
return { | ||
slug: x, | ||
name: lodash.get(MODEL_NAMES, x, x) | ||
} | ||
name: lodash.get(MODEL_NAMES, x, x), | ||
}; | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
export const DFTModelConfig = { | ||
type: 'dft', | ||
subtype: 'gga', | ||
type: "dft", | ||
subtype: "gga", | ||
}; | ||
|
||
export const UnknownModelConfig = { | ||
type: 'unknown', | ||
subtype: 'unknown', | ||
type: "unknown", | ||
subtype: "unknown", | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.