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

Don't autoregister extensions #65

Merged
merged 3 commits into from
Jan 29, 2024

Conversation

MarcoGorelli
Copy link
Contributor

@MarcoGorelli MarcoGorelli commented Jan 29, 2024

xref pola-rs/polars#13899

Things I love:

  • plugins

Things I don't love:

  • imports with side-effects
  • breaking static typing
  • breaking linting

This doesn't remove any functionality. The only difference is that if you want the expressions extension, you need to do

import expression_lib.extension  # noqa: F401

to activate it.

Otherwise, you will just have to use the functions directly, e.g.

    dist.jaccard_similarity("dist_a", "dist_b")

instead of

    pl.col("dist_a").dist.jaccard_similarity("dist_b")

@MarcoGorelli MarcoGorelli marked this pull request as ready for review January 29, 2024 14:00
@ritchie46
Copy link
Member

I understand. Though I want to be ambivalent about it. Let's show both. :)

@MarcoGorelli
Copy link
Contributor Author

sure thing - I'm now showing both in both run.py and README.md

@ritchie46 ritchie46 merged commit 7b894de into pola-rs:main Jan 29, 2024
2 checks passed
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.

2 participants