Skip to content

Commit

Permalink
feat: add Python script for JSON conversion in CLI service
Browse files Browse the repository at this point in the history
  • Loading branch information
mihirsamdarshi committed Aug 13, 2024
1 parent 2aaf3c9 commit 4dd1972
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions service.cli/execute.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,11 @@ if [ ! -f "${OUTPUT_FOLDER}/outputs.json" ]; then
exit 1
fi

cp -r astro/ ./
yarn build
cp build/* "${OUTPUT_FOLDER}/"
python3 /home/${SC_USER_NAME}/json_convert.py "$INPUT_FOLDER" static/
cp -R static/ "$OUTPUT_FOLDER"

# Zip all output files
zip -r outputs.zip "${OUTPUT_FOLDER}"/*.csv "${OUTPUT_FOLDER}"/*.png "${OUTPUT_FOLDER}"/*.rds "${OUTPUT_FOLDER}"/outputs.json
zip -r outputs.zip "${OUTPUT_FOLDER}"/

# Move the zip file to be the only output
mv outputs.zip "${OUTPUT_FOLDER}/final_output.zip"
Expand Down

0 comments on commit 4dd1972

Please sign in to comment.