-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PythonJob: check duplicate entry points for data serializer (#140)
* check duplicate entry points for the data serializer * support configuration file for workgraph: `workgraph.json` in the aiida configuration directory
- Loading branch information
1 parent
f750392
commit 7192fe6
Showing
4 changed files
with
89 additions
and
10 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,13 @@ | ||
import json | ||
from aiida.manage.configuration.settings import AIIDA_CONFIG_FOLDER | ||
|
||
|
||
def load_config() -> dict: | ||
"""Load the configuration from the config file.""" | ||
config_file_path = AIIDA_CONFIG_FOLDER / "workgraph.json" | ||
try: | ||
with config_file_path.open("r") as f: | ||
config = json.load(f) | ||
except FileNotFoundError: | ||
config = {} | ||
return config |
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