-
Notifications
You must be signed in to change notification settings - Fork 0
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
Extend Metrics::Algorithms feature to include Detector::SuggestedResource matches #84
Merged
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
matt-bernhardt
force-pushed
the
tco-25-historical-hints
branch
from
August 13, 2024 20:17
136efc8
to
a7ddfd7
Compare
matt-bernhardt
force-pushed
the
tco-25-historical-hints
branch
from
August 13, 2024 20:18
a7ddfd7
to
3614dac
Compare
matt-bernhardt
changed the title
Work in progress to include SuggestedResource matches in metrics
Extend Metrics::Algorithms feature to include Detector::SuggestedResource matches
Aug 14, 2024
matt-bernhardt
requested review from
JPrevost and
jazairi
and removed request for
JPrevost
August 14, 2024 14:00
JPrevost
requested changes
Aug 14, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Please add the method documentation we agreed to experiment with on this repository.
Oh, dagnabit. Yeah, I'll add that. Thanks for the prod. |
JPrevost
approved these changes
Aug 14, 2024
** Why are these changes being introduced: * We need to include the performance of our SuggestedResource records in the historical performance reports we are generating. ** Relevant ticket(s): * https://mitlibraries.atlassian.net/browse/tco-25 ** How does this address that need: * This copies the approach for counting Journal matches, applying it to the SuggestedResource model as well. This includes a migration to add a field to the report model, and tests and fixtures to confirm that the counts are being generated correctly. ** Document any side effects to this change: * Maybe not a side effect (but maybe it is) - the SuggestedResource model did not have a full_term_match method before this PR. This work adds it as well as tests for its behavior.
matt-bernhardt
force-pushed
the
tco-25-historical-hints
branch
from
August 14, 2024 19:23
e151b6b
to
d0dbd12
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 extends the
Metrics::Algorithms
model which generates historical records of the application's performance to include matches on the SuggestedResources records that have been added recently. A part of this work is that theDetector::SuggestedResource
model now gets afull_term_match
method, which is the crucial link to allow the model to do anything about search traffic.Along the way the
calculate_fingerprint
method becomes a class method, rather than an instance method. It is still part of the SuggestedResource model, and not in a helper.Much of this approach has been copied from the Journal title matching work - which seems like a reasonable starting point, both because the uses are similar and because consistent approaches in the app feels like Doing This Right.
Developer
Ticket(s)
https://mitlibraries.atlassian.net/browse/TCO-25
Accessibility
all issues introduced by these changes have been resolved or opened
as new issues (link to those issues in the Pull Request details above)
Documentation
ENV
Stakeholders
Dependencies and migrations
NO dependencies are updated
YES migrations are included
Reviewer
Code
added technical debt.
Documentation
(not just this pull request message).
Testing