Skip to content

Commit

Permalink
Refactor out CONFIG_DIR_PATH
Browse files Browse the repository at this point in the history
  • Loading branch information
edan-bainglass committed Feb 17, 2025
1 parent adab979 commit e75cf9b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/aiidalab_qe/app/parameters/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,9 @@ def recursive_merge(d1, d2):

DEFAULT_PARAMETERS = yaml.safe_load(resources.read_text(parameters, "qeapp.yaml"))

custom_config_file = Path.home() / ".aiidalab" / "quantum-espresso" / "qe-config.yml"
CONFIG_DIR_PATH = Path.home() / ".aiidalab" / "quantum-espresso"

custom_config_file = CONFIG_DIR_PATH / "qe-config.yml"
if custom_config_file.exists():
custom_config = yaml.safe_load(custom_config_file.read_text())
DEFAULT_PARAMETERS = recursive_merge(DEFAULT_PARAMETERS, custom_config)

0 comments on commit e75cf9b

Please sign in to comment.