Skip to content

Commit

Permalink
Merge pull request #92 from catetrai/nf-tree
Browse files Browse the repository at this point in the history
NF: datalad tree command
  • Loading branch information
mih authored Aug 24, 2022
2 parents 6de1e06 + 8634618 commit 62803bd
Show file tree
Hide file tree
Showing 8 changed files with 2,349 additions and 1 deletion.
11 changes: 11 additions & 0 deletions changelog.d/20220824_085736_michael.hanke_nf_tree.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
### 💫 Enhancements and new features

- New `tree` command for traversing a directory hierarchy.
Like the UNIX equivalent, it can visualize a directory tree.
Additionally, it annotates the output with DataLad-related
information, like the location of dataset, and their nesting
depth. Besides visualization, `tree` also reports structured
data in the form of result records that enable other applications
to use `tree` for gathering data from the file system.
Fixes https://github.com/datalad/datalad-next/issues/78 via
https://github.com/datalad/datalad-next/pull/92 (by @catetrai)
8 changes: 8 additions & 0 deletions datalad_next/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,14 @@
# not pick it up, due to the dashes in the name
'create-sibling-webdav',
),
(
# importable module that contains the command implementation
'datalad_next.tree',
# name of the command class implementation in above module
'TreeCommand',
# command name (differs from lowercase command class name)
'tree'
)
]
)

Expand Down
2 changes: 1 addition & 1 deletion datalad_next/conftest.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
from datalad.conftest import setup_package
from datalad.conftest import setup_package
1 change: 1 addition & 0 deletions datalad_next/tests/test_register.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
def test_register():
import datalad.api as da
assert hasattr(da, 'credentials')
assert hasattr(da, 'tree')
Loading

0 comments on commit 62803bd

Please sign in to comment.