1234567891011121314151617181920212223242526 |
- from pathlib import Path
- class project_paths_class:
- """
- Define the custom paths in this project.
- """
- working_dir = Path.home() / 'Projects' / 'cobrawap_publication_code'
- def __init__(self):
- """
- Optionally set alternative paths for the execution on a compute cluster.
- """
- if self.iam_on_cluster():
- self.working_dir = Path('/users') / 'gutzen' / 'cobrawap_publication_code'
-
- self.pipeline_output = self.working_dir / 'cobrawap_output'
- self.figures = self.working_dir / 'figures'
- self.dataframes = self.pipeline_output / 'aggregated_output'
- def iam_on_cluster(self):
- if 'home' in str(Path.home()):
- return False
- else:
- return True
- project_paths = project_paths_class()
|