ethanlin01x commented on code in PR #3825:
URL: https://github.com/apache/iggy/pull/3825#discussion_r3729932869


##########
foreign/python/README.md:
##########
@@ -38,33 +39,111 @@ pip install apache-iggy
 
 ### Local Development
 
-```bash
-# Start server for testing using docker
-docker compose -f docker-compose.test.yml up --build
-
-# Or use cargo
-cargo run --bin iggy-server -- --with-default-root-credentials --fresh
-
-# Using uv:
-uv sync --all-extras
-uv run maturin develop
-uv run pytest tests/ -v # Run tests (requires iggy-server running)
-
-# Using pip:
-python3 -m venv .venv
-source .venv/bin/activate
-pip install -e ".[all]"
-maturin develop
-pytest tests/ -v # Run tests (requires iggy-server running)
-```
+1. Build a project for development
+
+   With `uv`:
+
+   > Create a venv:
+   >
+   > ```bash
+   > uv venv
+   > ```
+   >
+   > Sync the environment without updating it:
+   >
+   > ```bash
+   > uv sync --frozen --all-extras --no-install-project
+   > ```
+   >
+   > Build the project - this runs cargo build and performs an editable 
install:
+   >
+   > ```bash
+   > uv run maturin develop
+   > ```
+
+   With `pip`:
+
+   > Create a venv:
+   >
+   > ```bash
+   > python3 -m venv .venv
+   > ```
+   >
+   > Activate the venv:
+   >
+   > ```bash
+   > source .venv/bin/activate
+   > ```
+   >
+   > Install the dependencies with `pip`:
+   >
+   > ```bash
+   > pip install -e ".[all]"
+   > ```
+
+2. Run the server to be able to run the tests
+
+   ```bash
+   cargo run --bin iggy-server -- --with-default-root-credentials --fresh
+   ```
+
+3. Run the tests
+
+   `uv`:
+
+   ```bash
+   uv run --no-sync pytest tests/ -v

Review Comment:
   `pytest tests/ -v` needs a docker daemon, and this rewrite removed the only 
mention of docker in the file. `tests/test_tls.py` starts `apache/iggy:edge` 
through testcontainers in a module-scoped fixture 
(`DockerContainer(...).start()` + `wait_for_logs`) and there is no skip guard, 
so without a daemon all 6 tests in that file error at fixture setup rather than 
skipping. this is on the default path, not an opt-in: `--all-extras` on line 55 
pulls `testcontainers` in, and the certs the fixture mounts are already tracked 
under `core/certs/`, so docker is the only missing piece.
   
   worth listing docker under prerequisites, or giving the no-docker variant 
here:
   `uv run --no-sync pytest tests/ -v --ignore=tests/test_tls.py`. same for 
line 101.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to