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

Publish: Support --index <name> #9694

Merged
merged 5 commits into from
Dec 10, 2024
Merged

Publish: Support --index <name> #9694

merged 5 commits into from
Dec 10, 2024

Conversation

konstin
Copy link
Member

@konstin konstin commented Dec 6, 2024

When publishing, we currently ask the user to set --publish-url to the upload URL and --check-url to the simple index URL, or the equivalent configuration keys. But that's redundant with the [[tool.uv.index]] declaration. Instead, we extend [[tool.uv.index]] with a publish-url entry and allow passing uv publish --index <name>.

uv publish --index <name> requires the pyproject.toml to be present when publishing, unlike using --publish-url ... --check-url ... which can be used e.g. in CI without a checkout step. --index also always uses the check URL feature to aid upload consistency.

The documentation tries to explain both approaches together, which overlap for the check URL feature.

Fixes #8864

When publishing, we currently ask the user to set `--publish-url` to the upload URl and `--check-url` to the simple index URL, or the equivalent configuration keys. But that's redundant with the `[[tool.uv.index]]` declaration. Instead, we extend `[[tool.uv.index]]` with a `publish-url` entry and allow passing `uv publish --index <name>`.

`uv publish --index <name>` requires the `pyproject.toml` to be present when publishing, unlike using `--publish-url ... --check-url ...` which can be used e.g. in CI without a checkout step. `--index` also always uses the check URL feature to aid upload consistency.

The documentation tries to explain both approaches together, which overlap for the check URL feature.

Fixes #8864
@konstin konstin added the enhancement New feature or improvement to existing functionality label Dec 6, 2024
@konstin konstin temporarily deployed to uv-test-publish December 6, 2024 19:29 — with GitHub Actions Inactive
docs/reference/cli.md Outdated Show resolved Hide resolved
Copy link
Member

@zanieb zanieb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense to me!

@konstin konstin merged commit 321101d into main Dec 10, 2024
64 checks passed
@konstin konstin deleted the konsti/upload-index branch December 10, 2024 21:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or improvement to existing functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support index declarations in uv publish
3 participants