Skip to content
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

add tests for versions with local segments #2022

Closed
wants to merge 3 commits into from
Closed

Conversation

BurntSushi
Copy link
Member

While trying to fix #1855, I came up with a few tests that improve
our coverage of versions with local segments. Those tests were added
to packse here: astral-sh/packse#132

None of these tests pass yet, so they are marked as ignored.

@zanieb
Copy link
Member

zanieb commented Feb 28, 2024

Note we should merge in packse first so they publish to PyPI and are discovered by tests

BurntSushi added a commit to astral-sh/packse that referenced this pull request Feb 28, 2024
This improves our coverage for installing packages involving versions
with local segments.

~~This PR also adds a new optional `expected.ignore` property. When it's
true, it's expected that the scenario will be ignored in downstream
tools. For example, if the scenario doesn't pass yet even though it is
expected or desired to.~~

I've backed out the change to add `expected.ignore` to the schema, and
instead opted to mark tests as skipped on `uv`'s end in
astral-sh/uv#2022.
This makes sense to me since this de-couples the current state of `uv`
from
packse scenarios.
@BurntSushi
Copy link
Member Author

All righty, so I've got the packse repo updated with tests for local versions, but (and I should have anticipated this), publishing to test.pypi.org fails because of the local segments in the version numbers. They aren't allowed to be published. This present an interesting conundrum, because the ban isn't reflective of the reality that other indexes (such as pytorch) do allow local versions to be published.

I'm not quite sure how to fix this, and I also don't know the implications of merging this PR when publishing to test.pypi.org fails.

The packse workflow has been simplified somewhat. Particularly
now that building dumps scenarios into the same directory that
the index serves. So there's no need for a separate publish step.
These tests aren't passing yet, but we hope that at least some of them
will one day.
This includes the new tests that stress versions with local
segments.

These tests were added to packse here:
astral-sh/packse#132
@zanieb
Copy link
Member

zanieb commented Feb 28, 2024

@BurntSushi I can definitely look into this when I'm back, I'm interested in getting us using a local PyPI mirror for tests which would allow us to do things like this.

In the meantime.. if you merge with broken PyPI uploads we'll spam PyPI retrying the upload every few hours. You could exclude these scenarios from the PyPI uploads somehow then rely on our public CodeArtifact proxy to test the scenarios in CI. I'm not sure if it's worth the effort though.

zanieb added a commit that referenced this pull request Mar 7, 2024
- Now that `packse` is being published to PyPI we can install it from
there.
- Tweaks the tooling around scenario updates to manage a temporary
virtual environment for you.
- Makes use of a new index URL
- Includes local version segment scenarios (supersedes
#2022)
@charliermarsh
Copy link
Member

Should this be closed?

@zanieb
Copy link
Member

zanieb commented Mar 13, 2024

Yep!

@zanieb zanieb closed this Mar 13, 2024
@charliermarsh
Copy link
Member

Sweet. (For posterity, these got merged into main separately.)

@zanieb
Copy link
Member

zanieb commented Mar 13, 2024

Done in #2256

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Local version identifiers are not ignored when testing version equality
3 participants