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

refactored for readability + fixed bugs with _inc and update_by_pk #8

Closed
wants to merge 1 commit into from

Conversation

beansandmash
Copy link

Hello, I have refactored some of the code for readability while maintaining the same function. Thanks.

@codecov-io
Copy link

Codecov Report

Merging #8 (1c3bcd0) into master (e634c19) will increase coverage by 0.42%.
The diff coverage is 31.18%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master       #8      +/-   ##
==========================================
+ Coverage   27.49%   27.92%   +0.42%     
==========================================
  Files          11       11              
  Lines         451      351     -100     
==========================================
- Hits          124       98      -26     
+ Misses        327      253      -74     
Impacted Files Coverage Δ
src/graphql_sqlalchemy/dialects/pg/inputs.py 0.00% <0.00%> (ø)
src/graphql_sqlalchemy/objects.py 42.85% <21.42%> (+7.14%) ⬆️
src/graphql_sqlalchemy/schema.py 37.93% <23.07%> (+10.43%) ⬆️
src/graphql_sqlalchemy/inputs.py 25.00% <26.92%> (+4.76%) ⬆️
src/graphql_sqlalchemy/names.py 47.05% <35.71%> (-3.97%) ⬇️
src/graphql_sqlalchemy/resolvers.py 14.55% <40.00%> (ø)
src/graphql_sqlalchemy/args.py 62.50% <50.00%> (+14.22%) ⬆️
src/graphql_sqlalchemy/helpers.py 64.28% <66.66%> (-5.72%) ⬇️
src/graphql_sqlalchemy/graphql_types.py 53.33% <100.00%> (+0.70%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e634c19...1c3bcd0. Read the comment docs.

@gzzo
Copy link
Owner

gzzo commented Apr 15, 2021

hi @beansandmash, thank you for your contribution! as is, this PR is too large to review and merge at once.

I think it would make more sense to break this up into discrete PRs that address the different things you're trying to accomplish.

I'm curious what the bugs are with _inc and _update_by_pk, if you could submit bugs/PRs for those that would be a good start.

for readability I think it's a bit more subjective, but I think changes that use Any as a type or # type: ignore are in general a non-starter. I think you have some good ideas around reducing some of the code duplication by generalizing some logic and introducing some configuration with maps (like in schemas). that said, I'm not comfortable losing the type/import safety in names.

@gzzo gzzo closed this Apr 15, 2021
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.

None yet

3 participants