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

Missing test coverage for tool.uv behaviours #3943

Closed
6 tasks done
konstin opened this issue May 31, 2024 · 3 comments
Closed
6 tasks done

Missing test coverage for tool.uv behaviours #3943

konstin opened this issue May 31, 2024 · 3 comments
Assignees
Labels
preview Experimental behavior testing Internal testing of behavior

Comments

@konstin
Copy link
Member

konstin commented May 31, 2024

In #3904, we added support for a whole class of new tool.uv behaviors, but no tests for them yet.

  • Tests path dependencies into another workspace than the current. Consider two workspaces one disk, one workspace with packages A, B and another workspace with C, D, and path dependencies (editable or not) A -> B, B -> C, C -> D where A is the current project. We should test that B -> C correct resolves so that c -> D uses the workspace package D. Support workspace to workspace path dependencies #4833
  • Test that we don't read tool.uv information from index packages, url archives or path archives, neither tool.uv.sources nor tool.uv.workspace.
  • Test that all combinations of editable and non-editable dependencies both in and across workspace work. Editable should take precedence over non-editable, e.g. if you require a package both as editable and non-editable, it becomes an editable.
  • Test that tool.uv.sources inheritance from the workspace to the project works.
  • Test that extras work with workspaces, specifically if the extra is part of another workspace package. We should check what cargo is doing here.
  • No error when PEP508 source and tool.uv.sources entry don't match #4603
@charliermarsh
Copy link
Member

We should also test the requires-python behavior for workspaces -- what happens when no project has a requires-python? What happens when a single project has a requires-python? Etc.

@charliermarsh
Copy link
Member

See also: #4298

@konstin konstin changed the title Add missing tests for tool.uv behaviour Missing for tool.uv behaviours Jul 9, 2024
@konstin konstin changed the title Missing for tool.uv behaviours Missing tool.uv behaviours Jul 9, 2024
konstin added a commit that referenced this issue Jul 16, 2024
Add support for path dependencies from a package in one workspace to a
package in another workspace, which it self has workspace dependencies.

Say we have a main workspace with packages `a` and `b`, and a second
workspace with `c` and `d`. We have `a -> b`, `b -> c`, `c -> d`. This
would previously lead to a mangled path for `d`, which is now fixed.

Like distribution paths, we split workspace paths into an absolute
install path and a relative (or absolute, if the user provided an
absolute path) lock path.

Part of #3943
@charliermarsh charliermarsh changed the title Missing tool.uv behaviours Missing test coverage for tool.uv behaviours Jul 30, 2024
@charliermarsh charliermarsh self-assigned this Jul 30, 2024
@charliermarsh charliermarsh added the testing Internal testing of behavior label Jul 30, 2024
charliermarsh added a commit that referenced this issue Aug 12, 2024
charliermarsh added a commit that referenced this issue Aug 12, 2024
## Summary

Ensures that we don't respect `tool.uv.sources` for (eg.) direct URL
requirements, as intended.

Related to #3943.

Closes #6048.
charliermarsh added a commit that referenced this issue Aug 12, 2024
charliermarsh added a commit that referenced this issue Aug 12, 2024
charliermarsh added a commit that referenced this issue Aug 12, 2024
@charliermarsh
Copy link
Member

Did these! They surfaced a few bugs too which is great.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
preview Experimental behavior testing Internal testing of behavior
Projects
No open projects
Status: Done
Development

No branches or pull requests

2 participants