From 77eb2cb37300fa440b60d7e73dc6f180d2642efd Mon Sep 17 00:00:00 2001 From: Jessica Gadling Date: Fri, 21 Jun 2024 13:27:20 -0400 Subject: [PATCH 1/2] Update Makefile to run codegen in the base docker image. --- Makefile | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 333117b..87a0761 100644 --- a/Makefile +++ b/Makefile @@ -21,8 +21,8 @@ help: ## display help for this makefile @echo "### SHARED FUNCTIONS END ###" .PHONY: codegen -codegen: ## Run codegen to convert the LinkML schema to a GQL API - $(docker_compose_run) $(CONTAINER) python3 -m platformics.cli.main api generate --schemafile ./schema/schema.yaml --output-prefix . +codegen: build-base ## Run codegen to convert the LinkML schema to a GQL API + $(docker_compose_run) $(BUILD_CONTAINER) api generate --schemafile ./schema/schema.yaml --output-prefix . .PHONY: rm-pycache rm-pycache: ## remove all __pycache__ files (run if encountering issues with pycharm debugger (containers exiting prematurely)) @@ -67,17 +67,20 @@ gha-setup: ## Set up the environment in CI docker swarm init touch test_app/.moto_recording -.PHONY: build ## Build python packages and docker images -build: +.PHONY: build-base ## Build the base docker image +build-base: rm -rf dist/*.whl poetry build # Export poetry dependency list as a requirements.txt, which makes Docker builds # faster by not having to reinstall all dependencies every time we build a new wheel. poetry export --without-hashes --format=requirements.txt > requirements.txt $(docker_compose) build - $(MAKE_TEST_APP) build rm requirements.txt +.PHONY: build ## Build the base docker image and the test app docker image +build: build-platformics + $(MAKE_TEST_APP) build + .PHONY: dev ## Launch a container suitable for developing the platformics library dev: $(MAKE_TEST_APP) init From b69608eff5ba85a4db521e2dc49cefc826019e71 Mon Sep 17 00:00:00 2001 From: Jessica Gadling Date: Fri, 21 Jun 2024 13:28:55 -0400 Subject: [PATCH 2/2] fix --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 87a0761..41f538e 100644 --- a/Makefile +++ b/Makefile @@ -78,7 +78,7 @@ build-base: rm requirements.txt .PHONY: build ## Build the base docker image and the test app docker image -build: build-platformics +build: build-base $(MAKE_TEST_APP) build .PHONY: dev ## Launch a container suitable for developing the platformics library