RETURN-project / makeDataCube

Data management
Apache License 2.0
0 stars 0 forks source link

Export scenesid instead of dllList #21

Closed PabRod closed 4 years ago

PabRod commented 4 years ago

dllList changes depending on what files are present in the drive. scenesid doesn't.

This fixes issue #20

codecov[bot] commented 4 years ago

Codecov Report

Merging #21 into master will not change coverage. The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master      #21   +/-   ##
=======================================
  Coverage   51.12%   51.12%           
=======================================
  Files           6        6           
  Lines         446      446           
=======================================
  Hits          228      228           
  Misses        218      218           

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 34abad1...fdbd07a. Read the comment docs.

PabRod commented 4 years ago

Related comment.

PabRod commented 4 years ago

I patched the Python function, so it now returns both the downloaded (dllList, variable) and the queried (scenes, static) lists, as you suggested in your previous comment.

We still have an environment-dependent output (dllList), which is not a very good practice. In the future, it may be worth thinking of splitting the dllLandsat function into at least a couple (such as get_scenes_ids(...), check_if_downloaded(...), download_scene(...)). I can take care of that later.

For now, @wandadk , just see if this change makes sense to you and, if so, accept the pull request. Thanks!

wandadk commented 4 years ago

Ok, thanks! Yes, I see your point and I agree.

I believe that (in addition to your suggestions) we could also try to avoid to output the dllList. We would need to already compress the downloaded files to a .tar.gz format in the dllLandsat function (currently done in line 31 in this part of the code) and adapt the checkLSlog function (called in line 65) .