setup_case_study

setup_case_study(output_folder_name: str = 'pyglotaran_results', results_folder_root: None | str | PathLike[str] = None) tuple[Path, Path][source]

Quickly get folders for a case study.

This is an execution environment independent (works in python script files and notebooks, independent of where the python runtime was called from) way to get the folder the analysis code resides in and also creates the results_folder in case it didn’t exist before.

Parameters:
  • output_folder_name (str) – Name of the base folder for the results. Defaults to “pyglotaran_results”.

  • results_folder_root (None | str | PathLike[str]) – The folder where the results named output_folder_name should be saved to. Defaults to None, which results in the users Home folder being used.

Returns:

results_folder, script_folder:

results_folder:

Folder to be used to save results in of the pattern (results_folder_root / output_folder_name / analysis_folder.parent).

analysis_folder:

Folder the script or Notebook resides in.

Return type:

tuple[Path, Path]