fix: scripts/,docs/: With with virtual environments other than uv#1874
fix: scripts/,docs/: With with virtual environments other than uv#18740cjs wants to merge 1 commit into
uv#1874Conversation
6ae9332 to
ed77f13
Compare
If `uv` is available, the scripts/* programs will still use it directly, but if not it assumes that the developer has set up a virtual environment in her own way and just runs pytest etc. directly. (If $VIRTUAL_ENV is not set, probably a virtual environment has not been set up and a warning will be printed, but things will still work if you have the necessary programs and libraries installed.) The documentation has also been updated to make this clear, and add the `pip` command that does the equivalent install into the current environment of what `uv` sets up. This does not check for $CONDA_DEFAULT_ENV or any other providers of things like virtualenvs that don't set $VIRTUAL_ENV. That's work for another commit, should someone think it's necessary. The `shellcheck` calls in scripts/dev-lint.sh and .github/workflows/shellcheck.yml have been updated to add `-x -P scripts/` arguments in order to include the new sourced script scripts/common.bash in the check. This will not work if the script is called from a CWD other than the root of the repository, but all the scripts have that problem in many other areas anyway. scripts/dev-lint.sh doesn't pass unless you comment out the ruff check and the mypy check; that's becuase thousands of other errors not introduced by this commit exist in the existing code. But if you comment them out, the remainder, including shellcheck, pass successfully.
ed77f13 to
2a180e4
Compare
|
Hi, thanks for the contribution. We are standardising on |
|
@wowi42 Well, I'm sure that the uv folks appreciate you promoting them by turning away developers that don't want to use it, even when it's completely unnecessary and allowing other virtualenvs takes such a minimal amount of code (not one extra line in the script files: just the new |
|
@0cjs We understand the frustration, and we genuinely appreciate the time you put into the PR. The decision to standardize on That said, this choice is not a reflection on the quality of your work. We are sorry this experience has put you off contributing, and we would still welcome contributions in areas that do not touch the toolchain. If you would like to discuss the |
|
You could very well say you simply don't support non-UV workflows without insisting in your code that they cannot be used. If you need the system to print documentation about this, and even require an explicit opt-in to use a non-UV workflow, I can do that pretty easily. (And I'm also willing to help support non-UV workflows, though honestly I don't see the issue with, "If you're not using UV, and you can't work it out yourself, just switch to UV." As opposed to, "If you used something other than UV and it worked, please go away anyway.") I am explicitly trying to do this in a way that you don't have any extra work, but gain the benefit of my work. So if anything can convince you of that, let me know what it is. If not, let me leave you with this: what you really need to do, rather than rail against non-UV users, is start fixing stuff like the 2800-plus errors that your test scripts show that your CI doesn't. And the errors I found while working on this PR that your CI shows that your test scripts don't, wasting the time of everybody who has to go through several loops of "submit PR and wait for CI" rather than just seeing the error right there immediately. I'm willing to help with that (with expertise; build systems have been a big part of my daily work for decades), but if your price is, "I don't like you if you use tools that work but are not my preferred tools" you're not going to get that help. Think on it.
Yeah, but you can't get them if I don't touch the toolchain because I will not run I'm not totally clear on what you mean by "open a discussion," but feel free to put your reply (if you want to bother) wherever you feel is best and I will follow that lead. |
|
I want to address the substance, but first: please watch your tone. We do not know each other, and assumptions about our motives or character do not help this discussion. You are right that we could technically allow non-uv workflows without officially supporting them. The concern on our side is not hostility toward other tools; it is that every allowed path becomes a path people report bugs against, and that maintenance cost lands on us. "Allow but not support" rarely stays unsupported in practice. If we merge code we are not sure you will maintain long-term, we are left supporting it when issues appear. That is why we are keeping the toolchain uniform. That said, your point about test/CI drift is worth looking at. If there really are failures that local scripts and CI disagree on, please open a separate issue with specifics: which commands, which failures, and which CI jobs differ. We will investigate. If you want to continue the toolchain discussion, please use https://github.com/pyinfra-dev/pyinfra/discussions. We are not asking you to use uv personally; we are saying that contributions changing the toolchain need to fit the project's direction. Contributions that fix tests, CI, or bugs are welcome and do not require that. |
If
uvis available, the scripts/* programs will still use it directly, but if not it assumes that the developer has set up a virtual environment in her own way and just runs pytest etc. directly. (If $VIRTUAL_ENV is not set, probably a virtual environment has not been set up and a warning will be printed, but things will still work if you have the necessary programs and libraries installed.)Note that this does not check for $CONDA_DEFAULT_ENV or similar.
The documentation has also been updated to make this clear, and add the
pipcommand that does the equivalent install into the current environment of whatuvsets up.3.xat this time)scripts/dev-test.sh)scripts/dev-lint.sh)- 2872 ruff errors and a mypy, but I believe that none of these are from this commit. Shellcheck passes.
conventional commits format