-
Notifications
You must be signed in to change notification settings - Fork 268
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upgrade tooling on the project. #1329
base: master
Are you sure you want to change the base?
Conversation
- Replace black by ruff, as it's quicker ; - Use `uv` wherever possible as a replacement for pip, as it's way faster to run, add an `uv.lock` file which will be synced before the releases and published here ; - Remove tox, it's too complex for this project and can easily be replaced by `uv` ; - Apply `ruff` formatting ; - Update the makefile accordingly ; - Update the CI accordingly
Tests are failing with python 3.10 + sqlite, but I cannot reproduce locally with the following command: TESTING_SQLALCHEMY_DATABASE_URI="sqlite:///budget.db"; uv run --python 3.10 --extra dev --extra database pytest . Edit: It's fixed after a re-run. |
Curious about your feelings on this @zorun ? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm still alive, and sometimes, I even have time to review!
Co-authored-by: Glandos <[email protected]>
Co-authored-by: Glandos <[email protected]>
Keep in mind that I tend to be conservative for this kind of reviews ;) I once inherited a project using poetry and I really didn't like it. Here are general questions:
|
No problem, thanks for the questions. I believe part of the motivation behind this change is personal: putting back this project as a way to experiment with "new shiny tools". It gives me energy, and as such I believe it will be net-beneficial for the project in the end. More fun means it will get easier to maintain (at least for me, but you can have a different opinion). With that out of the way, let's discuss the points you bring here 👍
I believe the main pro is speedup. I personally also like to be able to install different versions of python in a simple way with
I don't believe we have performance issues with the current tooling, no.
My feeling is that
No, not really. It can affect how we release, because the tools we use would be installed by
Yes.
When using pip, the dependencies are not compiled by the
I don't think there is a need for it :-)
It's mainly a DX change.
I believe it's actually the other way around, as it makes things simpler and faster. |
Thanks, I wanted to hear your motivation. If it motivates you, that's good, but let's not break things for free. Actually, thinking about it, I think my motivation comes from repairing broken things, so maybe we make the perfect combo :D
This is a good argument.
Let me be more clear, because this is a general grip I also had with poetry. Lockfiles are very good when working between developers: we are sure we have the exact same version of dependencies. However, users will have different dependencies because they don't use the lockfiles, they use pip. If we run tests with the dependencies from the lockfile, we don't test what the actual users will install, and this is quite bad. We could run tests using the dependencies from pyproject.toml instead of the lockfile, but then, what would be the point of the lockfile? In that case, let's just use pyproject.toml also for development. What do you think? Did I miss something obvious? |
🙌 🤭
Oh, that's nice, and I understand better now the reason why we have the "minimal" set of dependencies in our tests. I actually think this is a good idea. I see the For instance, for the Docker image, we could ensure that it ships with exactly the versions that were present at the time of the build, and I believe that would be a good thing. Not a requirement, but something useful for some people. But, to be honest, these |
Also: thanks for the tone of the discussion, I told you already but it's been a pleasure to disagree with you, and find out how we can better understand each other and come to the same conclusion. (This is probably because we're not trying to push our decisions onto each other, but really care about what we think, and why) |
It's also my point-of-view. Since I knew nothing about
I remember taking part in this, and this was a really good move, because it also tests installation in every cases. I also found myself in situation where I needed to install something (hello Ansible) at not the very last version, and was happy it worked :) |
uv
wherever possible as a replacement for pip, as it's way faster to run, add anuv.lock
file which will be synced before the releases and published here ;uv
;ruff
formatting ;I'm not sure why, but
pytest-libfaketime
is currently not working when running insideuv
, at least on an apple silicon machine. I uninstalled it otherwise the test couldn't run, failing with the following error: