iesahin / xvc

A robust (🐢) and fast (🐇) MLOps tool for managing data and pipelines in Rust (🦀)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add filtering options to `xvc file remove`

iesahin opened this issue · comments

This was considered in #113, but I decided to leave it out for now. It requires some complicated interaction with
XvcMetadata to get these options to work. I think it's worth adding, but it's not a priority.

    /// Remove all versions of the file carried in earlier than the given timestamp.
    /// Timestamps are specified like 2023-01-01T12:34:56Z in RFC3339 format.
    #[arg(long, conflicts_with = "all_versions")]
    before: Option<String>,

    /// Remove all versions of the file carried in after than the given timestamp.
    /// Timestamps are specified like 2023-01-01T12:34:56Z in RFC3339 format.
    #[arg(long, conflicts_with = "all_versions")]
    after: Option<String>,

    /// Remove all versions of the targets larger than the given size.
    /// Size can be specified like 1 KiB, 1 TB or 1.5 MB.
    /// See https://docs.rs/parse-size/latest/parse_size/ for more details.
    #[arg(long, conflicts_with = "all_versions")]
    larger_than: Option<String>,

    /// Remove all versions of the targets smaller than the given size.
    /// Size can be specified like 1 KiB, 1 TB or 1.5 MB.
    /// See https://docs.rs/parse-size/latest/parse_size/ for more details.
    #[arg(long, conflicts_with = "all_versions")]
    smaller_than: Option<String>,