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

perf: use inheritance to improve our code base #47

Conversation

leynier
Copy link
Member

@leynier leynier commented Dec 17, 2021

postgrest_py/__init__.py Show resolved Hide resolved
postgrest_py/base_client.py Show resolved Hide resolved
postgrest_py/_async/client.py Outdated Show resolved Hide resolved
postgrest_py/base_request_builder.py Outdated Show resolved Hide resolved
postgrest_py/base_request_builder.py Outdated Show resolved Hide resolved
postgrest_py/_async/client.py Outdated Show resolved Hide resolved
postgrest_py/base_request_builder.py Outdated Show resolved Hide resolved
postgrest_py/_async/request_builder.py Outdated Show resolved Hide resolved
postgrest_py/base_request_builder.py Show resolved Hide resolved
postgrest_py/base_request_builder.py Outdated Show resolved Hide resolved
Copy link
Contributor

@anand2312 anand2312 left a comment

Choose a reason for hiding this comment

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

Whoops, I'd looked through this earlier, forgot to approve. LGTM 🚀

@dreinon dreinon requested a review from lqmanh December 25, 2021 17:20
@sourcery-ai
Copy link
Contributor

sourcery-ai bot commented Dec 25, 2021

Sourcery Code Quality Report

✅  Merging this PR will increase code quality in the affected files by 2.64%.

Quality metrics Before After Change
Complexity 0.58 ⭐ 0.00 ⭐ -0.58 👍
Method Length 25.03 ⭐ 24.49 ⭐ -0.54 👍
Working memory 5.18 ⭐ 4.47 ⭐ -0.71 👍
Quality 90.13% 92.77% 2.64% 👍
Other metrics Before After Change
Lines 637 503 -134
Changed files Quality Before Quality After Quality Change
postgrest_py/init.py % % %
postgrest_py/_async/client.py 92.96% ⭐ 96.72% ⭐ 3.76% 👍
postgrest_py/_async/request_builder.py 88.17% ⭐ 90.50% ⭐ 2.33% 👍
postgrest_py/_sync/client.py 93.00% ⭐ 96.76% ⭐ 3.76% 👍
postgrest_py/_sync/request_builder.py 88.18% ⭐ 90.52% ⭐ 2.34% 👍
tests/_async/test_request_builder.py 93.74% ⭐ 92.64% ⭐ -1.10% 👎
tests/_sync/test_request_builder.py 93.74% ⭐ 92.64% ⭐ -1.10% 👎

Here are some functions in these files that still need a tune-up:

File Function Complexity Length Working Memory Quality Recommendation

Legend and Explanation

The emojis denote the absolute quality of the code:

  • ⭐ excellent
  • 🙂 good
  • 😞 poor
  • ⛔ very poor

The 👍 and 👎 indicate whether the quality has improved or gotten worse with this pull request.


Please see our documentation here for details on how these metrics are calculated.

We are actively working on this report - lots more documentation and extra metrics to come!

Help us improve this quality report!

@lqmanh
Copy link
Collaborator

lqmanh commented Dec 25, 2021

LGTM

@dreinon dreinon merged commit 315f596 into supabase-community:master Dec 25, 2021
@J0
Copy link
Contributor

J0 commented Dec 28, 2021

Hey @lqmanh,

Sorry to bother you again but we were hoping to publish a new release with these changes when we realized that we don't quite have access to publish to postgrest-py https://pypi.org/project/postgrest-py/ on PyPI. Wondering if you could grant us permissions?

My handle is joellee and @dreinon 's handle is dreinon

@lqmanh
Copy link
Collaborator

lqmanh commented Dec 28, 2021

@J0 OK I'll grant you permission

@leynier leynier deleted the use-inheritance-to-improve-our-code-base branch January 4, 2022 06:43
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.

Add support for upsert Use inheritance to improve our code base
5 participants