Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adding json2csv to run-workflow #1658

Merged
merged 2 commits into from
Jan 24, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions plantcv/parallel/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import time
import datetime
import plantcv.parallel
import plantcv.utils
import tempfile
import shutil

Expand Down Expand Up @@ -119,6 +120,16 @@ def main():
print(f"Processing results took {process_results_clock_time} seconds.", file=sys.stderr)
###########################################

# Convert json results to csv files
###########################################
# Convert results start time
convert_results_start_time = time.time()
print("Converting json to csv... ", file=sys.stderr)
plantcv.utils.json2csv(config.json, config.json)
convert_results_clock_time = time.time() - convert_results_start_time
print(f"Processing results took {convert_results_clock_time} seconds.", file=sys.stderr)
###########################################

# Cleanup
if config.cleanup is True:
shutil.rmtree(config.tmp_dir)
Expand Down
Loading