Skip to content

Commit 47e0b43

Browse files
authored
Use uv and uv workspaces (#2)
1 parent ffb11fd commit 47e0b43

File tree

90 files changed

+714
-417
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

90 files changed

+714
-417
lines changed

.github/workflows/test.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@ on:
44
pull_request:
55
paths:
66
- .github/workflows/test.yml
7-
- localstack-sdk-*
7+
- src/*
8+
- test/*
9+
- packages/*
810
push:
911
branches:
1012
- main
@@ -23,13 +25,12 @@ jobs:
2325
with:
2426
python-version: "3.11"
2527

26-
- name: Update pip
27-
run: |
28-
python -m pip install --upgrade pip
28+
- name: Install uv
29+
uses: astral-sh/setup-uv@v3
2930

3031
- name: Install project
3132
run: |
32-
make install-dev
33+
uv sync
3334
3435
- name: Install LocalStack
3536
run: |

Makefile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ PIP_CMD ?= pip
1010

1111
venv: $(VENV_ACTIVATE) ## Create a new (empty) virtual environment
1212

13-
$(VENV_ACTIVATE): localstack-sdk-python/pyproject.toml
13+
$(VENV_ACTIVATE): src
1414
test -d $(VENV_DIR) || $(VENV_BIN) $(VENV_DIR)
1515
$(VENV_RUN); $(PIP_CMD) install --upgrade pip
1616
touch $(VENV_ACTIVATE)
@@ -30,13 +30,13 @@ clean: ## Clean up
3030
rm -rf $(VENV_DIR)
3131

3232
clean-generated: ## Cleanup generated code
33-
rm -rf localstack-sdk-generated/localstack/
33+
rm -rf packages/localstack-sdk-generated/localstack/
3434

3535
format: ## Run ruff to format the whole codebase
36-
($(VENV_RUN); python -m ruff format .; python -m ruff check --output-format=full --exclude localstack-sdk/localstack/generated --fix .)
36+
($(VENV_RUN); python -m ruff format .; python -m ruff check --output-format=full --exclude packages --fix .)
3737

3838
lint:
39-
($(VENV_RUN); python -m ruff check --exclude localstack-sdk/localstack/generated --output-format=full . && python -m ruff format --exclude localstack-sdk/localstack/generated --check .)
39+
($(VENV_RUN); python -m ruff check --exclude localstack-sdk/localstack/generated --output-format=full . && python -m ruff format --exclude packages --check .)
4040

4141
test: ## Run automated tests
4242
($(VENV_RUN); $(TEST_EXEC) pytest --durations=10 --log-cli-level=$(PYTEST_LOGLEVEL) $(PYTEST_ARGS) $(TEST_PATH))

VERSION

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

bin/generate.sh

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
11
#!/bin/bash
22

3-
docker run --rm -v "${PWD}:/local" openapitools/openapi-generator-cli generate \
3+
version=$(cat VERSION)
4+
5+
docker run --rm -v "${PWD}:/local" openapitools/openapi-generator-cli:v7.9.0 generate \
46
-i /local/openapi.yaml \
57
--skip-validate-spec \
68
-g python \
7-
-o /local/localstack-sdk-generated \
9+
-o /local//packages/localstack-sdk-generated \
810
--global-property models,apis,supportingFiles \
911
-p packageName=localstack.sdk \
10-
--template-dir /local/localstack-sdk-generated/templates \
12+
-p packageVersion=$version \
13+
--template-dir /local/packages/localstack-sdk-generated/templates \
1114
--global-property apiTests=false,modelTests=false \
1215
--global-property apiDocs=false,modelDocs=False

localstack-sdk-generated/.openapi-generator/VERSION

Lines changed: 0 additions & 1 deletion
This file was deleted.
File renamed without changes.

localstack-sdk-generated/.openapi-generator-ignore renamed to packages/localstack-sdk-generated/.openapi-generator-ignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ README.md
99
tox.ini
1010
localstack/sdk/__init__.py
1111
localstack/__init__.py
12-
pyproject.toml
1312
setup.py
1413
setup.cfg
1514
test-requirements.txt

localstack-sdk-generated/.openapi-generator/FILES renamed to packages/localstack-sdk-generated/.openapi-generator/FILES

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,4 +63,5 @@ localstack/sdk/models/update_config_option200_response.py
6363
localstack/sdk/models/update_config_option_request.py
6464
localstack/sdk/py.typed
6565
localstack/sdk/rest.py
66+
pyproject.toml
6667
requirements.txt
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
7.9.0

localstack-sdk-generated/localstack/sdk/api/__init__.py renamed to packages/localstack-sdk-generated/localstack/sdk/api/__init__.py

File renamed without changes.

0 commit comments

Comments
 (0)