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

Added method to GoogleBigQuery to copy between projects #1111

Open
wants to merge 32 commits into
base: main
Choose a base branch
from

Conversation

Charlie-Kramer
Copy link
Contributor

No description provided.

Copy link
Collaborator

@shaunagm shaunagm left a comment

Choose a reason for hiding this comment

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

Changes requested - happy to chat more about any of my review if you'd like. Also, ideally there would be a new test for this new method.

parsons/google/google_bigquery.py Show resolved Hide resolved
parsons/google/google_bigquery.py Outdated Show resolved Hide resolved
parsons/google/google_bigquery.py Outdated Show resolved Hide resolved
parsons/google/google_bigquery.py Outdated Show resolved Hide resolved
@Charlie-Kramer Charlie-Kramer force-pushed the main branch 2 times, most recently from 04d624c to ef0b416 Compare December 9, 2024 19:51
@shaunagm
Copy link
Collaborator

shaunagm commented Dec 12, 2024

@Charlie-Kramer you seem to have accidentally added a bin folder with a bunch of files within - can you update the PR to remove them? Also that pyvenv.cfg top level file. Let me know if you need help

@shaunagm
Copy link
Collaborator

@Charlie-Kramer overall this looks good, only two issues. First the extra files that got included in this PR that will need to be removed, and second it would be good to have a test for this new method. In particular, a test that tests the logic around missing datasets/tables/etc would be good.

Copy link
Collaborator

@shaunagm shaunagm left a comment

Choose a reason for hiding this comment

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

Just updating the review status to reflect that you're working on making changes (let me know if you need help with anything, always happy to pair!)

parsons/google/google_bigquery.py Outdated Show resolved Hide resolved
parsons/google/google_bigquery.py Outdated Show resolved Hide resolved
parsons/google/google_bigquery.py Show resolved Hide resolved
@Charlie-Kramer
Copy link
Contributor Author

Hey thanks! I added the tests and cleaned up the formatting problems so I think it's ready for review. (Sorry prob should have put that in the message)

@shaunagm
Copy link
Collaborator

I think the issue is that the files were added before you put them in the .gitignore, so they're still there in the PR - they have to be manually removed. Adding them to the gitignore prevents this from happening in the future but does not fix the currently added files.

@Charlie-Kramer
Copy link
Contributor Author

I think the issue is that the files were added before you put them in the .gitignore, so they're still there in the PR - they have to be manually removed. Adding them to the gitignore prevents this from happening in the future but does not fix the currently added files.

ah, I removed a bunch of them using git rm but there are others I missed. I did git rm bin -r, I hope this does the trick?

@shaunagm
Copy link
Collaborator

When you did git rm, did you commit the changes? I don't see any new commits from you.

@shaunagm
Copy link
Collaborator

Looks like it worked!

pyvenv.cfg Outdated
@@ -0,0 +1,3 @@
home = /Users/charleskramer/opt/anaconda3/bin
Copy link
Collaborator

Choose a reason for hiding this comment

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

looks like you missed one last file that should be gitignored/removed

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ah let me get that one now. fixed the f string thing too.

@@ -0,0 +1,116 @@
# testing bigquery copy method of google class
Copy link
Collaborator

@shaunagm shaunagm Dec 23, 2024

Choose a reason for hiding this comment

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

So I see why you put this in test_google but bigquery code is actually tested under test_databases. It's an unfortunate bit of organization since the bigquery code is not in the databases folder (I'm not entirely sure it makes sense to have a databases folder at all, but that's a decision that predates me).

Anyway, can you move this to the existing test file here? I'm not sure if there's anything in the existing test file you'd want to reuse to make your tests easier to read but otherwise these tests look fine.

Apologies again for the confusing organization.

@Charlie-Kramer
Copy link
Contributor Author

Charlie-Kramer commented Dec 23, 2024 via email

@shaunagm
Copy link
Collaborator

You're doing great! It's Parsons that's messy :)

Can you move the bigquery copy test into the test_bigquery.py file? You can keep it as a separate test class although you'll need to rename your class so you don't overwrite the existing class (both are named TestGoogleBigQuery. TestGoogleBigQueryProjectCopy or similar would be perfectly fine

@Charlie-Kramer
Copy link
Contributor Author

Charlie-Kramer commented Dec 23, 2024 via email

@shaunagm
Copy link
Collaborator

shaunagm commented Dec 23, 2024 via email

@Charlie-Kramer
Copy link
Contributor Author

can we do a pair programming at some point? I reformatted using ruff locally but now it fails the ruff checks on github. I tried going back to a previous commit but that didn't work.

@shaunagm
Copy link
Collaborator

shaunagm commented Dec 23, 2024 via email

@Charlie-Kramer
Copy link
Contributor Author

Charlie-Kramer commented Dec 29, 2024 via email

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.

2 participants