Skip to content

Commit 23d6a30

Browse files
committed
chore(python): migrate from poetry to uv
1 parent 485f760 commit 23d6a30

7 files changed

Lines changed: 2344 additions & 3169 deletions

File tree

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Deletes old users that have no notes saved
22
cleanup_zombie_users:
3-
@cd scripts && poetry run python3 ./cleanup_zombie_users.py
3+
@cd scripts && uv run python ./cleanup_zombie_users.py
44

55
# Deploy infrastructure
66
deploy:
@@ -20,7 +20,7 @@ init:
2020
@cd client && npm i
2121
@echo "🍄 Node.js dependencies successfully installed! 🍄"
2222
@echo "⏳ Installing Python dependencies... ⏳"
23-
@cd scripts && poetry install
23+
@cd scripts && uv sync
2424
@echo "🍄 Python dependencies successfully installed! 🍄"
2525

2626
# Run the project locally

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ The Webnotes UI was built using a component library I made called [Eri](https://
1515

1616
### Install dependencies
1717

18+
Install [`uv`](https://docs.astral.sh/uv/) first for the Python tooling under `scripts/`, then run:
19+
1820
```sh
1921
make init
2022
```

bin/test.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ pushd scripts > /dev/null
2222
# CKV_AWS_117 is skipped because the default AWS VPC is deemed sufficient
2323
# CKV_AWS_119 is skipped because AWS encrypt DynamoDB at rest with their own keys and that is deemed sufficient (see also https://github.com/bridgecrewio/checkov/issues/1473)
2424
# CKV_AWS_272 is skipped because it is deemed overly heavyweight
25-
poetry run checkov --directory ../infra --quiet --skip-check CKV_AWS_50,CKV_AWS_116,CKV_AWS_117,CKV_AWS_119,CKV_AWS_272
25+
uv run checkov --directory ../infra --quiet --skip-check CKV_AWS_50,CKV_AWS_116,CKV_AWS_117,CKV_AWS_119,CKV_AWS_272
2626
# --quiet
2727
popd > /dev/null
2828
echo "🍄 Checkov passed! 🍄"

scripts/README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,5 @@ Place to keep Python scripts.
44

55
## Getting started
66

7-
- You can install dependencies using [Poetry](https://python-poetry.org)
8-
- You can run the scripts within this directory from the Makefile in the parent directory
7+
- You can run the scripts within this directory from the [Makefile](/Makefile) in the parent directory
98
- You may need AWS credentials with the correct permissions set up to run these

scripts/poetry.lock

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

scripts/pyproject.toml

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,13 @@
1-
[tool.poetry]
2-
authors = ["Your Name <you@example.com>"]
3-
description = ""
1+
[project]
42
name = "webnotes-scripts"
5-
package-mode = false
6-
readme = "README.md"
73
version = "0.1.0"
4+
description = "Python scripts used by the Webnotes project."
5+
readme = "README.md"
6+
requires-python = ">=3.11,<4.0"
7+
dependencies = [
8+
"boto3==1.35.49",
9+
"checkov>=3.2.500,<4.0.0",
10+
]
811

9-
[tool.poetry.dependencies]
10-
python = "^3.11"
11-
boto3 = "1.35.49"
12-
checkov = "^3.2.500"
13-
14-
[build-system]
15-
requires = ["poetry-core"]
16-
build-backend = "poetry.core.masonry.api"
12+
[tool.uv]
13+
package = false

scripts/uv.lock

Lines changed: 2328 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)