Skip to content

Commit b455614

Browse files
authored
Merge pull request #6 from bendog/migrate_to_uv
Migrated from Pipenv to UV and also Python3.13
2 parents 10dba8c + eb88c25 commit b455614

File tree

20 files changed

+1095
-1573
lines changed

20 files changed

+1095
-1573
lines changed

.github/workflows/aws.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@ jobs:
2626
- name: npm build
2727
working-directory: ./frontend
2828
run: npm run build
29-
- name: Set up Python 3.11
29+
- name: Set up Python 3.13
3030
uses: actions/setup-python@v4
3131
with:
32-
python-version: 3.11
32+
python-version: 3.13
3333
cache: pip
3434
- name: Install pipenv
3535
run: pip install pipenv

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ repos:
4646
# Python tools
4747
- repo: https://github.com/astral-sh/ruff-pre-commit
4848
# Ruff version.
49-
rev: v0.4.2
49+
rev: v0.9.6
5050
hooks:
5151
# Run the linter.
5252
- id: ruff

.python-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3.13

.python_version

Lines changed: 0 additions & 1 deletion
This file was deleted.

Pipfile

Lines changed: 0 additions & 25 deletions
This file was deleted.

Pipfile.lock

Lines changed: 0 additions & 1172 deletions
This file was deleted.

infrastructure/lambda_layers/README.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,4 @@
55

66
## Preferred method: create lambda layers with docker
77

8-
update requirements.txt
9-
10-
docker run -v "$PWD":/var/task "public.ecr.aws/sam/build-python3.11" /bin/sh -c "pip install -t python/lib/python3.11/site-packages/ -r requirements.txt ; exit"
11-
zip -r --exclude="*.swp" --exclude=**__pycache__** --exclude="boto3*" --exclude="botocore*" --exclude="/venv*" layer_name.zip python
12-
rm -R python
8+
with docker running, use the ./build.sh file to build new layer zips

infrastructure/lambda_layers/build.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ build_layer_from_requirements () {
1313
# give the directory with the requirements.txt and it will build a zip
1414
# with the same name as the directory
1515
###
16-
PY_VERSION=3.11
17-
DOCKER_BUILD_IMAGE="public.ecr.aws/sam/build-python3.11:latest-x86_64"
16+
PY_VERSION=3.13
17+
DOCKER_BUILD_IMAGE="public.ecr.aws/sam/build-python3.13:latest-x86_64"
1818
LAMBDA_LAYERS_DIR="."
1919
LAYER_NAME=$1
2020

@@ -52,8 +52,8 @@ build_layer_from_requirements () {
5252
create_requirements_from_poetry () {
5353
LAYER_NAME=$1
5454
pushd "$LAYER_NAME" || exit
55-
poetry lock
56-
poetry export -f requirements.txt --output ./requirements.txt
55+
uv lock --project pyproject.toml
56+
uv export --project pyproject.toml --no-emit-project > requirements.txt
5757
popd || exit
5858
}
5959

-11.2 KB
Binary file not shown.

infrastructure/lambda_layers/default_layer/poetry.lock

Lines changed: 0 additions & 308 deletions
This file was deleted.

0 commit comments

Comments
 (0)