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

chore: cleanup codebase, support for python >=3.7 #165

Merged
merged 33 commits into from
May 6, 2022

Conversation

vincentkoc
Copy link
Contributor

@vincentkoc vincentkoc commented May 5, 2022

No Github issue, doing general code maintenance

What changes are proposed in this PR?


  • Common python refactoring and error handling
  • Hint and Lint changes
  • Support for python >=3.7
  • Dependency cleanup
  • CircleCI docker images 2.0

How was this tested?


  • CircleCI and local testing

Vincent Koc added 2 commits May 5, 2022 16:03
Basic cleanup, error and code climate changes
@vincentkoc vincentkoc requested a review from a team as a code owner May 5, 2022 06:13
@vincentkoc vincentkoc changed the title chore: cleanup codebase (general code maintenance) chore: cleanup codebase, support for python >=3.7 May 5, 2022
hip_data_tools/etl/s3_to_dataframe.py Show resolved Hide resolved
@@ -172,7 +172,7 @@ def _chunk_batches(self, lst: List[dict]) -> List[List[dict]]:
n = self.__settings.destination_batch_size
return [lst[i * n: (i + 1) * n] for i in range((len(lst) + n - 1) // n)]

def _process_data_frame(self, data_frame) -> Tuple[list, list, list]:
def _process_data_frame(self, data_frame) -> tuple[list, list, list]:
Copy link

Choose a reason for hiding this comment

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

Value 'tuple' is unsubscriptable

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@Rukesh-Kapuluru this one here

hip_data_tools/etl/s3_to_cassandra.py Outdated Show resolved Hide resolved
hip_data_tools/google/sheets.py Show resolved Hide resolved
hip_data_tools/etl/s3_to_cassandra.py Outdated Show resolved Hide resolved
hip_data_tools/oracle/mysql.py Outdated Show resolved Hide resolved
Copy link
Contributor

@Rukesh-Kapuluru Rukesh-Kapuluru left a comment

Choose a reason for hiding this comment

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

Looks good to me.Any reason not to go to 3.9 version?

@@ -1,7 +1,7 @@
"""
handle ETL of offline conversion data from Athena to Google Ads API
"""
from typing import List, Tuple
from typing import List, Union, Tuple, Dict, Any
Copy link

Choose a reason for hiding this comment

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

Unused Union imported from typing

@codeclimate
Copy link

codeclimate bot commented May 6, 2022

Code Climate has analyzed commit 7610c7a and detected 8 issues on this pull request.

Here's the issue category breakdown:

Category Count
Style 2
Bug Risk 5
Complexity 1

Note: there are 5 critical issues.

The test coverage on the diff in this pull request is 27.5% (50% is the threshold).

This pull request will bring the total coverage in the repository to 49.7% (0.2% change).

View more on Code Climate.

@vincentkoc vincentkoc merged commit 593847b into master May 6, 2022
@vincentkoc vincentkoc deleted the vk-refactor-and-lint branch May 6, 2022 05:23
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.

3 participants