Skip to content

Commit

Permalink
Merge pull request #58 from chanzuckerberg/jgadling/codegen-cleanup
Browse files Browse the repository at this point in the history
Update Makefile to run codegen in the base docker image.
  • Loading branch information
jgadling committed Jun 21, 2024
2 parents 04b37a8 + b69608e commit 65c3bf1
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down Expand Up @@ -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-base
$(MAKE_TEST_APP) build

.PHONY: dev ## Launch a container suitable for developing the platformics library
dev:
$(MAKE_TEST_APP) init
Expand Down

0 comments on commit 65c3bf1

Please sign in to comment.