Skip to content

Commit

Permalink
Added --depth and --short to sdf status for more concise summaries.
Browse files Browse the repository at this point in the history
 - New friendlier, concise status options. First, --depth merges statuses
   by a certain level of directory depth. Second, --short is --depth 2
   plus an even more concise message per directory.
  • Loading branch information
vsbuffalo committed Nov 2, 2024
1 parent a526ac3 commit df75db1
Show file tree
Hide file tree
Showing 6 changed files with 355 additions and 123 deletions.
2 changes: 1 addition & 1 deletion CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ authors:
given-names: "Vince"
orcid: "https://orcid.org/0000-0003-4510-1609"
title: "SciDataFlow: A Tool for Improving the Flow of Data through Science"
version: 0.8.11
version: 0.8.12
doi: http://dx.doi.org/10.1093/bioinformatics/btad754
date-released: 2024-01-05
url: "https://github.com/vsbuffalo/scidataflow/"
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "scidataflow"
version = "0.8.11"
version = "0.8.12"
edition = "2021"
exclude = ["logo.png", "tests/test_data/**"]
license = "MIT"
Expand Down
17 changes: 15 additions & 2 deletions src/lib/project.rs
Original file line number Diff line number Diff line change
Expand Up @@ -309,13 +309,26 @@ impl Project {
self.save()
}

pub async fn status(&mut self, include_remotes: bool, all: bool) -> Result<()> {
pub async fn status(
&mut self,
include_remotes: bool,
all: bool,
short: bool,
depth: Option<usize>,
) -> Result<()> {
// if include_remotes (e.g. --remotes) is set, we need to merge
// in the remotes, so we authenticate first and then get them.
let path_context = &canonicalize(self.path_context())?;
let status_rows = self.data.status(path_context, include_remotes).await?;
//let remotes: Option<_> = include_remotes.then(|| &self.data.remotes);
print_status(status_rows, Some(&self.data.remotes), all);
print_status(
status_rows,
Some(&self.data.remotes),
all,
short,
include_remotes,
depth,
);
Ok(())
}

Expand Down
Loading

0 comments on commit df75db1

Please sign in to comment.