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

Improve CLI documentation for uv run #5841

Merged
merged 1 commit into from
Aug 7, 2024
Merged

Improve CLI documentation for uv run #5841

merged 1 commit into from
Aug 7, 2024

Conversation

zanieb
Copy link
Member

@zanieb zanieb commented Aug 6, 2024

Adds more long-form help to uv run, which renders in uv help run and the CLI reference on the website.

/// `pyproject.toml`.
///
/// This option is only available when running in a project or invoking a
/// script with inline metadata.
Copy link
Member

Choose a reason for hiding this comment

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

I don't think this applies to inline metadata, does it?

Copy link
Member Author

Choose a reason for hiding this comment

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

I'm not sure. You can have a tool.uv section? I guess I'll check

Copy link
Member

Choose a reason for hiding this comment

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

I don't think we would respect that, because we return:

/// PEP 723 metadata as parsed from a `script` comment block.
///
/// See: <https://peps.python.org/pep-0723/>
#[derive(Debug, Serialize, Deserialize)]
#[serde(rename_all = "kebab-case")]
pub struct Pep723Metadata {
    pub dependencies: Vec<pep508_rs::Requirement<VerbatimParsedUrl>>,
    pub requires_python: Option<pep440_rs::VersionSpecifiers>,
}

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah I confirmed we do not, which is debatably wrong. I'm fine with not reading [tool.uv.dev-dependencies] but we do need to respect [tool.uv] settings: #5855

@charliermarsh charliermarsh added the documentation Improvements or additions to documentation label Aug 7, 2024
Base automatically changed from zb/cli-docs to main August 7, 2024 01:50
@zanieb zanieb force-pushed the zb/cli-docs-run branch 2 times, most recently from e9286a2 to 814b79a Compare August 7, 2024 13:09
@zanieb zanieb enabled auto-merge (squash) August 7, 2024 13:24
@zanieb zanieb merged commit 8998149 into main Aug 7, 2024
57 checks passed
@zanieb zanieb deleted the zb/cli-docs-run branch August 7, 2024 13:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants