@@ -25,47 +25,25 @@ PULSAR_URL
2525```
2626## Getting started
2727
28+ ### Prerequisites
29+
30+ Install the ` uv ` package manager by following the [ official documentation] ( https://docs.astral.sh/uv/getting-started/installation/ ) .
31+
2832### Install via makefile
2933
3034``` commandline
3135make setup
3236```
3337
34- This will create a virtual environment called ` venv ` , build ` requirements.txt ` and
35- ` requirements-dev.txt ` from ` pyproject.toml ` if they're out of date, install the Python
38+ This will create a Python virtual environment, install the Python
3639and Node dependencies and install ` pre-commit ` .
3740
38- It's safe and fast to run ` make setup ` repeatedly as it will only update these things if
39- they have changed.
41+ It's safe and fast to run ` make setup ` repeatedly.
4042
4143After ` make setup ` you can run ` pre-commit ` to run pre-commit checks on staged changes and
4244` pre-commit run --all-files ` to run them on all files. This replicates the linter checks that
4345run from GitHub actions.
4446
45-
46- ### Alternative installation
47-
48- You will need Python 3.11. On Debian you may need:
49- * ` sudo add-apt-repository -y 'deb http://ppa.launchpad.net/deadsnakes/ppa/ubuntu focal main' ` (or ` jammy ` in place of ` focal ` for later Debian)
50- * ` sudo apt update `
51- * ` sudo apt install python3.11 python3.11-venv `
52-
53- and on Ubuntu you may need
54- * ` sudo add-apt-repository -y 'ppa:deadsnakes/ppa' `
55- * ` sudo apt update `
56- * ` sudo apt install python3.11 python3.11-venv `
57-
58- To prepare running it:
59-
60- * ` virtualenv venv -p python3.11 `
61- * ` . venv/bin/activate `
62- * ` rehash `
63- * ` python -m ensurepip -U `
64- * ` pip3 install -r requirements.txt `
65- * ` pip3 install -r requirements-dev.txt `
66-
67- You should also configure your IDE to use black so that code is automatically reformatted on save.
68-
6947## Building and testing
7048
7149This component uses ` pytest ` tests and the ` ruff ` and ` black ` linters. ` black ` will reformat your code in an opinionated way.
@@ -80,19 +58,6 @@ A number of `make` targets are defined:
8058* ` make dockerpush ` : push a ` latest ` Docker image (again, you can add ` VERSION=1.2.3 ` ) - normally this should be done
8159 only via the build system and its GitHub actions.
8260
83- ## Managing requirements
84-
85- Requirements are specified in ` pyproject.toml ` , with development requirements listed separately. Specify version
86- constraints as necessary but not specific versions. After changing them:
87-
88- * Run ` pip-compile ` (or ` pip-compile -U ` to upgrade requirements within constraints) to regenerate ` requirements.txt `
89- * Run ` pip-compile --extra dev -o requirements-dev.txt ` (again, add ` -U ` to upgrade) to regenerate
90- ` requirements-dev.txt ` .
91- * Run the ` pip3 install -r requirements.txt ` and ` pip3 install -r requirements-dev.txt ` commands again and test.
92- * Commit these files.
93-
94- If you see the error
95-
9661``` commandline
9762Backend subprocess exited when trying to invoke get_requires_for_build_wheel
9863Failed to parse /.../template-python/pyproject.toml
0 commit comments