-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
3.1.1
- Loading branch information
Showing
41 changed files
with
6,352 additions
and
119 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,9 @@ | |
__pycache__/ | ||
*.py[cod] | ||
|
||
# direnv | ||
*.envrc | ||
|
||
# distribution / packaging | ||
.Python | ||
env/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
3.1.0 | ||
3.1.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# --- import -------------------------------------------------------------------------------------- | ||
|
||
|
||
import WrightTools as wt | ||
import argparse | ||
|
||
|
||
# --- define -------------------------------------------------------------------------------------- | ||
|
||
|
||
def wt_tree(): | ||
parser = argparse.ArgumentParser(description="Print a given data tree.") | ||
|
||
# Add arguments | ||
parser.add_argument("path", type=str) | ||
parser.add_argument("--verbose", "-v", action="store_true", help="Verbose? False by default") | ||
parser.add_argument("--depth", "-d", "-L", type=int, default=9, help="depth to print (int)") | ||
parser.add_argument("internal_path", nargs="?", default="/") | ||
args = parser.parse_args() | ||
|
||
# Create the data/collection object | ||
obj = wt.open(args.path, edit_local=True)[args.internal_path] | ||
|
||
# Print the tree | ||
# If the object is a data object, it doesn't take depth as a parameter | ||
if isinstance(obj, wt.Data): | ||
obj.print_tree(verbose=args.verbose) | ||
else: | ||
obj.print_tree(verbose=args.verbose, depth=args.depth) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,3 +6,4 @@ | |
from ._colors import * | ||
from ._helpers import * | ||
from ._quick import * | ||
from ._interact import * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.