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

Tbox 73 cloud transfer #92

Merged
merged 70 commits into from
Jul 26, 2022
Merged

Conversation

DIvkov575
Copy link
Contributor

@DIvkov575 DIvkov575 commented Mar 23, 2022

↪️ Pull Request

✔️ PR Todo

@ycharm
Copy link
Contributor

ycharm commented Mar 28, 2022

Hi we had a docs bug that was blocking the tests from passing, can you merge in develop to your PR. It will allow the tests to pass. Thanks!

@DIvkov575
Copy link
Contributor Author

@jun-dao What would you recommend for testing google & AWS uploading/downloading? Thank you.

requirements.txt Outdated Show resolved Hide resolved
@ycharm
Copy link
Contributor

ycharm commented Apr 21, 2022

hi any progress on trying to do testing? Can I help in any way?

@DIvkov575
Copy link
Contributor Author

For now, I'm just looking into the boto3 and botocore libraries. Im not sure whether to try and use moto for mocking because it is not a tamr dependency.

@DIvkov575
Copy link
Contributor Author

@ycharm Im getting an issue with asserting that a temp file is a tarfile. Any recommendations for getting around this?
Is there anything else I should add to the test?

@ycharm
Copy link
Contributor

ycharm commented May 9, 2022

@ycharm Im getting an issue with asserting that a temp file is a tarfile. Any recommendations for getting around this? Is there anything else I should add to the test?
Is this helpful: https://stackoverflow.com/questions/23883947/combining-tempfile-and-tarfile-with-python

@DIvkov575
Copy link
Contributor Author

@ycharm I'm realizing that the test would not work through trying to unit test mock it. The mock does not return anything so asserting is impossible on an empty temp file.

I've still been unable to find any alternative default credentials or mocking for GCP, but have an idea for testing.

testing tarring could be done by adding an optional return to the cloud_upload function (returns file about to be uploaded).
Is this a viable option for testing?

@ycharm
Copy link
Contributor

ycharm commented May 18, 2022

@DIvkov575 I don't see anything in our guidelines that suggests we shouldn't have the optional return. Especially if you need it for testing. @clint-richardson check out the question please.

DIvkov575 and others added 12 commits July 7, 2022 11:53
Co-authored-by: skalish <39866163+skalish@users.noreply.github.com>
Co-authored-by: skalish <39866163+skalish@users.noreply.github.com>
Co-authored-by: skalish <39866163+skalish@users.noreply.github.com>
Co-authored-by: skalish <39866163+skalish@users.noreply.github.com>
Co-authored-by: skalish <39866163+skalish@users.noreply.github.com>
Co-authored-by: skalish <39866163+skalish@users.noreply.github.com>
Co-authored-by: skalish <39866163+skalish@users.noreply.github.com>
Co-authored-by: skalish <39866163+skalish@users.noreply.github.com>
Co-authored-by: skalish <39866163+skalish@users.noreply.github.com>
@DIvkov575
Copy link
Contributor Author

@skalish are there any other changes that I should make?

Copy link
Contributor

@skalish skalish left a comment

Choose a reason for hiding this comment

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

There are a couple of dependency definitions to be taken care of. The testing should also be reworked to be a bit cleaner and more complete. I think those will be the last needed changes. Let me know if I can help at all.

setup.py Show resolved Hide resolved
setup.py Outdated Show resolved Hide resolved
tests/filesystem/test_cloud.py Outdated Show resolved Hide resolved
tests/filesystem/test_cloud.py Outdated Show resolved Hide resolved
tests/filesystem/test_cloud.py Outdated Show resolved Hide resolved
tests/filesystem/test_cloud.py Outdated Show resolved Hide resolved
setup.py Outdated Show resolved Hide resolved
tests/filesystem/test_cloud.py Outdated Show resolved Hide resolved
tests/filesystem/test_cloud.py Outdated Show resolved Hide resolved
DIvkov575 and others added 8 commits July 21, 2022 09:52
Co-authored-by: skalish <39866163+skalish@users.noreply.github.com>
Co-authored-by: skalish <39866163+skalish@users.noreply.github.com>
Co-authored-by: skalish <39866163+skalish@users.noreply.github.com>
Co-authored-by: skalish <39866163+skalish@users.noreply.github.com>
Co-authored-by: skalish <39866163+skalish@users.noreply.github.com>
Co-authored-by: skalish <39866163+skalish@users.noreply.github.com>
Copy link
Contributor

@skalish skalish left a comment

Choose a reason for hiding this comment

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

After you resolve the one accidental import removal, this is good to go. I also asked a question about the need for the google package. If you can follow-up on that it would be nice to confirm whether it is necessary, but that isn't absolutely needed. I'll approve as soon as I can once these last changes are made.

@DIvkov575
Copy link
Contributor Author

After you resolve the one accidental import removal, this is good to go. I also asked a question about the need for the google package. If you can follow-up on that it would be nice to confirm whether it is necessary, but that isn't absolutely needed. I'll approve as soon as I can once these last changes are made.

I think that the google import / install is necessary because inorder to use the google-cloud-storage client you need to import it with from google.cloud import storage and without google installed it wont be able to find where to import from

@skalish
Copy link
Contributor

skalish commented Jul 26, 2022

We shouldn't spend more time digging in on the google package question. It will be very easy to remove if needed in the future. This all looks good to me! Thanks for all of the work you've put it on this.

Let me know if you'd like me to click to merge this in for you when you're ready.

@DIvkov575
Copy link
Contributor Author

@skalish yes, could you merge this. I don't have a merge button.

@skalish skalish merged commit c313952 into Datatamer:develop Jul 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants