diff --git a/AACT_downloader/readme.md b/AACT_downloader/readme.md new file mode 100644 index 0000000..89ff05e --- /dev/null +++ b/AACT_downloader/readme.md @@ -0,0 +1 @@ +This is what is needed to setup the database. diff --git a/Orangebook/readme.md b/Orangebook/readme.md new file mode 100644 index 0000000..dd12719 --- /dev/null +++ b/Orangebook/readme.md @@ -0,0 +1 @@ +Most of these are related to potentially parsing orangebook data from the pdfs. diff --git a/classifications/readme.md b/classifications/readme.md new file mode 100644 index 0000000..0da5364 --- /dev/null +++ b/classifications/readme.md @@ -0,0 +1 @@ +I believe this is for a ml classification or reasons for terminations. diff --git a/justfile b/justfile index 07e169f..120859d 100644 --- a/justfile +++ b/justfile @@ -13,6 +13,16 @@ data_filepath := data_path / data_file #must match the 'container name: aact_db' in the docker-compose.yaml docker_container := `docker container ls -a | grep aact_db | cut -f 1 -d " " | tr "\n" " "` +#Various paths for docker stuff +dockerdef_path := "./AACT_downloader/ClinicalTrialHistory" +dockerdef_dockerfile := dockerdef_path / "Dockerfile" +dockerdef_schema_path := dockerdef_path / "docker-entrypoint-initdb.d" +dockerdef_schema_http := dockerdef_schema_path / "020_HttpSchema.sql" +dockerdef_schema_hist:= dockerdef_schema_path / "030_HistoricalSchema.sql" +dockerdef_schema_AViews := dockerdef_schema_path / "090_AnalysisViews.sql" +docker-compose_path := "./AACT_downloader/docker-compose.yaml" + + #check for necessary dependencies check-status: docker --version @@ -23,23 +33,29 @@ check-status: #Setup the AACT container setup-containers: @echo "Check for downloaded data" - [ -f ./AACT_downloader/aact_downloads/{{data_file}} ] - @echo "Setting up AACT container" + [ -s {{data_path}}/postgres_data.dmp ] + + @echo "Checking for key files" #check appropriate files and directories are setup + [ -s {{dockerdef_schema_http}} ] + [ -s {{dockerdef_schema_hist}} ] + [ -s {{dockerdef_schema_AViews}} ] #run docker compose + @echo "Setting up AACT container" + docker-compose -f {{docker-compose_path}} up -d #Stop the appropriate docker container stop-containers: #stop all docker containers if they are currently running. #The if statement is used because sometimes there are no running containers - if [ "{{docker_container}}" ]; then docker stop {{docker_container}}; fi + if [ -n "{{docker_container}}" ]; then docker stop {{docker_container}}; fi @echo "confirmed that docker containers {{docker_container}} are stopped" #Remove the appropriate docker container as well as associated volumes clean-docker: stop-containers # remove docker containers - if [ "{{docker_container}}" ]; then docker rm {{docker_container}}; fi + if [ -n "{{docker_container}}" ]; then docker rm {{docker_container}}; fi # cleanup docker network docker network prune # cleanup docker volumes