simplified and renamed justfile recipes

llm-extraction v0.2.0
youainti 3 years ago
parent 9b26cd99df
commit 5d2140accd

@ -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" " "` docker_container := `docker container ls -a | grep aact_db | cut -f 1 -d " " | tr "\n" " "`
#Various paths for docker stuff #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" docker-compose_path := "./AACT_downloader/docker-compose.yaml"
@ -35,12 +29,6 @@ setup-containers:
@echo "Check for downloaded data" @echo "Check for downloaded data"
[ -s {{data_path}}/postgres_data.dmp ] [ -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 #run docker compose
@echo "Setting up AACT container" @echo "Setting up AACT container"
docker-compose -f {{docker-compose_path}} up -d docker-compose -f {{docker-compose_path}} up -d
@ -61,9 +49,6 @@ clean-docker: stop-containers
# cleanup docker volumes # cleanup docker volumes
docker volume prune docker volume prune
#sets up the docker network
setup-docker-network:
docker network create pharmaceutical_research
#Download the AACT data #Download the AACT data
download-aact-data: download-aact-data:
@ -71,16 +56,19 @@ download-aact-data:
unzip {{data_filepath}} -d {{data_path}} unzip {{data_filepath}} -d {{data_path}}
rm {{data_filepath}} 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 based on previously downloaded data
build-from-download: check-status setup-containers download-parse-historical-ct build: check-status setup-containers
echo "system will be built from downloading data" #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

Loading…
Cancel
Save