-
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.
- Loading branch information
Showing
15 changed files
with
243 additions
and
67 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 |
---|---|---|
@@ -0,0 +1,46 @@ | ||
name: Testing | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up micromamba | ||
uses: mamba-org/[email protected] | ||
with: | ||
# the create command looks like this: | ||
# `micromamba create -n test-env python=<the corresponding version> kim-api=2.3.0` | ||
environment-name: test-env | ||
cache-environment: true | ||
create-args: >- | ||
-f tests/environment.yml | ||
- name: Install AFLOW | ||
shell: bash -el {0} | ||
run: | | ||
wget https://materials.duke.edu/AFLOW/aflow.3.2.14.tar.xz | ||
tar xf aflow.3.2.14.tar.xz | ||
cd aflow.3.2.14 | ||
make -j4 | ||
cd .. | ||
- name: Install KIM model | ||
shell: bash -el {0} | ||
run: | | ||
kim-api-collections-management install user LJ_Shifted_Bernardes_1958LowCutoff_Ar__MO_720819638419_004 | ||
- name: Install | ||
shell: bash -el {0} | ||
run: | | ||
python -m pip install . | ||
- name: Run tests | ||
shell: bash -el {0} | ||
run: | | ||
export PATH=$PATH:$PWD/aflow.3.2.14 | ||
cd tests | ||
export KIM_PROPERTY_PATH=$PWD/mock-test-drivers-dir/*/local-props:$PWD/mock-test-drivers-dir/*/local_props | ||
pytest |
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,14 +1,9 @@ | ||
#!/usr/bin/python | ||
from kim_tools.test_driver.core import PROP_SEARCH_PATHS_INFO | ||
|
||
from kim_tools import add_or_update_property | ||
from sys import argv | ||
from os.path import isfile | ||
|
||
if len(argv) != 2: | ||
raise RuntimeError('This script must be passed exactly one command-line argument.') | ||
if not isfile(argv[1]): | ||
raise RuntimeError('The argument passed is not a valid file path.') | ||
try: | ||
add_or_update_property(argv[1]) | ||
except Exception: | ||
raise RuntimeError('Failed to add or update property from definition file located at:\n%s'%argv[1]) | ||
print('\n!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n'+\ | ||
'THIS UTILITY IS DEPRECATED\n'+\ | ||
'kim-tools should now be able to find your custom properties automatically.\n'+\ | ||
'It recursively looks in the following places:\n'+\ | ||
PROP_SEARCH_PATHS_INFO+\ | ||
'\n!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n') |
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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
name: kim-tools-env | ||
channels: | ||
- conda-forge | ||
dependencies: | ||
- kimpy | ||
- ase | ||
- spglib | ||
- kim-property | ||
- kim-query | ||
- kim-edn |
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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{ | ||
"property-id" "tag:[email protected],2016-05-11:property/atomic-mass0" | ||
"property-title" "Atomic mass" | ||
"property-description" "The atomic mass of the element" | ||
"species" { | ||
"type" "string" | ||
"has-unit" false | ||
"extent" [] | ||
"required" true | ||
"description" "Element symbol of the species" | ||
} | ||
"mass" { | ||
"type" "float" | ||
"has-unit" true | ||
"extent" [] | ||
"required" true | ||
"description" "Mass of a single atom of the species" | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{ | ||
"property-id" "tag:[email protected],2016-05-11:property/atomic-mass1" | ||
"property-title" "Atomic mass" | ||
"property-description" "The atomic mass of the element" | ||
"species" { | ||
"type" "string" | ||
"has-unit" false | ||
"extent" [] | ||
"required" true | ||
"description" "Element symbol of the species" | ||
} | ||
"mass" { | ||
"type" "float" | ||
"has-unit" true | ||
"extent" [] | ||
"required" true | ||
"description" "Mass of a single atom of the species" | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{ | ||
"property-id" "tag:[email protected],2016-05-11:property/atomic-mass2" | ||
"property-title" "Atomic mass" | ||
"property-description" "The atomic mass of the element" | ||
"species" { | ||
"type" "string" | ||
"has-unit" false | ||
"extent" [] | ||
"required" true | ||
"description" "Element symbol of the species" | ||
} | ||
"mass" { | ||
"type" "float" | ||
"has-unit" true | ||
"extent" [] | ||
"required" true | ||
"description" "Mass of a single atom of the species" | ||
} | ||
} |
19 changes: 19 additions & 0 deletions
19
tests/mock-test-drivers-dir/mock-td/local_props/atomic-mass3.edn
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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{ | ||
"property-id" "tag:[email protected],2016-05-11:property/atomic-mass3" | ||
"property-title" "Atomic mass" | ||
"property-description" "The atomic mass of the element" | ||
"species" { | ||
"type" "string" | ||
"has-unit" false | ||
"extent" [] | ||
"required" true | ||
"description" "Element symbol of the species" | ||
} | ||
"mass" { | ||
"type" "float" | ||
"has-unit" true | ||
"extent" [] | ||
"required" true | ||
"description" "Mass of a single atom of the species" | ||
} | ||
} |
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.