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

make categories searchable #232

Merged
merged 15 commits into from
Sep 12, 2024
Merged

make categories searchable #232

merged 15 commits into from
Sep 12, 2024

Conversation

haesleinhuepf
Copy link
Member

Hey Stephane @StRigaud ,

this change is required to make the napari-assistant find the right functions. Under the hood, I read out all functions, that claim to be assistant-compatible like this list(cle.operations("in assistant").keys())

I had to modify this:

@plugin_function(category=[...

to this in many places:

@plugin_function(categories=[...

Does this require a change in a code-generator? If so, where?

Let me know what you think! (Or feel free to merge this).

Best,
Robert

@codecov-commenter
Copy link

codecov-commenter commented Sep 4, 2024

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

Attention: Patch coverage is 95.70552% with 7 lines in your changes missing coverage. Please review.

Project coverage is 86.62%. Comparing base (ed31ca7) to head (ac3b2bc).

Files with missing lines Patch % Lines
pyclesperanto/_categories.py 33.33% 4 Missing ⚠️
pyclesperanto/_functionalities.py 70.00% 3 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #232      +/-   ##
==========================================
+ Coverage   86.52%   86.62%   +0.10%     
==========================================
  Files          18       19       +1     
  Lines        1603     1608       +5     
==========================================
+ Hits         1387     1393       +6     
+ Misses        216      215       -1     

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

@StRigaud
Copy link
Member

StRigaud commented Sep 4, 2024

Hey @haesleinhuepf

Yes, it does, but very minimalist has we just change the name when we write the file:
https://github.com/clEsperanto/gencle/blob/221c044ac6bec00726eafee80ef2f6e7852031ce/update_scripts/gencle/_genpy.py#L207

@StRigaud
Copy link
Member

StRigaud commented Sep 4, 2024

Also I did an operations function in functionalities.py but most likely not good compared to yours:

def operations(
must_have_categories: Optional[list] = None,
must_not_have_categories: Optional[list] = None,
) -> dict:

dont hesitate to remove it

@haesleinhuepf
Copy link
Member Author

haesleinhuepf commented Sep 5, 2024

Just a note: the pre-commit is super annoying, because it is obviously a post-commit.

I'm running into merge conflicts all the time.

@StRigaud
Copy link
Member

StRigaud commented Sep 5, 2024

The categories function is missing a doc 😉

@StRigaud StRigaud merged commit ee73668 into main Sep 12, 2024
7 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.

3 participants