Skip to content

Commit

Permalink
Merge pull request #255 from FlorisCalkoen/feat/infer-base-dir
Browse files Browse the repository at this point in the history
helper function to infer data dir
  • Loading branch information
2320sharon authored Jun 6, 2024
2 parents 7f6857f + c5b12df commit 6048233
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/coastseg/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -3425,7 +3425,6 @@ def rescale_array(dat, mn, mx):
M = max(dat.flatten())
return (mx - mn) * (dat - m) / (M - m) + mn


def is_interactive() -> bool:
"""
Check if the code is running in a Jupyter Notebook environment.
Expand Down Expand Up @@ -3459,7 +3458,7 @@ def resolve_repo_path(cwd: pathlib.Path, proj_name: str) -> pathlib.Path:
if str(proj_dir) == root:
msg = "Reached root depth - cannot resolve project path."
raise ValueError(msg)
# return the project directory path for example CoastSeg directory

return proj_dir

cwd = pathlib.Path().resolve() if is_interactive() else pathlib.Path(__file__)
Expand Down

0 comments on commit 6048233

Please sign in to comment.