OSOceanAcoustics / echodataflow

Orchestrated sonar data processing workflow
https://echodataflow.readthedocs.io/en/latest/
MIT License
4 stars 1 forks source link

Issue with newline character handling in _extract_from_zip and _extract_from_text functions #63

Closed Sohambutala closed 4 months ago

Sohambutala commented 4 months ago

Description

The _extract_from_zip and _extract_from_text functions currently expect filenames in a transect group to be formatted without newline characters. This expectation is problematic because typical zip operations and file generation processes often include newline characters in filenames.

Expected Behavior

The functions should be able to correctly handle filenames that include newline characters.

Actual Behavior

When newline characters are included in filenames, the functions do not process the files correctly.

Steps to Reproduce

  1. Create a zip file with filenames that include newline characters.
  2. Attempt to process the zip file using the _extract_from_zip function.
  3. Observe that the function fails to handle the files correctly.

Possible Solution

Adjust the filename parsing logic in both functions to strip newline characters or appropriately handle them during processing.

Additional Context