Skip to content

Commit

Permalink
fixed file iteration bug
Browse files Browse the repository at this point in the history
  • Loading branch information
haeussma committed May 8, 2024
1 parent c0e0c1a commit bf22ac6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
7 changes: 3 additions & 4 deletions chromatopy/readers/chromreader.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,11 @@ def read_directory(dir_path: Path) -> List[Measurement]:
List[Measurement]: A list of Measurement objects representing the chromatographic data.
"""
if dir_path.is_file():
return [
ChromReaderFactory.create_reader(file_path).read()
for file_path in sorted(dir_path).iterdir()
]
print(dir_path)
return [ChromReaderFactory.create_reader(dir_path).read()]
elif dir_path.is_dir():
return [
ChromReaderFactory.create_reader(file_path).read()
for file_path in sorted(dir_path.iterdir())
if file_path.suffix == ".txt"
]
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "chromatopy"
version = "0.1.7"
version = "0.1.8"
description = "Tool for processing chromatography data"
authors = ["haeussma <[email protected]>"]
license = "MIT"
Expand Down

0 comments on commit bf22ac6

Please sign in to comment.