Skip to content

Commit 49af36a

Browse files
author
AntoniaSzecsi
committed
Migrate to poetry for dependency and build management
1 parent 6b1402f commit 49af36a

File tree

6 files changed

+1065
-124
lines changed

6 files changed

+1065
-124
lines changed

Makefile

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ target:
55

66
.PHONY: init
77
init:
8-
pip3 install -r requirements/base.txt -r requirements/dev.txt
8+
poetry install
99

1010
.PHONY: test
1111
test: check-format
12-
pytest --cov awslambdaric --cov-report term-missing --cov-fail-under 90 tests
12+
poetry run pytest --cov awslambdaric --cov-report term-missing --cov-fail-under 90 tests
1313

1414
.PHONY: setup-codebuild-agent
1515
setup-codebuild-agent:
@@ -25,48 +25,50 @@ test-integ: setup-codebuild-agent
2525

2626
.PHONY: check-security
2727
check-security:
28-
bandit -r awslambdaric
28+
poetry run bandit -r awslambdaric
2929

3030
.PHONY: format
3131
format:
32-
black setup.py awslambdaric/ tests/
32+
poetry run black awslambdaric/ tests/
3333

3434
.PHONY: check-format
3535
check-format:
36-
black --check setup.py awslambdaric/ tests/
36+
poetry run black --check awslambdaric/ tests/
3737

38-
# Command to run everytime you make changes to verify everything works
3938
.PHONY: dev
4039
dev: init test
4140

42-
# Verifications to run before sending a pull request
4341
.PHONY: pr
4442
pr: init check-format check-security dev
4543

44+
.PHONY: codebuild
4645
codebuild: setup-codebuild-agent
4746
CODEBUILD_IMAGE_TAG=codebuild-agent DISTRO="$(DISTRO)" tests/integration/codebuild-local/test_all.sh tests/integration/codebuild
4847

4948
.PHONY: clean
5049
clean:
5150
rm -rf dist
5251
rm -rf awslambdaric.egg-info
52+
find . -type d -name "__pycache__" -exec rm -r {} +
5353

5454
.PHONY: build
5555
build: clean
56-
BUILD=true python3 setup.py sdist
56+
poetry build
5757

5858
define HELP_MESSAGE
5959

6060
Usage: $ make [TARGETS]
6161

6262
TARGETS
6363
check-security Run bandit to find security issues.
64-
format Run black to automatically update your code to match our formatting.
65-
build Builds the package.
64+
format Run black to automatically update your code to match formatting.
65+
build Builds the package with poetry.
6666
clean Cleans the working directory by removing built artifacts.
6767
dev Run all development tests after a change.
68-
init Initialize and install the requirements and dev-requirements for this project.
68+
init Install dependencies via Poetry.
6969
pr Perform all checks before submitting a Pull Request.
70-
test Run the Unit tests.
70+
test Run the unit tests.
71+
test-smoke Run smoke tests inside Docker.
72+
test-integ Run all integration tests.
7173

7274
endef

0 commit comments

Comments
 (0)