Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
100 changes: 64 additions & 36 deletions crates/uv-cli/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2596,34 +2596,38 @@ pub struct RunArgs {
#[arg(long, overrides_with("all_extras"), hide = true)]
pub no_all_extras: bool,

/// Include development dependencies.
/// Include the development dependency group.
///
/// Development dependencies are defined via `tool.uv.dev-dependencies` in a
/// `pyproject.toml`.
/// Development dependencies are defined via `dependency-groups.dev` or
/// `tool.uv.dev-dependencies` in a `pyproject.toml`.
///
/// This option is an alias for `--group dev`.
///
/// This option is only available when running in a project.
#[arg(long, overrides_with("no_dev"), hide = true)]
pub dev: bool,

/// Omit development dependencies.
/// Omit the development dependency group.
///
/// This option is an alias of `--no-group dev`.
///
/// This option is only available when running in a project.
#[arg(long, overrides_with("dev"))]
pub no_dev: bool,

/// Include dependencies from the specified local dependency group.
/// Include dependencies from the specified dependency group.
///
/// May be provided multiple times.
#[arg(long, conflicts_with("only_group"))]
pub group: Vec<GroupName>,

/// Exclude dependencies from the specified local dependency group.
/// Exclude dependencies from the specified dependency group.
///
/// May be provided multiple times.
#[arg(long)]
pub no_group: Vec<GroupName>,

/// Only include dependencies from the specified local dependency group.
/// Only include dependencies from the specified dependency group.
///
/// May be provided multiple times.
///
Expand All @@ -2637,9 +2641,11 @@ pub struct RunArgs {
#[arg(short, long, conflicts_with = "script")]
pub module: bool,

/// Omit non-development dependencies.
/// Only include the development dependency group.
///
/// The project itself will also be omitted.
/// Omit other dependencies. The project itself will also be omitted.
///
/// This option is an alias for `--only-group dev`.
#[arg(long, conflicts_with("no_dev"))]
pub only_dev: bool,

Expand Down Expand Up @@ -2794,33 +2800,39 @@ pub struct SyncArgs {
#[arg(long, overrides_with("all_extras"), hide = true)]
pub no_all_extras: bool,

/// Include development dependencies.
/// Include the development dependency group.
///
/// This option is an alias for `--group dev`.
#[arg(long, overrides_with("no_dev"), hide = true)]
pub dev: bool,

/// Omit development dependencies.
/// Omit the development dependency group.
///
/// This option is an alias for `--no-group dev`.
#[arg(long, overrides_with("dev"))]
pub no_dev: bool,

/// Omit non-development dependencies.
/// Only include the development dependency group.
///
/// The project itself will also be omitted.
/// Omit other dependencies. The project itself will also be omitted.
///
/// This option is an alias for `--only-group dev`.
#[arg(long, conflicts_with("no_dev"))]
pub only_dev: bool,

/// Include dependencies from the specified local dependency group.
/// Include dependencies from the specified dependency group.
///
/// May be provided multiple times.
#[arg(long, conflicts_with("only_group"))]
pub group: Vec<GroupName>,

/// Exclude dependencies from the specified local dependency group.
/// Exclude dependencies from the specified dependency group.
///
/// May be provided multiple times.
#[arg(long)]
pub no_group: Vec<GroupName>,

/// Only include dependencies from the specified local dependency group.
/// Only include dependencies from the specified dependency group.
///
/// May be provided multiple times.
///
Expand Down Expand Up @@ -2992,7 +3004,9 @@ pub struct AddArgs {
#[arg(long, short, group = "sources", value_parser = parse_file_path)]
pub requirements: Vec<PathBuf>,

/// Add the requirements as development dependencies.
/// Add the requirements to the development dependency group.
///
/// This option is an alias for `--group dev`.
#[arg(long, conflicts_with("optional"), conflicts_with("group"))]
pub dev: bool,

Expand All @@ -3005,7 +3019,7 @@ pub struct AddArgs {
#[arg(long, conflicts_with("dev"), conflicts_with("group"))]
pub optional: Option<ExtraName>,

/// Add the requirements to the specified local dependency group.
/// Add the requirements to the specified dependency group.
///
/// These requirements will not be included in the published metadata for the project.
#[arg(long, conflicts_with("dev"), conflicts_with("optional"))]
Expand Down Expand Up @@ -3114,15 +3128,17 @@ pub struct RemoveArgs {
#[arg(required = true)]
pub packages: Vec<PackageName>,

/// Remove the packages from the development dependencies.
/// Remove the packages from the development dependency group.
///
/// This option is an alias for `--group dev`.
#[arg(long, conflicts_with("optional"), conflicts_with("group"))]
pub dev: bool,

/// Remove the packages from the project's optional dependencies for the specified extra.
#[arg(long, conflicts_with("dev"), conflicts_with("group"))]
pub optional: Option<ExtraName>,

/// Remove the packages from the specified local dependency group.
/// Remove the packages from the specified dependency group.
#[arg(long, conflicts_with("dev"), conflicts_with("optional"))]
pub group: Option<GroupName>,

Expand Down Expand Up @@ -3194,36 +3210,42 @@ pub struct TreeArgs {
#[command(flatten)]
pub tree: DisplayTreeArgs,

/// Include development dependencies.
/// Include the development dependency group.
///
/// Development dependencies are defined via `dependency-groups.dev` or
/// `tool.uv.dev-dependencies` in a `pyproject.toml`.
///
/// Development dependencies are defined via `tool.uv.dev-dependencies` in a
/// `pyproject.toml`.
/// This option is an alias for `--group dev`.
#[arg(long, overrides_with("no_dev"), hide = true)]
pub dev: bool,

/// Omit non-development dependencies.
/// Only include the development dependency group.
///
/// The project itself will also be omitted.
/// Omit other dependencies. The project itself will also be omitted.
///
/// This option is an alias for `--only-group dev`.
#[arg(long, conflicts_with("no_dev"))]
pub only_dev: bool,

/// Omit development dependencies.
/// Omit the development dependency group.
///
/// This option is an alias for `--no-group dev`.
#[arg(long, overrides_with("dev"), conflicts_with = "invert")]
pub no_dev: bool,

/// Include dependencies from the specified local dependency group.
/// Include dependencies from the specified dependency group.
///
/// May be provided multiple times.
#[arg(long, conflicts_with("only_group"))]
pub group: Vec<GroupName>,

/// Exclude dependencies from the specified local dependency group.
/// Exclude dependencies from the specified dependency group.
///
/// May be provided multiple times.
#[arg(long)]
pub no_group: Vec<GroupName>,

/// Only include dependencies from the specified local dependency group.
/// Only include dependencies from the specified dependency group.
///
/// May be provided multiple times.
///
Expand Down Expand Up @@ -3318,33 +3340,39 @@ pub struct ExportArgs {
#[arg(long, overrides_with("all_extras"), hide = true)]
pub no_all_extras: bool,

/// Include development dependencies.
/// Include the development dependency group.
///
/// This option is an alias for `--group dev`.
#[arg(long, overrides_with("no_dev"), hide = true)]
pub dev: bool,

/// Omit development dependencies.
/// Omit the development dependency group.
///
/// This option is an alias for `--no-group dev`.
#[arg(long, overrides_with("dev"))]
pub no_dev: bool,

/// Omit non-development dependencies.
/// Only include the development dependency group.
///
/// The project itself will also be omitted.
/// Omit other dependencies. The project itself will also be omitted.
///
/// This option is an alias for `--only-group dev`.
#[arg(long, conflicts_with("no_dev"))]
pub only_dev: bool,

/// Include dependencies from the specified local dependency group.
/// Include dependencies from the specified dependency group.
///
/// May be provided multiple times.
#[arg(long, conflicts_with("only_group"))]
pub group: Vec<GroupName>,

/// Exclude dependencies from the specified local dependency group.
/// Exclude dependencies from the specified dependency group.
///
/// May be provided multiple times.
#[arg(long)]
pub no_group: Vec<GroupName>,

/// Only include dependencies from the specified local dependency group.
/// Only include dependencies from the specified dependency group.
///
/// May be provided multiple times.
///
Expand Down
11 changes: 9 additions & 2 deletions crates/uv-workspace/src/pyproject.rs
Original file line number Diff line number Diff line change
Expand Up @@ -323,8 +323,15 @@ pub struct ToolUv {
)]
pub default_groups: Option<Vec<GroupName>>,

/// The project's development dependencies. Development dependencies will be installed by
/// default in `uv run` and `uv sync`, but will not appear in the project's published metadata.
/// The project's development dependencies.
///
/// Development dependencies will be installed by default in `uv run` and `uv sync`, but will
/// not appear in the project's published metadata.
///
/// Use of this field is not recommend anymore. Instead, use the `dependency-groups.dev` field
/// which is a standardized way to declare development dependencies. The contents of
/// `tool.uv.dev-dependencies` and `dependency-groups.dev` are combined to determine the the
/// final requirements of the `dev` dependency group.
#[cfg_attr(
feature = "schemars",
schemars(
Expand Down
Loading