From 5d2140accd6ec6847205f0dd7f8cc215a1682b39 Mon Sep 17 00:00:00 2001 From: youainti Date: Tue, 27 Dec 2022 15:20:37 -0800 Subject: [PATCH] simplified and renamed justfile recipes --- justfile | 36 ++++++++++++------------------------ 1 file changed, 12 insertions(+), 24 deletions(-) diff --git a/justfile b/justfile index 7f9775e..fe37057 100644 --- a/justfile +++ b/justfile @@ -14,12 +14,6 @@ data_filepath := data_path / data_file 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" @@ -35,12 +29,6 @@ setup-containers: @echo "Check for downloaded data" [ -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 @@ -61,9 +49,6 @@ clean-docker: stop-containers # cleanup docker volumes docker volume prune -#sets up the docker network -setup-docker-network: - docker network create pharmaceutical_research #Download the AACT data download-aact-data: @@ -71,16 +56,19 @@ download-aact-data: unzip {{data_filepath}} -d {{data_path}} rm {{data_filepath}} -#Download and parse historical clinical trials data -download-parse-historical-ct: - echo "not implemented" - -#Build everything from scratch -build-from-scratch: check-status download-aact-data setup-containers download-parse-historical-ct - echo "system will be built from scratch, including downloading data" #build based on previously downloaded data -build-from-download: check-status setup-containers download-parse-historical-ct - echo "system will be built from downloading data" +build: check-status setup-containers + #system built from downloaded data + +#remove containers and rebuild based on previously downloaded data +rebuild: clean-docker build + #system will be built from scratch, including downloading data +#download data and create the containers +create: check-status download-aact-data build + # downloaded data and built from scratch +#remove containers, redownload data, then rebuild containers +recreate: clean-docker create + # removed containers, redownloaded data, then rebuilt containers