mmmmxa opened a new issue, #3750:
URL: https://github.com/apache/iggy/issues/3750

   ### Description
   
   The current documentation and testing configurations in Python SDK have a 
number of problems:
   
   - README file doesn't offer a reliable and easy to follow guide for 
development workflow. We are presented with a list of commands that get some of 
the jobs done, some of them with side effects. More on that in next items.
   - Using `uv run` without `--no-sync` is performing implicit syncing that 
overwrites the installation made by `maturin develop`, reverting the newest 
changes that were just introduced by installing the package via `maturin 
develop`. 
   - Command to generate stubs is not documented.
   - Formatting commands required for the hooks to let your commits and pushes 
through specifically for Python code are not documented. 
   - Docker compose and the Dockerfile seem to not have been updated in a 
while. Iggy server build is failing without seccomp:unconfined option, the 
overall compose command is failing due to problems with connectivity between 
containers, how this connectivity is established or checked (I'm still in the 
process of figuring all the root issues out here).
   - Dockerfile can be improved by adding caching and other changes.
   - Any other fixes for the development features that Python SDK is providing 
but which actually don't work out of the box.
   
   In general, this set of changes is intended to make sure that a developer 
can follow the instructions which cover all necessary steps and all of which 
work as intended and serve a clear purpose.
   
   ### Affected area / component
   
   Python SDK
   
   ### Proposed solution
   
   - Provide a development workflow in README, covering all steps of developing 
every feature and providing commands that are most reliable and easiest to use.
   - Replacing `uv run` commands with `source .venv/bin/activate` and then 
doing all commands without using `uv` to reduce the probability of unintended 
errors during development and simplify the mental load of commands that have to 
be followed.
   - Document the command to generate stubs.
   - Provide `ruff` formatting commands that are required by hooks.
   - Update docker-compose to make sure it can run tests without additional 
setups.
   - Improve test Dockerfile by switching to Rust-based image, installing uv 
and a specific python version. This will pin specific versions as arguments and 
will allow to perform checks for different python or rust versions if needed. 
Add caching for uv and `--locked` option for the `uv sync` so that specifically 
the container build could trigger a developer to intentionally update the lock 
file. (The latter is subject to change in the process of developing the 
workflow).
   - Any other fixes for the development features that Python SDK is providing 
but which actually don't work out of the box and / or for the documentation.
   
   I have already implemented almost all of these locally and the list may grow 
further as I discover the algorithm that gets a developer through the whole 
development process without issues.
   
   ### Alternatives considered
   
   _No response_
   
   ### Contribution
   
   - [x] I'm willing to submit a pull request to implement this feature
   
   ### Good first issue
   
   - [ ] I think this could be a good first issue for a new contributor


-- 
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