-
Notifications
You must be signed in to change notification settings - Fork 142
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
db optional dependency #415
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @Duncan-Hunter, thank you for putting this PR together! Looks pretty good!
I just have a concern around generating warnings for everyone using the nannyml
package without the db
extra installed. Think that's something we'll want to tackle to avoid confusion for users.
I'll take a quick look into this! |
To be more helpful - this was an error with sqlmodel and the objects in |
Hmm, I recall seeing that message pop up but can't seem to reproduce it either locally or in the automated builds here. Did a quick experiment with your changes and works as I would expect, very nice. We can apply the same principles for S3FS / GCP / Azure client libraries too upon parsing URLs. For me this is good to merge! |
Great, thanks. There's probably some more stuff to add around docs and bumping the version, but perhaps that's better left to you. For tox, should I raise this in a separate issue? |
Hi - is there anything I can do to get this merged? |
Yeah, reminding me to do it 😄 Just kidding, this will just need a quick review of the docs for installation. We should have some time to do that this week. As soon as that is done we can merge and probably also release a new version of the library! |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #415 +/- ##
==========================================
- Coverage 77.02% 74.72% -2.30%
==========================================
Files 109 109
Lines 9663 9702 +39
Branches 1746 1750 +4
==========================================
- Hits 7443 7250 -193
- Misses 1722 1965 +243
+ Partials 498 487 -11 ☔ View full report in Codecov by Sentry. |
Try to fix broken test pypi upload
Merged! Had some annoyance with one of the workflows, but it probably had to do with PyPi "trusted publishers", so to be expected given this was running from your account. Thanks again for your contribution, very useful and much appreciated! |
#412
To install with psycopg2 and sqlmodel, install with either
poetry add nannyml[db]
or
poetry install --all-extras
etc (https://python-poetry.org/docs/pyproject/#extras)Loosens s3fs and gcsfs requirements. Raises import errors if
nannyml.io.db
is imported directly. The warning/error logic can be changed if needed.Probably needs a version bump (it's breaking for anyone importing it and not specifying the extra). And probably needs some doc updates. Let me know what you think.
Doesn't work
poetry run tox
, but neither does the main branch, so :/.Works with
poetry run pytest