Skip to content

Commit

Permalink
fix: updates list datasets to display push flag
Browse files Browse the repository at this point in the history
ntlhui committed Oct 9, 2024

Verified

This commit was signed with the committer’s verified signature.
aroralanuk Kunal Arora
1 parent 1d534c5 commit 14d867c
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions e4e_data_management/cli.py
Original file line number Diff line number Diff line change
@@ -168,12 +168,12 @@ def list_datasets_cmd(self) -> None:
Args:
args (List[str]): Arguments
"""
datasets = self.app.list_datasets()
if len(datasets) == 0:
print('No datasets found')
else:
for dataset in datasets:
print(dataset)
for dataset_name, dataset in self.app.datasets.items():
if dataset.pushed:
pushed_str = '*'
else:
pushed_str = ' '
print(f'{dataset_name} {pushed_str}')

def add_files_cmd(self,
paths: List[str],
@@ -221,7 +221,9 @@ def status_cmd(self):
Args:
app (DataManager): DataManager app
"""
print(self.app.status())
status_message = self.app.status()
for line in status_message.splitlines():
print(line)

def ls_dir(self, path: Path):
"""Lists the files in the given directory with information relevant to e4edm

0 comments on commit 14d867c

Please sign in to comment.