Skip to content

Commit

Permalink
Fix bug in pylot 1
Browse files Browse the repository at this point in the history
failing when prf 1 is running in differently named project directory
  • Loading branch information
dostuffthatmatters committed Mar 1, 2024
1 parent b96e749 commit a013681
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/retrieval/algorithms/proffast-1.0/main/prfpylot/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,13 @@
_PROJECT_DIR = tum_esm_utils.files.get_parent_dir_path(
__file__, current_depth=5
)
assert os.path.basename(_PROJECT_DIR) == "em27-retrieval-pipeline"
pyproj_file = os.path.join(_PROJECT_DIR, "pyproject.toml")
assert os.path.isfile(
pyproj_file
), f"{_PROJECT_DIR} does not seem to be the root of the project"
with open(pyproj_file, "r") as f:
assert 'name = "em27-retrieval-pipeline"' in f.read(
), f"{_PROJECT_DIR} does not seem to be the root of the project"
sys.path.append(_PROJECT_DIR)

import create_input_files, execute_proffast, move_data
Expand Down

0 comments on commit a013681

Please sign in to comment.