Skip to content

Conversation

@hagope
Copy link
Contributor

@hagope hagope commented Aug 16, 2019

Jira

  • My PR addresses the following Airflow Jira feature request to create a hook for interacting with Google sheets.

Description

  • This PR includes the hook code and test. The hook covers the values portion of the Google Sheets API (get, update, append, clear). This hook will allow for operators, for example SheetToDatabase and DatabaseToSheet etc.

Tests

  • My PR adds the following unit tests : tests/contrib/hooks/test_gcp_sheets_hook.py

Commits

  • My commits all reference Jira issues in their subject lines, and I have squashed multiple commits if they address the same issue. In addition, my commits follow the guidelines from "How to write a good git commit message":
    1. Subject is separated from body by a blank line
    2. Subject is limited to 50 characters (not including Jira issue reference)
    3. Subject does not end with a period
    4. Subject uses the imperative mood ("add", not "adding")
    5. Body wraps at 72 characters
    6. Body explains "what" and "why", not "how"

Documentation

  • (N.A.) In case of new functionality, my PR adds documentation that describes how to use it.
    • All the public functions and the classes in the PR contain docstrings that explain what it does
    • If you implement backwards incompatible changes, please leave a note in the Updating.md so we can assign it to a appropriate release

Code Quality

  • Passes flake8

@mik-laj mik-laj self-requested a review August 17, 2019 06:46
Copy link
Member

@turbaszek turbaszek left a comment

Choose a reason for hiding this comment

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

Good job @hagope! I left few comments. Unit test are important but system test are also welcomed! If you can, please move the hook to airflow/gcp/hooks/sheets.py as AIP-21 suggest. The folder should already exists on master. Same about tests tests/gcp/hooks/test_sheets.py ;)

@hagope
Copy link
Contributor Author

hagope commented Aug 17, 2019

@milton0825 and @nuclearpinguin thank you for the feedback! I can make all the changes you've mentioned, after doing so shall I update append my changes to this commit?

@turbaszek
Copy link
Member

@hagope you can use git commit --fixup to add changes as new fixup commits. It's a nice way to see new changes and to squash everything when ready for merge.

@mik-laj mik-laj self-requested a review August 19, 2019 09:24
@hagope
Copy link
Contributor Author

hagope commented Aug 20, 2019

@nuclearpinguin @mik-laj @milton0825 Thank you for your code review and feedback, I've gone ahead and fixed up this commit with the following:

  • Added additional code documentation on the methods
  • Moved and renamed the files to the appropriate place
  • Added Unit testing, moved out system test
  • Fixed the issues above which were called out

Please take a look and let me know if I need any additional changes.
Also note that I've added a google sheet system test gist if anyone wants to test the hook in their own setup.

@hagope
Copy link
Contributor Author

hagope commented Aug 23, 2019

hi @mik-laj please take a look when you get a chance and let me know your feedback, thank you!

hagope and others added 7 commits August 23, 2019 12:11
Co-Authored-By: Kamil Breguła <mik-laj@users.noreply.github.com>
Co-Authored-By: Kamil Breguła <mik-laj@users.noreply.github.com>
Co-Authored-By: Kamil Breguła <mik-laj@users.noreply.github.com>
Co-Authored-By: Kamil Breguła <mik-laj@users.noreply.github.com>
Co-Authored-By: Kamil Breguła <mik-laj@users.noreply.github.com>
Co-Authored-By: Kamil Breguła <mik-laj@users.noreply.github.com>
Co-Authored-By: Kamil Breguła <mik-laj@users.noreply.github.com>
@hagope
Copy link
Contributor Author

hagope commented Aug 23, 2019

thanks for the feedback! i've committed the suggestions through GitHub not sure you feel about that, it did create bunch more commits but I'm assuming we'll squash commits before merge

hagope and others added 6 commits August 23, 2019 12:32
Co-Authored-By: Kamil Breguła <mik-laj@users.noreply.github.com>
Co-Authored-By: Kamil Breguła <mik-laj@users.noreply.github.com>
Co-Authored-By: Kamil Breguła <mik-laj@users.noreply.github.com>
Co-Authored-By: Kamil Breguła <mik-laj@users.noreply.github.com>
Co-Authored-By: Kamil Breguła <mik-laj@users.noreply.github.com>
@hagope
Copy link
Contributor Author

hagope commented Aug 26, 2019

Hi @mik-laj thanks again for the review, I've updated and committed please take a look when you have a chance.

@milton0825
Copy link
Contributor

Can you squash all your commits?

@milton0825 milton0825 self-assigned this Aug 26, 2019
@mik-laj
Copy link
Member

mik-laj commented Aug 26, 2019

Why can't you do this while merging? Merging with squash makes work much easier because you can also correct an incorrect title e.g. it should be started by uppercase letter.
Valid title: [AIRFLOW-5158] Add Google Sheets hook (#5845)

I planned to return to this PR this week. I love Google and any PR that deals with it will definitely not miss me.

@mik-laj mik-laj self-assigned this Aug 26, 2019
@hagope
Copy link
Contributor Author

hagope commented Aug 26, 2019

Why can't you do this while merging? Merging with squash makes work much easier because you can also correct an incorrect title e.g. it should be started by uppercase letter.
Valid title: [AIRFLOW-5158] Add Google Sheets hook (#5845)

I planned to return to this PR this week. I love Google and any PR that deals with it will definitely not miss me.

Awesome thank you @mik-laj and @nuclearpinguin ... If you need me to do anything please let me know.

@hagope hagope changed the title [AIRFLOW-5158] adds google sheets hook [AIRFLOW-5158] Add Google Sheets hook Aug 26, 2019
@milton0825
Copy link
Contributor

I would rather educate people to follow the convention instead.

@mik-laj mik-laj merged commit df3397c into apache:master Aug 27, 2019
@mik-laj
Copy link
Member

mik-laj commented Aug 27, 2019

This makes work difficult because it is harder to check what has changed since the last review. I think that the author of this PR has created many commits not because of laziness, but for our convenience. I don't feel that it would be worth changing. It's worth asking for squashing when you can't do a review without it.

@hagope hagope deleted the google-sheets-hook branch August 27, 2019 14:19
@hagope
Copy link
Contributor Author

hagope commented Aug 27, 2019

Thanks for guiding me through my first contribution, I've learned a lot along the way and next time hopefully will be much smoother! Looking forward to working more on this project 👍 💯

Jerryguo pushed a commit to Jerryguo/airflow that referenced this pull request Sep 2, 2019
@hagope hagope mentioned this pull request Apr 27, 2020
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.

4 participants