Skip to content

Commit 9c06be4

Browse files
add in k vector tests (#157)
* add in k vector tests * rename for pytest pytest wants names beginning with test_ * fix kvec test * fix the test issue * convert k-vec cython import to relative * convert k-vec cython import to relative as per #157 * add more error detail, skip pytest failure due to problem in seekpath module * update tests and tested locally * change tolerance --------- Co-authored-by: Brian Toby <[email protected]> Co-authored-by: BHT <[email protected]>
1 parent 88fca4a commit 9c06be4

File tree

2 files changed

+462
-6
lines changed

2 files changed

+462
-6
lines changed

GSASII/k_vector_search.py

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,20 +27,25 @@
2727
# acknowledged for their useful comments.
2828
# +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
2929
#
30-
import numpy as np
3130
import sys
32-
from scipy.optimize import linear_sum_assignment
31+
import time
3332
import math
33+
import numpy as np
34+
from scipy.optimize import linear_sum_assignment
3435
from . import GSASIIfiles as G2fil
36+
37+
gen_option_avail = True
3538
try:
3639
import seekpath
37-
from kvec_general import parallel_proc
38-
gen_option_avail = True
3940
except ModuleNotFoundError:
4041
G2fil.NeededPackage({'magnetic k-vector search':['seekpath']})
42+
print('k_vector_search: seekpath could not be imported')
43+
gen_option_avail = False
44+
try:
45+
from GSASII.kvec_general import parallel_proc
46+
except ModuleNotFoundError:
47+
print('k_vector_search: kvec_general could not be imported')
4148
gen_option_avail = False
42-
import time
43-
4449

4550
def unique_id_gen(string_list: list) -> list:
4651
"""Generate unique IDs for strings included in the string list and the same

0 commit comments

Comments
 (0)