Repository navigation
Conversation
|
I see tests are failed now on postgres non-native, will do some force-pushes of fix commit to my branch to reconcile them |
|
Ok all passed with last commit on my fork: https://github.com/mksh/sqlalchemy-continuum/actions/runs/14711222718/job/41283870470?pr=1 |
|
Could this be merged? Seems very useful |
|
I see great improvements in 1.5.0 release, had rebased my fork and this PR on top of them. Sqlmodel is now optional dependency on par with other extras. |
ac06c6b to
8db17c7
Compare
|
Saw the linter failure, so had run it locally and fixed the reported issues. Additionally, added |
|
Finally got back to this. Updated code to pass tests on all platforms. Tested in github actions of fork repo: https://github.com/mksh/sqlalchemy-continuum/actions/runs/21036613158/ |
|
Other than the conflicts which now exist, is there anything that would prevent this merge request from being accepted @josecsotomorales ? |
|
Seems reasonable to me, without having gone through all the tests yet. |
|
I have opened #397 which extends this pull request to address the conflicts, and I hope allow it to be accepted and merged. Please let me know if there is a more preferred approach, or any additional changes required. Thanks |
|
@GrimHacker Thank you for resolving the conflicts, new PR looks good to me 😄 |
|
Closing in favor of #397 that contains implementation without conflicts with main, and passing latest tests (verified on my fork in https://github.com/mksh/sqlalchemy-continuum/actions/runs/29824022251/job/88613054815?pr=4) |
Add support for models configured via https://github.com/fastapi/sqlmodel
As of current
SQLModel/SQLAlchemy/SQLAlchemy-ContinuumAPI, there is no need to depend onSQLModelto support it, as only change needed is to makeSQLAlchemy-Continuumto pullSQLAlchemyclass registry from different attribute forSQLModelderived models as compared to pureSQLAlchemydefined ones.The
base_classesparameter for versioned models does not work withSQLModel,pydanticmetaclass magic fails for version model classes created withbase_classespassed, because they are lacking__module__attribute somehow, leading toAttributeErrorinside pydantic meta methods. Since I do not usebase_classesin my projects, I decided not to put effort to support it in this patch, but future support might need changes in eitherSQLModelorpydantic.Otherwise, most of stuff seem to work well, ported CRUD and relationships tests to run with
SQLModeldefined models as part of this PR.I'd like to say thanks to https://github.com/AlePiccin who suggested the idea behind this PR implementation here: #271 (comment)