-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated dependencies and added dockerfile (#32)
- Loading branch information
Showing
7 changed files
with
248 additions
and
161 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
FROM python:3.9.9-bullseye | ||
|
||
# Keeps Python from generating .pyc files in the container | ||
ENV PYTHONDONTWRITEBYTECODE=1 | ||
|
||
# Turns off buffering for easier container logging | ||
ENV PYTHONUNBUFFERED=1 | ||
|
||
WORKDIR /app | ||
COPY pyproject.toml poetry.lock /app/ | ||
|
||
RUN apt-get update -qq && apt-get install -y --no-install-recommends \ | ||
git vim iputils-ping curl \ | ||
&& pip install poetry \ | ||
&& poetry config experimental.new-installer false \ | ||
&& poetry config virtualenvs.create false \ | ||
&& poetry install --no-root | ||
|
||
|
||
ENV PYTHONPATH=/app | ||
WORKDIR /app | ||
COPY ./ /app/ | ||
CMD poetry run pytest tests |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
.PHONY: help | ||
help: | ||
@cat $(MAKEFILE_LIST) | grep -E '^[a-zA-Z_-]+:.*?## .*$$' | \ | ||
awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' | ||
|
||
.PHONY: build | ||
build: ## Build docker image | ||
docker build -f Dockerfile -t avro-to-python-types . | ||
|
||
.PHONY: test | ||
test: build ## Build docker image | ||
docker run -t --rm \ | ||
-v /$(PWD):/app \ | ||
avro-to-python-types | ||
|
||
|
||
.PHONY: test_debug | ||
test_debug: build ## Build docker image | ||
docker run -t --rm \ | ||
-v /$(PWD):/app \ | ||
-p 9009:9009 \ | ||
--entrypoint poetry \ | ||
avro-to-python-types \ | ||
run python -m debugpy --listen :9009 --wait-for-client -m pytest tests | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters