Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Read Directly From Cloud Functionality #104

Closed

Conversation

ctuguinay
Copy link
Collaborator

Read Directly From Cloud Functionality (On Hold)

This PR addresses #69:

  • Functionality to read from .evl and .evr files from the cloud.
  • No tests yet and no information regarding any S3 buckets and such.

Note:
Currently on hold. Will wait for Wu-Jung and Valentina to come back to continue work on this.

* add to utils init
* refactor in io.py lines.py regions2d.py
* rename check_files to check_file_extension_existence and do necessary refactoring in other files
* remove part where we check for list: we are checking for only that of .evr and .evl and nothing else (this was initially added here because I was checking for both .zarr and .nc files in the same object, but that has now been removed)
* change to just check for file: no longer checking for directory, file must be of single evl or evr
* used re instead of ends with for file extension checking
* added description for check_file_extension_existence
* functionality to read from evl and evr files from the cloud
* no tests yet and no information regarding any S3 buckets and such
* will put this on hold and come back to it another time
@codecov
Copy link

codecov bot commented Jun 27, 2023

Codecov Report

Merging #104 (7d922cb) into main (3a3251b) will decrease coverage by 4.05%.
The diff coverage is 39.34%.

@@            Coverage Diff             @@
##             main     #104      +/-   ##
==========================================
- Coverage   75.28%   71.24%   -4.05%     
==========================================
  Files          13       13              
  Lines         433      466      +33     
==========================================
+ Hits          326      332       +6     
- Misses        107      134      +27     
Impacted Files Coverage Δ
echoregions/core.py 26.08% <15.00%> (-73.92%) ⬇️
echoregions/utils/io.py 52.50% <62.50%> (+7.81%) ⬆️
echoregions/__init__.py 100.00% <100.00%> (ø)
echoregions/lines/lines.py 87.95% <100.00%> (ø)
echoregions/lines/lines_parser.py 100.00% <100.00%> (ø)
echoregions/regions2d/regions2d.py 73.29% <100.00%> (ø)
echoregions/regions2d/regions2d_parser.py 95.65% <100.00%> (ø)
echoregions/utils/__init__.py 100.00% <100.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@ctuguinay ctuguinay linked an issue Jun 27, 2023 that may be closed by this pull request
Copy link
Member

@leewujung leewujung left a comment

Choose a reason for hiding this comment

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

I think that rather than having separate functions for reading cloud files, we can have optional input argument storage_options to the existing read_evl and read_evr functions (see this example from echopype) for the credentials, and have the input path accepting both local and cloud paths.

In terms of testing, in echopype we actually test with a docker-minio server that simulates s3 functions, so that we do not rely on external sources for testing. I think we can delay the CI testing to later and just make sure the functionalities work when we use it, and circle back when we have more time to add that testing infrastructure back in.

@leewujung
Copy link
Member

Also I think we can push this to be something added at v0.1.1 (ie. not at the first release).

@ctuguinay
Copy link
Collaborator Author

@leewujung Oh I just took a look at the echopype implementation and it does look a lot cleaner. After I put some last touches on a draft PR for testing, I'll be waiting for Valentina to review my 2d 3d mask PR again and within transect mask PR before I can start anything else. I could probably start working on this in the meantime. I don't think it's too much to implement, if I don't implement the docker test.

@leewujung
Copy link
Member

Sounds good!

@ctuguinay ctuguinay closed this Dec 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Read directly from cloud.
2 participants