Skip to content

Commit

Permalink
Merge pull request #115 from pyiron/fixpotentials
Browse files Browse the repository at this point in the history
Fix double number of potentials
  • Loading branch information
jan-janssen committed Mar 11, 2021
2 parents ce6994a + 4d37b08 commit f7e7981
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion pyiron_atomistics/atomistics/job/potentials.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,9 @@ def _get_potential_df(plugin_name, file_name_lst, backward_compatibility_name):
resource_path_lst = s.resource_paths
for conda_var in ["CONDA_PREFIX", "CONDA_DIR"]:
if conda_var in env.keys(): # support iprpy-data package
resource_path_lst += [os.path.join(env[conda_var], "share", "iprpy")]
path_to_add = os.path.join(env[conda_var], "share", "iprpy")
if path_to_add not in resource_path_lst:
resource_path_lst += [path_to_add]
df_lst = []
for resource_path in resource_path_lst:
if os.path.exists(os.path.join(resource_path, plugin_name, "potentials")):
Expand Down
4 changes: 3 additions & 1 deletion pyiron_atomistics/sphinx/potential.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,9 @@ def find_potential_file(path):
resource_path_lst = s.resource_paths
for conda_var in ["CONDA_PREFIX", "CONDA_DIR"]:
if conda_var in env.keys(): # support sphinx-data package
resource_path_lst += [os.path.join(os.environ[conda_var], "share", "sphinxdft")]
path_to_add = os.path.join(env[conda_var], "share", "sphinxdft")
if path_to_add not in resource_path_lst:
resource_path_lst += [path_to_add]
return find_potential_file_base(
path=path,
resource_path_lst=resource_path_lst,
Expand Down

0 comments on commit f7e7981

Please sign in to comment.