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 ISiteSearch interface #2

Merged
merged 12 commits into from Mar 2, 2022
Merged

Conversation

pdelboca
Copy link
Member

This PR adds a new ISiteSearch to allow users to hook specific logic before/after each type of search.

This is inspired by before_package_search and after_package_search methods implemented in IPackageController:

@codecov-commenter
Copy link

codecov-commenter commented Feb 17, 2022

Codecov Report

Merging #2 (26d6dbd) into main (2e2de81) will increase coverage by 0.16%.
The diff coverage is 92.85%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main       #2      +/-   ##
==========================================
+ Coverage   91.13%   91.29%   +0.16%     
==========================================
  Files          16       18       +2     
  Lines        1150     1286     +136     
==========================================
+ Hits         1048     1174     +126     
- Misses        102      112      +10     
Impacted Files Coverage Δ
ckanext/sitesearch/interfaces.py 54.54% <54.54%> (ø)
ckanext/sitesearch/logic/action.py 100.00% <100.00%> (ø)
ckanext/sitesearch/tests/test_interfaces.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2e2de81...26d6dbd. Read the comment docs.

@amercader amercader changed the title [WIP] Add ISiteSearch interface Add ISiteSearch interface Mar 2, 2022
Copy link
Member

@amercader amercader left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good @pdelboca ! Only two minor comments. Also please add a small mention in the README about the interface (you can link to interfaces.py for the documentation) and run black on all files before pushing, thanks!

ckanext/sitesearch/interfaces.py Outdated Show resolved Hide resolved
ckanext/sitesearch/interfaces.py Outdated Show resolved Hide resolved
@pdelboca
Copy link
Member Author

pdelboca commented Mar 2, 2022

Done @amercader !

I do not have permissions to merge.

@amercader amercader merged commit af11f7f into okfn:main Mar 2, 2022
@amercader
Copy link
Member

@pdelboca thanks, you should have perms now

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.

None yet

3 participants