Skip to content

Commit

Permalink
Removed more debugging print calls
Browse files Browse the repository at this point in the history
  • Loading branch information
TheChymera committed Nov 28, 2022
1 parent 18397b8 commit 4dc307c
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 18 deletions.
3 changes: 1 addition & 2 deletions dandi/cli/cmd_ls.py
Original file line number Diff line number Diff line change
Expand Up @@ -340,8 +340,7 @@ def get_metadata_ls(
def fn():
rec = {}
# No need for calling get_metadata if no keys are needed from it
print(path)
print("QQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQ")
print("Debugging ls for the following path: ", path)
if keys is None or list(keys) != ["nwb_version"]:
try:
if schema is not None:
Expand Down
9 changes: 0 additions & 9 deletions dandi/files/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,6 @@ def find_dandi_files(
# BIDS dataset_description.json file at the path (if a directory) or in a
# parent path
path_queue: deque[tuple[Path, Optional[BIDSDatasetDescriptionAsset]]] = deque()
print("=^.^=")
print(paths)
print("=^_^=")
for p in map(Path, paths):
if dandiset_path is not None:
try:
Expand All @@ -109,13 +106,8 @@ def find_dandi_files(
"Path {str(p)!r} is not inside Dandiset path {str(dandiset_path)!r}"
)
path_queue.append((p, None))
print(path_queue)
while path_queue:
p, bidsdd = path_queue.popleft()
print(p)
print("hhhhhhhhhhhh")
print(bidsdd)
print("lölölölölö")
if p.name.startswith("."):
continue
if p.is_dir():
Expand Down Expand Up @@ -194,7 +186,6 @@ def dandi_file(
factory = DandiFileFactory()
else:
factory = BIDSFileFactory(bids_dataset_description)
print("hhhhhhhhhhhh")
return factory(filepath, path)


Expand Down
6 changes: 6 additions & 0 deletions dandi/files/bids.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,9 @@ def get_asset_metadata(self, asset: BIDSAsset) -> dict[str, Any]:
""":meta private:"""
self._validate()
assert self._asset_metadata is not None
print("qqqqqqqqqqqqqqqqqqqqqq get_asset_metadata")
print(self._asset_metadata)
print(self._asset_metadata[asset.bids_path])
return self._asset_metadata[asset.bids_path]

def get_validation_errors(
Expand Down Expand Up @@ -186,6 +189,9 @@ def get_metadata(
start_time = end_time = datetime.now().astimezone()
add_common_metadata(metadata, self.filepath, start_time, end_time, digest)
metadata["path"] = self.path
print("fffffffffffffffffffffffff get_metadata")
print(metadata)
print(**metadata)
return BareAsset(**metadata)


Expand Down
7 changes: 0 additions & 7 deletions dandi/metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ def get_metadata(path: Union[str, Path]) -> Optional[dict]:
path = os.path.abspath(str(path)) # for Path
meta = dict()

print("00000000000000000")
if op.isdir(path):
try:
dandiset = Dandiset(path)
Expand All @@ -91,13 +90,7 @@ def get_metadata(path: Union[str, Path]) -> Optional[dict]:
)

# First read out possibly available versions of specifications for NWB(:N)
print("1111111111")
print(meta)
print("2222222222")
meta["nwb_version"] = get_nwb_version(path)
print("3333333333")
print(meta)
print("4444444444")

# PyNWB might fail to load because of missing extensions.
# There is a new initiative of establishing registry of such extensions.
Expand Down

0 comments on commit 4dc307c

Please sign in to comment.