Skip to content

Commit 62803bd

Browse files
authored
Merge pull request #92 from catetrai/nf-tree
NF: datalad tree command
2 parents 6de1e06 + 8634618 commit 62803bd

File tree

8 files changed

+2349
-1
lines changed

8 files changed

+2349
-1
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
### 💫 Enhancements and new features
2+
3+
- New `tree` command for traversing a directory hierarchy.
4+
Like the UNIX equivalent, it can visualize a directory tree.
5+
Additionally, it annotates the output with DataLad-related
6+
information, like the location of dataset, and their nesting
7+
depth. Besides visualization, `tree` also reports structured
8+
data in the form of result records that enable other applications
9+
to use `tree` for gathering data from the file system.
10+
Fixes https://github.com/datalad/datalad-next/issues/78 via
11+
https://github.com/datalad/datalad-next/pull/92 (by @catetrai)

datalad_next/__init__.py

+8
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,14 @@
2828
# not pick it up, due to the dashes in the name
2929
'create-sibling-webdav',
3030
),
31+
(
32+
# importable module that contains the command implementation
33+
'datalad_next.tree',
34+
# name of the command class implementation in above module
35+
'TreeCommand',
36+
# command name (differs from lowercase command class name)
37+
'tree'
38+
)
3139
]
3240
)
3341

datalad_next/conftest.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
from datalad.conftest import setup_package
1+
from datalad.conftest import setup_package

datalad_next/tests/test_register.py

+1
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@
22
def test_register():
33
import datalad.api as da
44
assert hasattr(da, 'credentials')
5+
assert hasattr(da, 'tree')

0 commit comments

Comments
 (0)