Developer tooling consensus #149
Replies: 9 comments 1 reply
-
|
@dolfandringa @philipptrenz @jorritn @wcoenraads @victorgarcia98 @Flix6x Pinging you all for this discussion. Please ping anyone else relevant and feel free to chime in on the discussion. |
Beta Was this translation helpful? Give feedback.
-
|
I personally like For the other tools (linting, typechecking) I defer to the people who develop in Python more than me. |
Beta Was this translation helpful? Give feedback.
-
|
I would either use uv or poetry, as they are both swiss army knives that solve the same problems. I haven't used uv but it seems to be popular so I'd like to try it out. For linting and related stuff I'd choose to use ruff. It replaces isort, black, pylint and flake8 into a single tool that does all of it. It is also much faster as it is written in rust and integrates well with IDE's for auto-formatting and such. It is also highly customizable but comes with sane defaults, so you can just slowly add changes as/when they are needed. |
Beta Was this translation helpful? Give feedback.
-
I disagree here. There is a difference between what people choose to use for type hinting and code completion in their IDE, versus what is used as the source of truth. Using mypy and pyright both potentially leads to conflicts between them, and it requires setting up rules and exceptions twice. I prefer pyright over mypy because its faster and doesn't require the plugin system from mypy that automagically defines types for untyped code with black magic plugins. But it does sometimes cause other issues where mypy's plugins allow you to deal with badly typed code magically, where pyright might not do it as well because it relies more on how it "should" work. But this is becoming less of an issue as time evolves and type hinting and standardization is becoming more common practice and the python standards become mature. |
Beta Was this translation helpful? Give feedback.
-
I would stick to the newer python standards and use tools native to it. I know poetry does, and assume so does uv. Use PEP440 versioning, together with pyproject.toml to specify them (https://peps.python.org/pep-0621/ and https://peps.python.org/pep-0725/).
Also, I see there is a version.py in the s2python repos. If we specify the version in pyproject.toml (long live pep standards) we could read the version number there with: to remain backwards compatible. |
Beta Was this translation helpful? Give feedback.
-
I don't know of any alternative that is used commonly anymore. |
Beta Was this translation helpful? Give feedback.
-
|
For us, s2-python ends up in our Venus OS, which gets built through OpenEmbedded (OE). Regarding everything else, we don't have any clear preference. |
Beta Was this translation helpful? Give feedback.
-
|
The argument of @philipptrenz is important to me. So let's not move collectively to uv and becoming incompatible with pip-tools. Furthermore, IMHO it is more a matter of personal preference of developers which tools to use for dependency management as long as there is a standerd way in which the dependencies are locked, and that's a problem with Python as all tools that manage dependencies have their own lock files... but the generated dev-requirements.txt will do. And how to create python environments are also a matter of personal preference from my point of view. Although I personally prefer uv because of it's speed, I think we should stick with pip-tools for a while because of compatibility. And with the generated dev-requirements.txt every one can still manage its own environment. Linting, formatting, sorting etc. is another story of course, that should done the same way by everyone. There seems to be consensus on Ruff and that's fine with me too. I don't have a preference for typechecking but agree with Dolf that if pyright and mypy are not compatible in all cases, we'd better just chose one. |
Beta Was this translation helpful? Give feedback.
-
|
Just to let you know I'm following this discussion, but am not strongly opinionated. @nhoening just pinging you in case you do have an opinion to share, as you made most of these types of choices for our repos. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hea everyone!
I have been seeing some movement on s2 repo's regarding developer tooling and more importantly, divergence. Different ideas floating around and everyone wants to use what they are used to. Personally I set everything up with pip-tools because of its old-school simplicity and single-use instead of 'one-stop-shop' tools like poetry and uv which may require a system install outside of the virtualenv (or some manual manouvering of activating your venv manually).
The main gist that I am seeing is people want to move toward something like poetry and uv which is fine by me. But I want to settle on one set of tooling that is used in all repo's instead of having each repo work slightly different.
So lets kick-off with me proposing a list that is going to create discussion and lets settle on something. Be warned that the argument 'but that is what I am used to using' or any variation is not going to hold any weight because we are asking a part of the community to switch nonetheless. Arguments e.g. 'uv is faster than poetry in dependency locking' or 'poetry is a bit older and has more adoption' are perfect arguments.
I reserve the right to make a choice in a stalemate or inactivity due to: 1) I started this discussion and 2) moving away from pip-tools hurts my techy heart but I will survive xD.
So some guidelines from my end:
pytest -k some.really.long.path:hereinstead ofpytestin order to work, that is less preferable.super fast.Hope this helps to get to some kind of consensus and we can all be relatively happy techies and focus on the software.
So without further ado, the list:
Beta Was this translation helpful? Give feedback.
All reactions