Skip to content

Commit

Permalink
clarify log messages when writing out
Browse files Browse the repository at this point in the history
  • Loading branch information
nebfield committed Oct 4, 2024
1 parent 1e3f0df commit 3c1ebee
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pgscatalog.core/src/pgscatalog/core/cli/_combine.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ def __init__(self, compress, filename):
logger.info("Writing with gzip")
self.open_function = functools.partial(gzip.open, compresslevel=6)
else:
logger.info("Writing text file")
self.open_function = open

def write(self, batch):
Expand All @@ -56,9 +55,11 @@ def write(self, batch):
)
match mode:
case "wt":
logger.info("Writing variants to new file")
writer.writeheader()
writer.writerows(batch)
case "at":
logger.info("Appending variants to existing file")
writer.writerows(batch)
case _:
raise ValueError(f"Invalid {mode=}")

Check warning on line 65 in pgscatalog.core/src/pgscatalog/core/cli/_combine.py

View check run for this annotation

Codecov / codecov/patch

pgscatalog.core/src/pgscatalog/core/cli/_combine.py#L64-L65

Added lines #L64 - L65 were not covered by tests

0 comments on commit 3c1ebee

Please sign in to comment.