Skip to content

Commit 296e483

Browse files
authored
Small improvements to the makefile and readme (#9)
1 parent baeaa0d commit 296e483

File tree

3 files changed

+11
-30
lines changed

3 files changed

+11
-30
lines changed

Makefile

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,28 @@
1-
VENV_CMD ?= python3 -m venv
21
VENV_DIR ?= .venv
3-
VENV_BIN = python3 -m venv
42
VENV_RUN = . $(VENV_DIR)/bin/activate
53
VENV_ACTIVATE = $(VENV_DIR)/bin/activate
64
TEST_PATH ?= .
75
TEST_EXEC ?= python -m
86
PYTEST_LOGLEVEL ?= warning
9-
PIP_CMD ?= pip
107

118
install: ## omit dev dependencies
9+
uv venv
1210
uv sync --no-dev
1311

1412
install-dev: ## create the venv and install
13+
uv venv
1514
uv sync
1615

17-
build-spec: ## build the entire localstack api spec (openapi.yaml in the root folder)
18-
$(VENV_RUN); python scripts/create_spec.py
19-
2016
clean: ## Clean up the virtual environment
2117
rm -rf $(VENV_DIR)
2218
rm -rf dist/
2319

2420
clean-generated: ## Cleanup generated code
2521
rm -rf packages/localstack-sdk-generated/localstack/
2622

23+
generate: ## Generate the code from the OpenAPI specs
24+
./bin/generate.sh
25+
2726
format:
2827
($(VENV_RUN); python -m ruff format --exclude packages .; python -m ruff check --output-format=full --exclude packages --fix .)
2928

README.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,23 @@
11
# LocalStack Python SDK
2+
[![PyPI version](https://img.shields.io/pypi/v/localstack-sdk-python)](https://pypi.org/project/localstack-sdk-python/)
23

34
This is the Python SDK for LocalStack.
45
LocalStack offers a number of developer endpoints (see [docs](https://docs.localstack.cloud/references/internal-endpoints/)).
56
This SDK provides a programmatic and easy way to interact with them.
67

78
> [!WARNING]
8-
> This project is still in a preview phase, and will be subject to fast and breaking changes.
9+
> This project is still in a preview phase and will be subject to fast and breaking changes.
910
1011
### Project Structure
1112

1213
This project follows the following structure:
1314

14-
- `packages/localstack-sdk-generated` is a python project generated from the OpenAPI specs with [openapi-generator](https://github.com/OpenAPITools/openapi-generator).
15-
- `localstack-sdk-python` is the main project that has `localstack-sdk-generated` has the main dependency.
15+
- `packages/localstack-sdk-generated` is a Python project generated from the OpenAPI specs with [openapi-generator](https://github.com/OpenAPITools/openapi-generator).
16+
LocalStack's OpenAPI specs are available in the [openapi repository](https://github.com/localstack/openapi).
17+
- `localstack-sdk-python` is the main project that has `localstack-sdk-generated` as the main dependency.
1618

1719
Developers are not supposed to modify at all `localstack-sdk-generated`.
18-
The code needs to be every time re-generated from specs using the `generate.sh` script in the `bin` folder.
20+
The code needs to be re-generated from specs every time using the `generate.sh` script in the `bin` folder.
1921

2022
This project uses [uv](https://github.com/astral-sh/uv) as package/project manager.
2123

scripts/create_spec.py

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

0 commit comments

Comments
 (0)