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

Refactor rake tasks into harvester and indexer classes #132

Closed
wants to merge 1 commit into from
Closed

Refactor rake tasks into harvester and indexer classes #132

wants to merge 1 commit into from

Conversation

thatbudakguy
Copy link
Member

@thatbudakguy thatbudakguy commented Jan 11, 2023

This mostly moves logic out of rake tasks and into dedicated classes, which makes it easier to test. It also separates the harvesting portion from the indexing portion; this might make it easier to have the geoblacklight harvester inherit some of this behavior later. The denylist is one of the things the harvester class includes, which closes #119. I think the logic mentioned in #112 was already in place, so this closes #112 too.

It also adds logic to filter indexing based on your desired schema version (set SCHEMA_VERSION to Aardvark to index only aardvark records; the default is 1.0), which fixes #130.

I added a dependency on ruby-git to do the git pull/clone instead of just calling out to system(), which made things easier to test and might also allow for things to run on windows.

* Moves logic out of rake tasks and into tested classes
* Adds logic to filter indexing based on desired schema version
* Uses ruby-git to manipulate repositories
@thatbudakguy thatbudakguy marked this pull request as ready for review January 11, 2023 00:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant