-
-
Notifications
You must be signed in to change notification settings - Fork 18
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
uv-venv-lock-runner silently ignores skip-install/deps #92
Comments
Yeah, we definitely don't want to support it. As far as warning goes, I don't know. That can get tricky because you can get caught up on inheritance again and warn just because someone specified the deps at the base level. This is the reason why I didn't want to enable this feature just by the presence of the lock file. I'm open to better documentation, but I'm not sure how, but feel free to fill in a pull request. |
I don't care deeply about it, but FWIW, you can support |
Experimenting some more, I think it would be really nice if we could have Currently we have the choice between locked environments and better packaging verification. That seems an unnecessary dichotomy. 🤔 |
I can't say that I agree with you now, but I will give it a thought. If you can provide more detailed explanation of how this feature would be used and why it would be really nice improvement over the other namespace, I'm open to listen to it. |
What do you mean by namespace here, exactly? But let me show you what I do in most of my projects. First, I build the wheels for it: build-package:
name: Build & verify package
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: hynek/build-and-inspect-python-package@v2
id: baipp
outputs:
# Used to define the matrix for tests below. The value is based on
# packaging metadata (trove classifiers).
supported-python-versions: ${{ steps.baipp.outputs.supported_python_classifiers_json_array }} All test jobs depend on this step. And then I use that wheel to run my tests against it: tests:
name: Tests on ${{ matrix.python-version }}
runs-on: ubuntu-latest
needs: build-package
strategy:
fail-fast: false
matrix:
# Created by the build-and-inspect-python-package action above.
python-version: ${{ fromJson(needs.build-package.outputs.supported-python-versions) }}
steps:
- name: Download pre-built packages
uses: actions/download-artifact@v4
with:
name: Packages
path: dist
- run: tar xf dist/*.tar.gz --strip-components=1
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
allow-prereleases: true
- uses: hynek/setup-cached-uv@v2
- name: Remove src to ensure tests run against wheel
run: rm -rf src # <======
- run: >
uvx --with=tox-uv
tox run
--installpkg dist/*.whl # <======
-e py$(echo ${{ matrix.python-version }} | tr -d .) I really just want a stable tests environments that I install my stuff under test into -- that's why I care about Doesn't also tox have the concept of preparing venvs without installing the app/pkg into it? Same concept, no? BTW here's my experiment to follow along: python-attrs/attrs#1349 |
@hynek so if I understand this correctly, what you want is that if the |
Yes! 🎯 |
That way you can still test locally via |
awesome thanks! I don't have time today to look closer, but https://github.com/python-attrs/attrs/actions/runs/10935175699/job/30386034044 looks nice and green! |
Great, now I have to rewrite half of my next video. >.< |
First off, the uv.lock support seems to be mostly working, so great work! I've ran into a few edge cases that either need documentation or fixes.
This is the first one: I know this is kinda nonsense, but if you set
it's automatically inherited and I've got a target
which fails with:
IOW it silently ignores the
skip_install
anddeps
options.If you don't want to support skip_install/deps with
uv-venv-lock-runner
(which is totally fair enough!) there should be more explicit error messages + docs, I think?The text was updated successfully, but these errors were encountered: