Skip to content

Commit

Permalink
Add additional environment variables (#197)
Browse files Browse the repository at this point in the history
* Added FDP_SCRIPT environment variable

* Added FDP_DATA_STORE

* Script is optional, handle as such
  • Loading branch information
kzscisoft committed Jan 19, 2022
1 parent d214012 commit 953312f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion fair/user_config/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -627,6 +627,9 @@ def _create_environment(self) -> None:
_new_py_path = self.local_repository
_environment["PYTHONPATH"] = _new_py_path
_environment["FDP_CONFIG_DIR"] = self._job_dir
_environment["FDP_CONFIG_NAME"] = fdp_com.USER_CONFIG_FILE
_environment["FDP_DATA_STORE"] = self.default_data_store
_environment["FDP_SCRIPT"] = self.script
_environment["FDP_LOCAL_TOKEN"] = fdp_req.local_token()
return _environment

Expand Down Expand Up @@ -1162,7 +1165,7 @@ def _remove_status_tags(self) -> bool:
@property
def script(self) -> str:
"""Retrieve path of session executable script"""
return self["run_metadata.script_path"]
return self.get("run_metadata.script_path", None)

@property
def content(self) -> typing.Dict:
Expand Down

0 comments on commit 953312f

Please sign in to comment.