Skip to content

Commit

Permalink
Merge pull request QMCPACK#3511 from quantumsteve/cif2cell_available
Browse files Browse the repository at this point in the history
Check if cif2cell is available before running ntest_nexus_structure
  • Loading branch information
ye-luo authored Oct 5, 2021
2 parents aca1bf6 + 4ea1d47 commit 67490d9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions nexus/lib/versions.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@
# 3.7 https://www.python.org/dev/peps/pep-0537/
# 3.8 https://www.python.org/dev/peps/pep-0569/
# 3.9 https://www.python.org/dev/peps/pep-0596/
# 3.10 https://www.python.org/dev/peps/pep-0619/
python3 = '''
3.3.0 2012-09-29
3.3.1 2013-04-06
Expand All @@ -107,6 +108,7 @@
3.7.4 2019-07-08
3.8.0 2019-10-21
3.9.0 2020-06-08
3.10.0 2021-10-04
''',
# numpy releases
# https://github.com/numpy/numpy/releases
Expand Down Expand Up @@ -843,6 +845,7 @@ def check(self,write=True,exit=False,full=False,n=0,pad=' '):
spglib_available = False
pycifrw_available = False
seekpath_available = False
cif2cell_available = False

numpy_supported = False
scipy_supported = False
Expand All @@ -852,6 +855,7 @@ def check(self,write=True,exit=False,full=False,n=0,pad=' '):
spglib_supported = False
pycifrw_supported = False
seekpath_supported = False
cif2cell_supported = False

try: # versioning info is never worth failure
versions = Versions()
Expand All @@ -864,6 +868,7 @@ def check(self,write=True,exit=False,full=False,n=0,pad=' '):
spglib_available = versions.available('spglib')
pycifrw_available = versions.available('pycifrw')
seekpath_available = versions.available('seekpath')
cif2cell_available = versions.available('cif2cell')

numpy_supported = versions.supported('numpy')
scipy_supported = versions.supported('scipy')
Expand All @@ -873,6 +878,7 @@ def check(self,write=True,exit=False,full=False,n=0,pad=' '):
spglib_supported = versions.supported('spglib')
pycifrw_supported = versions.supported('pycifrw')
seekpath_supported = versions.supported('seekpath')
cif2cell_available = versions.supported('cif2cell')
except:
versions = None
#end try
Expand Down
2 changes: 1 addition & 1 deletion nexus/tests/unit/test_structure.py
Original file line number Diff line number Diff line change
Expand Up @@ -676,7 +676,7 @@ def test_read_write():



if versions.pycifrw_available:
if versions.pycifrw_available and versions.cif2cell_available:
def test_read_cif():
"""
Read La2CuO4 structure from a CIF file.
Expand Down

0 comments on commit 67490d9

Please sign in to comment.