astral-sh / packse

Python packaging scenarios
Apache License 2.0
99 stars 10 forks source link

Include scenarios in published package and have a way to point to them? #146

Open notatallshaw opened 6 months ago

notatallshaw commented 6 months ago

I'm thinking about how best to set up tests for the scenarios in this repo in other test suites (namely pip).

At the moment it seems like I would either need to vendor the JSONs or git clone the repo?

zanieb commented 6 months ago

Thanks for the issue!

I've been considering this... I'm trying to figure out if the scenarios belong in this repository / embedded in the package / or elsewhere entirely.

Right now, you can use packse fetch to do a shallow clone of the relevant scenarios. You can see an example of this in uv's setup (which might be helpful in general).

Over in prefix-dev, they just vendor packse in a Git submodule. Ideally we can make it easier than that though.

I'm willing to coordinate on better ways though if you can outline what would be most convenient for you.

notatallshaw commented 6 months ago

Interesting thanks, I'll play around with packse fetch and see how well that works.

I don't have a huge amount of experience setting up test environments, so it's going to take me a bit of time to understand this setup and study pip's test harness and merge the two.

zanieb commented 6 months ago

Does this feel reasonable to you now that it's setup? Or do you think they should be included in the package itself? The reason that they're separate is that they aren't technically tied to a given packse version (unless the specification of scenarios themselves changes).

notatallshaw commented 6 months ago

If you don't mind keep issues open can we leave this open until I have had chance to make a draft PR on pip side and got feedback from the pip maintainers.

It definetly adds extra restrictions on how the pip tests can be constructed. I don't have a lot of experience with test best practises so I'm not going to take a strong opinion on this and rather just take cues from pip maintainers.

However, if you prefer to have a clean issue board, feel free to close this and I will raise this again if there is feedback from this on pip side.