Skip to content

Commit

Permalink
add --dry-run option to analysis to db script
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielMwendwa committed Aug 1, 2024
1 parent cb0ae99 commit b0a1603
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions docker-run-engagement-db-to-analysis.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ IMAGE_NAME="$(<configurations/docker_image_name.txt)"

while [[ $# -gt 0 ]]; do
case "$1" in
--dry-run)
DRY_RUN="--dry-run"
shift;;
--incremental-cache-volume)
INCREMENTAL_ARG="--incremental-cache-path /cache"
INCREMENTAL_CACHE_VOLUME_NAME="$2"
Expand All @@ -21,9 +24,9 @@ done
# Check that the correct number of arguments were provided.
if [[ $# -ne 5 ]]; then
echo "Usage: $0
[--incremental-cache-volume <incremental-cache-volume>]
[--dry-run] [--incremental-cache-volume <incremental-cache-volume>]
<user> <google-cloud-credentials-file-path> <configuration-file> <code-schemes-dir> <data-dir>"
exit
exit 1
fi

# Assign the program arguments to bash variables.
Expand All @@ -33,7 +36,7 @@ CONFIGURATION_FILE=$3
CODE_SCHEMES_DIR=$4
DATA_DIR=$5

CMD="pdm run python -u engagement_db_to_analysis.py ${INCREMENTAL_ARG} ${USER} \
CMD="pdm run python -u engagement_db_to_analysis.py ${DRY_RUN} ${INCREMENTAL_ARG} ${USER} \
/credentials/google-cloud-credentials.json configuration /data/membership-groups /data/analysis-outputs"

if [[ "$INCREMENTAL_ARG" ]]; then
Expand Down

0 comments on commit b0a1603

Please sign in to comment.