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

Add replace(), __getitem__, and __iter__ to pipeline #157

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

Conversation

dhdaines
Copy link
Contributor

@dhdaines dhdaines commented Jul 6, 2024

This allows one to more easily find registered functions (such as the broken language trimmers) in a pipeline and replace them (with less broken ones). Fixes #155

@dhdaines dhdaines changed the title Add replace() and __getattr__ to pipeline Add replace() and __getitem__ to pipeline Jul 6, 2024
yeraydiazdiaz
yeraydiazdiaz previously approved these changes Sep 8, 2024
@yeraydiazdiaz yeraydiazdiaz dismissed their stale review September 8, 2024 11:50

Missing changelog

@yeraydiazdiaz
Copy link
Owner

yeraydiazdiaz commented Sep 8, 2024

Thanks again.

Could you add entries in the Changelog under "Unreleased"? The same applies to the other PRs.

Happy to merge when the pipelines pass.

@dhdaines
Copy link
Contributor Author

dhdaines commented Sep 9, 2024

Ah! I forgot to run tox! Fixed now.

@codecov-commenter
Copy link

codecov-commenter commented Sep 9, 2024

Codecov Report

Attention: Patch coverage is 91.30435% with 4 lines in your changes missing coverage. Please review.

Project coverage is 95.95%. Comparing base (d07b60f) to head (66ad327).

Files with missing lines Patch % Lines
lunr/pipeline.py 86.66% 2 Missing ⚠️
tests/test_pipeline.py 93.54% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #157      +/-   ##
==========================================
- Coverage   96.02%   95.95%   -0.07%     
==========================================
  Files          48       48              
  Lines        3171     3217      +46     
==========================================
+ Hits         3045     3087      +42     
- Misses        126      130       +4     

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

@dhdaines dhdaines changed the title Add replace() and __getitem__ to pipeline Add replace(), __getitem__, and __iter__ to pipeline Sep 9, 2024
@dhdaines
Copy link
Contributor Author

dhdaines commented Sep 9, 2024

Should be good now - it made sense to add __iter__ as well, with the caveat that Pipeline is not a real python mapping due to the issue of function registration.

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.

Pipeline should have an insert and/or a replace method
3 participants