⚠ This page is served via a proxy. Original site: https://github.com
This service does not collect credentials or authentication data.
Skip to content

Conversation

@amarjandu
Copy link
Contributor

No description provided.

@amarjandu amarjandu force-pushed the issues/amar/1594-subdirs branch 5 times, most recently from d2c72a5 to e9fe6a3 Compare May 8, 2020 21:57
@amarjandu amarjandu force-pushed the issues/amar/1594-subdirs branch from e9fe6a3 to fd8ca84 Compare May 8, 2020 22:23
@codecov-io
Copy link

Codecov Report

Merging #523 into master will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #523   +/-   ##
=======================================
  Coverage   85.63%   85.63%           
=======================================
  Files          40       40           
  Lines        1893     1893           
=======================================
  Hits         1621     1621           
  Misses        272      272           
Impacted Files Coverage Δ
hca/dss/__init__.py 90.35% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 82a8cec...fd8ca84. Read the comment docs.

Copy link
Contributor

@jessebrennan jessebrennan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for adding the test as well!

@jessebrennan jessebrennan removed their assignment May 9, 2020
@theathorn theathorn added the orange Done by the Azul, Data Browser and Portal team label Jun 30, 2020
for entry in os.scandir(path=path):
if entry.is_file():
files.append(entry.name)
if entry.is_dir():
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if entry.is_dir():
elif entry.is_dir():

and else: assert False at the end.

if entry.is_file():
files.append(entry.name)
if entry.is_dir():
nested_files = get_uploaded_file_names(entry.path)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is building an excessive number of temporary strings and lists during recursion. Think about how you can make this more efficient. Also check if there isn't built-in functionality for performing a recursive listing of files.


with tempfile.TemporaryDirectory() as dest_dir:
self.client.download(bundle_uuid=bundle_output['bundle_uuid'], replica="aws", download_dir=dest_dir)
nested_downloaded_files = [file.name for file in os.scandir('{}/{}/zarr'.format(dest_dir, bundle_fqid))]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you really have to list all files to assert that two of them were downloaded? What about os.path.isfile?

@hannes-ucsc hannes-ucsc removed their assignment Jul 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

orange Done by the Azul, Data Browser and Portal team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants