-
-
Notifications
You must be signed in to change notification settings - Fork 404
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
refactor: Remove direct pandas import #6476
Open
hoxbro
wants to merge
32
commits into
main
Choose a base branch
from
remove_direct_pandas
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7fc6d1d
to
dc063df
Compare
hoxbro
commented
Dec 13, 2024
0fa4a05
to
af07d2f
Compare
0e81703
to
dee9c00
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #6476 +/- ##
==========================================
- Coverage 88.79% 88.77% -0.03%
==========================================
Files 323 325 +2
Lines 68949 69090 +141
==========================================
+ Hits 61225 61333 +108
- Misses 7724 7757 +33 ☔ View full report in Codecov by Sentry. |
b02a1a2
to
98d307c
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR introduces the utilities
_lazy_module
andgen_types
. Both are meant to depend on 3rd party libraries without using direct imports.These have been used throughout the code, so
pandas
is no longer imported directly; this has significantly improved import time and, at the same time, set up the codebase to handle a world wherepandas
is not the only DataFrame library. Some functionality can likely be rewritten to not depend onpandas
, but I will do that in future PRs.The
_lazy_module
has also "sneaked" into the Ibis data interface, which, in my opinion, makes it cleaner by not having all methods start withimport ibis
.Lastly, I have also removed the use of
lazy_isinstance
and deprecated it as the functionality can be done with_lazy_module
and a bool check. This is done inholoviews/operation/datashader.py
.Some statics:
Hyperfine
Main (0ba7398)
This PR (18f4db4)
Tuna
Running
python -X importtime -c 'import holoviews' 2> tuna.log && tuna tuna.log
Main (0ba7398)
This PR (18f4db4)

Output of
hv.show_versions