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

Generic backend registration #171

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

alexanderGerbik
Copy link
Contributor

@alexanderGerbik alexanderGerbik commented May 31, 2022

Add support for custom backend registration with optional config post-processing.
Add support for passing arbitrary django database settings as kwargs.
Add feature description to README and make README more clear.
Extract tests with deprecated options to separate suite to simplify further removal.

@mattseymour
Copy link
Contributor

@alexanderGerbik thanks for the submission, we have had two very similar yet competing PRs come in within a couple of hours of each other. Can I direct you to #170 and see if the changes you made can work along side this PR.

📓 I have put a similar message on #170

schemes = schemes or [backend.rsplit(".")[-1]]
schemes = [schemes] if isinstance(schemes, str) else schemes
for scheme in schemes:
if scheme not in _seen_schemes:
Copy link

Choose a reason for hiding this comment

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

Any reason this can't just be if scheme not in ENGINE_SCHEMES?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You are right. Fixed.

@dcwatson
Copy link

dcwatson commented Jun 1, 2022

From what I can tell, this builds off of #151 and changes the options mechanism into a decorator to adjust the parsed settings. Given that it has more tests and an updated README, I'm inclined to start with this PR.

@codecov
Copy link

codecov bot commented Jun 5, 2022

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (bcf163e) to head (b27bd63).

Additional details and impacted files
@@            Coverage Diff            @@
##            master      #171   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            1         1           
  Lines           76       131   +55     
  Branches        18        33   +15     
=========================================
+ Hits            76       131   +55     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@alexanderGerbik
Copy link
Contributor Author

@mattseymour any chances of this PR being merged? It addresses all the other opened PR's as well as some of opened issues.

@mattseymour
Copy link
Contributor

This is quite a sweeping change. It would be good if we could get a couple of sets of eyes over the ammendments just to make sure we cover off as much as possible. From the outset its looking good. It will just be a case of really giving it a good test.

Copy link

@alanjds alanjds left a comment

Choose a reason for hiding this comment

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

Looks useful and future-proof.

@alexanderGerbik alexanderGerbik changed the title Generic backend registration and arbitrary django settings support Generic backend registration Feb 29, 2024
@alexanderGerbik
Copy link
Contributor Author

@mattseymour @alanjds
Pull request have been updated and doesn't have merge conflicts anymore.
I've removed arbitrary Django settings support to increase the chances of this PR to be merged. I'll create another PR for settings support.

Copy link

@alanjds alanjds left a comment

Choose a reason for hiding this comment

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

Let's get this merged!

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