Add Zero-Padding to CSV Filenames #8

Merged
nuluh merged 2 commits from feature/csv-padding-naming into feature/automate-csv-file 2024-08-18 03:36:24 +00:00
nuluh commented 2024-08-17 14:51:32 +00:00 (Migrated from github.com)

Overview

This pull request introduces changes to the script responsible for generating CSV files in the data/processed directory. The update adds zero-padding to the filenames to ensure they are sorted alphanumerically in a more predictable manner, improving readability and manageability.

Changes Made

  • Modified the filename generation logic to include zero-padding for both damage levels and test numbers.
  • Updated the script to handle up to 10 damages and 10 tests per damage with consistent filename formatting.
  • Included an example in the script comments to illustrate the new filename format (e.g., D01_TEST01.csv).

Justification

Previously, the CSV filenames were not zero-padded, which could lead to sorting issues on some file systems and make it harder to locate specific files, especially when dealing with large numbers of tests or damage levels. By padding the numbers, files will remain in the correct numerical order regardless of the number of digits.

Testing

The script was tested locally to ensure:

  • Filenames are generated correctly with zero-padding.
  • No disruptions to the existing functionality of CSV generation (e.g., correct timestamp and value generation).
  • Compatibility with existing data processing tools that might rely on specific filename patterns.
## Overview This pull request introduces changes to the script responsible for generating CSV files in the `data/processed` directory. The update adds zero-padding to the filenames to ensure they are sorted alphanumerically in a more predictable manner, improving readability and manageability. ## Changes Made - Modified the filename generation logic to include zero-padding for both damage levels and test numbers. - Updated the script to handle up to 10 damages and 10 tests per damage with consistent filename formatting. - Included an example in the script comments to illustrate the new filename format (e.g., `D01_TEST01.csv`). ## Justification Previously, the CSV filenames were not zero-padded, which could lead to sorting issues on some file systems and make it harder to locate specific files, especially when dealing with large numbers of tests or damage levels. By padding the numbers, files will remain in the correct numerical order regardless of the number of digits. ## Testing The script was tested locally to ensure: - Filenames are generated correctly with zero-padding. - No disruptions to the existing functionality of CSV generation (e.g., correct timestamp and value generation). - Compatibility with existing data processing tools that might rely on specific filename patterns.
Sign in to join this conversation.