Skip to content

Commit

Permalink
Bump version to 1.2.38 and allow for model input file to be at arbitr…
Browse files Browse the repository at this point in the history
…ary location in inputdir
  • Loading branch information
rudolphpienaar committed May 3, 2024
1 parent c3270de commit 604e6b8
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions spleenseg/spleenseg.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
╚══════╝╚═╝ ╚══════╝╚══════╝╚══════╝╚═╝ ╚═══╝╚══════╝╚══════╝ ╚═════╝
"""

__version__ = "1.2.36"
__version__ = "1.2.38"
import spleenseg.splparser as spl

description: str = """
Expand Down Expand Up @@ -129,7 +129,14 @@ def env_outputDirsMake(options: Namespace) -> None:


def modelFile_inputdirGet(options: Namespace) -> Path:
modelFile: Path = Path(Path(options.inputdir) / options.useModel)
modelTarget: Path = options.useModel
inputDir: Path = Path(options.inputdir)
modelFile: Path = Path("")
path: Path
for path in inputDir.rglob(str(modelTarget)):
if path.is_file():
modelFile = path
break
if not modelFile.exists():
raise FileNotFoundError(f"The model '{modelFile}' does not exist.")
return modelFile
Expand Down

0 comments on commit 604e6b8

Please sign in to comment.