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

Update Detectors to use phrase inputs instead of Terms #121

Merged
merged 2 commits into from
Oct 17, 2024

Conversation

JPrevost
Copy link
Member

@JPrevost JPrevost commented Oct 15, 2024

Summary of changes (please refer to commit messages for full details):

  • updated variable name in many detectors to better reflect we are expecting strings not Term objects
  • refactored Citation to use strings and not Term objects to match our other Detectors

Developer

Ticket(s)

https://mitlibraries.atlassian.net/browse/TCO-106

Accessibility

  • ANDI or Wave has been run in accordance to our guide and
    all issues introduced by these changes have been resolved or opened
    as new issues (link to those issues in the Pull Request details above)
  • There are no accessibility implications to this change

Documentation

  • Project documentation has been updated, and yard output previewed
  • No documentation changes are needed

ENV

  • All new ENV is documented in README.
  • All new ENV has been added to Heroku Pipeline, Staging and Prod.
  • ENV has not changed.

Stakeholders

  • Stakeholder approval has been confirmed
  • Stakeholder approval is not needed

Dependencies and migrations

NO dependencies are updated

NO migrations are included

Reviewer

Code

  • I have confirmed that the code works as intended.
  • Any CodeClimate issues have been fixed or confirmed as
    added technical debt.

Documentation

  • The commit message is clear and follows our guidelines
    (not just this pull request message).
  • The documentation has been updated or is unnecessary.
  • New dependencies are appropriate or there were no changes.

Testing

  • There are appropriate tests covering any new functionality.
  • No additional test coverage is required.

Why are these changes being introduced:

* we were often passing Strings but calling the variable `term` which
  was misleading as our strings were often phrases that are part of the
  `Term` object. Aka we were calling `Term.phrase` a `term`.

Relevant ticket(s):

* https://mitlibraries.atlassian.net/browse/TCO-106

How does this address that need:

* Renamed `term` to `phrase` to better reflect it often comes from a
  `Term.phrase` rather than being the actual `Term` object
* Improved some documentation
Why are these changes being introduced:

* this normalizes all Citation to work like our other Detectors to take
  string input rather than Terms for their non-record entry-points

Relevant ticket(s):

* https://mitlibraries.atlassian.net/browse/TCO-106

How does this address that need:

* Reworked relevant methods and documentation (and some tests)
@mitlib mitlib temporarily deployed to tacos-api-pipeline-pr-121 October 15, 2024 20:18 Inactive
@JPrevost JPrevost changed the title Tco 106 phrases Update Detectors to use phrase inputs instead of Terms Oct 16, 2024
@matt-bernhardt matt-bernhardt self-assigned this Oct 17, 2024
Copy link
Member

@matt-bernhardt matt-bernhardt left a comment

Choose a reason for hiding this comment

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

This looks good to me - thanks for cleaning this up!

:shipit:

Copy link
Member

@matt-bernhardt matt-bernhardt left a comment

Choose a reason for hiding this comment

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

Sorry, meant to approve not comment...

@JPrevost JPrevost merged commit 78dd771 into main Oct 17, 2024
3 checks passed
@JPrevost JPrevost deleted the tco-106-phrases branch October 17, 2024 19:48
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