-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add test placeholder and fixture * style * scope seed * setup ordering helper and tests * add basic parallel structure * force include new testing log location * try restoring previous default for CI? * fix size issue * finalize logical structure * finalize logical structure; add cleanup; add test * clarify role * fix tests --------- Co-authored-by: CodyCBakerPhD <[email protected]>
- Loading branch information
1 parent
b86d789
commit 5e2ef3b
Showing
15 changed files
with
474 additions
and
204 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import pathlib | ||
import pandas | ||
|
||
|
||
def order_parsed_logs( | ||
unordered_parsed_s3_log_folder_path: pathlib.Path, ordered_parsed_s3_log_folder_path: pathlib.Path | ||
) -> None: | ||
"""Order the contents of all parsed log files chronologically.""" | ||
ordered_parsed_s3_log_folder_path.mkdir(exist_ok=True) | ||
|
||
for unordered_parsed_s3_log_file_path in unordered_parsed_s3_log_folder_path.iterdir(): | ||
unordered_parsed_s3_log = pandas.read_table(filepath_or_buffer=unordered_parsed_s3_log_file_path, index_col=0) | ||
ordered_parsed_s3_log = unordered_parsed_s3_log.sort_values(by="timestamp") | ||
|
||
# correct index of first column | ||
ordered_parsed_s3_log.index = range(len(ordered_parsed_s3_log)) | ||
|
||
ordered_parsed_s3_log_file_path = ordered_parsed_s3_log_folder_path / unordered_parsed_s3_log_file_path.name | ||
ordered_parsed_s3_log.to_csv(path_or_buf=ordered_parsed_s3_log_file_path, sep="\t") |
Oops, something went wrong.