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

SFR-2105: Deprecate OCLC Classify Manager #375

Merged
merged 18 commits into from
Sep 27, 2024
Merged

Conversation

Apophenia
Copy link
Contributor

@Apophenia Apophenia commented Sep 26, 2024

  • Removes Classify manager code
  • Moves one remaining Classify manager function into Classify process (logically this might be better off in a manager, but moving it into a manager file would have presented more work, so I just made it a utility function in the process and the unit tests could pass with only small changes to the mocks)
  • Removes unused functions specific to Classify XML processing and mapping from the Classify process
  • Removes ClassifyRecordByMetadata "v1" code

Some functions were unused, but represent logic that was recreated in the Classify process (e.g. the "v2" metadata fetch function) and would benefit from new tests. Other portions of the removed logic seem to already be covered by new mapping tests.


mockCheckRedis.assert_called_once_with('classifyWork', '1', 'owi')
def test_get_queryable_identifiers(self):
assert ClassifyProcess._get_queryable_identifiers(['1|isbn', '2|test']) == ['1|isbn']
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: newline at the end of this test!

Copy link
Contributor

@kylevillegas93 kylevillegas93 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! Once you're happy with the e2e processes, let's merge!

return self.checkSetRedis('classifyWork', workOWI, 'owi')
def _get_queryable_identifiers(identifiers):
return list(filter(
lambda x: re.search(r'\|(?:isbn|issn|oclc)$', x) != None,
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: x is very generic, we could use identifier or id to be specific.

@Apophenia Apophenia marked this pull request as ready for review September 26, 2024 21:09
@Apophenia Apophenia merged commit 67b7924 into main Sep 27, 2024
2 checks passed
@Apophenia Apophenia deleted the remove-old-classify-code branch September 27, 2024 14:17
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.

2 participants