Skip to content

Commit

Permalink
squash! Add fixture with sample analysis results
Browse files Browse the repository at this point in the history
Also copy the S3 files for the imported jobs into the dev S3 bucket
  • Loading branch information
KlaasH committed Dec 19, 2024
1 parent 7ba43f1 commit 96a708f
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions scripts/update
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,21 @@ function run_data_fixtures() {
if [ $1 ]; then
echo "*** Importing crash data..."
docker compose run --rm --entrypoint python3 django manage.py import_crash_data

# The sample analysis results fixture takes a few steps
echo "*** Downloading sample analysis results fixture..."
aws --profile pfb s3 sync --exclude "*" --include "sample_analysis_results.json.gz" \
"s3://test-pfb-inputs/" src/django/pfb_analysis/fixtures/
echo "*** Loading sample analysis results fixture..."
docker compose run --rm --entrypoint python3 django manage.py loaddata sample_analysis_results
echo "*** Copying S3 files for sample analysis results fixture into your bucket..."
# If we're running on host rather than in Vagrant, source .env to get the DEV_USER variable
if [ -z $DEV_USER ]; then
source .env
fi
aws --profile pfb s3 sync --quiet \
"s3://test-pfb-inputs/fixture_results_files/" \
"s3://${DEV_USER}-pfb-storage-us-east-1/results/"
fi
docker compose stop database
}
Expand Down

0 comments on commit 96a708f

Please sign in to comment.