humlab-sead / sead_bugs_import

SEAD bugs import
2 stars 0 forks source link

HOWTO Debug bugs-import using a minimal BugsCEP #50

Open roger-mahler opened 1 year ago

roger-mahler commented 1 year ago

Create an empty BugsCEP database

Use Python script create_empty.py in folder test/scaffolding to create an empty BugsCEP database.

cd sead_bugs_import/src/test/scaffolding
. ./.venv/bin/activate
PYTHONPATH=. python create_empty.py bugsdata_20230206.mdb bugsdata_empty.mdb

Create a SEAD database without any submissions

cd sead_change_control
./bin/create_sead_201912_without_submissions

Content of script file:

#!/bin/bash
# This script creares a 201912 database with no submissions added

other_projects="utility security general sead_api subsystem submissions"
submission_project="submissions"
target_name=sead_production_201912_without_submissions
target_tag=@2022.12

bin/deploy-staging --target-db-name $target_name --sqitch-project utility --source-type dump --create-database --deploy-to-tag  $target_tag
bin/deploy-staging --target-db-name $target_name --sqitch-project security --deploy-to-tag $target_tag
bin/deploy-staging --target-db-name $target_name --sqitch-project general --deploy-to-tag $target_tag
bin/deploy-staging --target-db-name $target_name --sqitch-project sead_api --deploy-to-tag $target_tag
bin/deploy-staging --target-db-name $target_name --sqitch-project subsystem --deploy-to-tag $target_tag
bin/deploy-staging --target-db-name $target_name --sqitch-project submissions --deploy-to-tag 20191221_DML_CLEARINGHOUSE_STARTINGPOINT

Create a reduced BugsCEP database with only one sample

Use Jailer to create a minimal consistent subset.