Skip to content

Commit

Permalink
feature: upgrade to poetry v2 (#907)
Browse files Browse the repository at this point in the history
Co-authored-by: Ran Isenberg <ran.isenberg@ranthebuilder.cloud>
  • Loading branch information
ran-isenberg and Ran Isenberg authored Jan 14, 2025
1 parent a2e8d84 commit a8ab43c
Show file tree
Hide file tree
Showing 9 changed files with 317 additions and 1,013 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ repos:
exclude: "^(?!helpers/)"
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.8.4
rev: v0.9.1
hooks:
# Run the Ruff linter.
- id: ruff
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2024 Ran Isenberg
Copyright (c) 2025 Ran Isenberg

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,12 @@ Answer the questions to select repo name, service name, etc.:

```bash
cd {new repo folder}
poetry shell
poetry env activate
make deploy
```

Make sure you have poetry v2 and above.

You can also run 'make pr' will run all checks, synth, file formatters , unit tests, deploy to AWS and run integration and E2E tests.

## **The Problem**
Expand Down
2 changes: 1 addition & 1 deletion docs/getting_started.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ description: AWS Lambda Cookbook Project Getting started
* **Docker** - install [Docker](https://www.docker.com/){target="_blank"}. Required for the Lambda layer packaging process.
* **[AWS CDK](cdk.md)** - Required for synth & deploying the AWS Cloudformation stack. Run CDK [Bootstrap](https://docs.aws.amazon.com/cdk/v2/guide/bootstrapping.html) on your AWS account and region.
* Python 3.13
* [poetry](https://pypi.org/project/poetry/){target="_blank"} - Make sure to run ``poetry config --local virtualenvs.in-project true`` so all dependencies are installed in the project '.venv' folder.
* [poetry](https://pypi.org/project/poetry/){target="_blank"} - Make sure to have poetry v2 and above and to run ``poetry config --local virtualenvs.in-project true`` so all dependencies are installed in the project '.venv' folder.
* For Windows based machines, use the Makefile_windows version (rename to Makefile). Default Makefile is for Mac/Linux.

## Getting Started
Expand Down
2 changes: 1 addition & 1 deletion mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ markdown_extensions:
class: mermaid
format: !!python/name:pymdownx.superfences.fence_code_format

copyright: Copyright &copy; 2024 Ran Isenberg
copyright: Copyright &copy; 2025 Ran Isenberg

plugins:
- git-revision-date
Expand Down
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"dependencies": {
"aws-cdk": "2.173.4"
"aws-cdk": "2.175.1"
}
}
1,298 changes: 297 additions & 1,001 deletions poetry.lock

Large diffs are not rendered by default.

10 changes: 8 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
[build-system]
requires = ["poetry>=2.0.1"]
build-backend = "poetry.core.masonry.api"
[tool.poetry]
name = "aws_lambda_handler_cookbook"
version = "3.0.0"
Expand All @@ -15,6 +18,7 @@ readme = "README.md"
keywords = ["aws lambda cookbook", "guide to aws lambda", "cdk blueprint", "best practices", "serverless service blueprint"]
license = "MIT-0"


[tool.poetry.dependencies]
python = "^3.13.0"
pydantic = {version = "^2.0.3"}
Expand All @@ -25,7 +29,7 @@ cachetools = "*"
boto3 = "^1.26.125"
aws-lambda-env-modeler = "*"

[tool.poetry.dev-dependencies]
[tool.poetry.group.dev.dependencies]
# CDK
service-cdk = {path = "cdk", develop = true}
aws-cdk-lib = ">=2.130.0"
Expand Down Expand Up @@ -53,9 +57,11 @@ types-cachetools = "*"
mypy = "*"
types-requests = "*"
toml = "*"
poetry-plugin-export = "*"
mkdocs-render-swagger-plugin = "*"

[tool.poetry.requires-plugins]
poetry-plugin-export = ">=1.9"

[tool.pytest.ini_options]
testpaths = "tests"

Expand Down

0 comments on commit a8ab43c

Please sign in to comment.