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

DEV-1373 make catalog indexing date independent #52

Merged
merged 16 commits into from
Oct 29, 2024

Conversation

moseshll
Copy link
Contributor

@moseshll moseshll commented Oct 18, 2024

  • Add CICTL::Journal class for writing dated files to a predefined location to record Zephir files indexed.
  • Add journal_directory to Services with ENV-overridable (ENV["JOURNAL_DIRECTORY"]) default location for such files. cictl index commands automatically write journals on completion.
  • Add cictl continue command that calls cictl all or cictl since depending on presence or absence of relevant jourmals.
  • Minor TIDY adjustments.
  • Incorporate nokogiri/rexml Dependabot security patch(es).
  • Address availability maps should account for icus #50 availability maps missing icus and other rights attributes with a partial rewrite in light of babel apps and hathifiles allow/deny criteria. Full suite of tests added (see the particulars in the commit message).
  • Remove a standardrb no-go area (lib/translation_maps) by mass-changing single quotes to double (standardrb --fix changed one or two other minor formatting issues).

Requests of the Reviewer

  • A look at the smallish Journal class and its application. Fortunately the new cictl continue functionality mostly just builds on what is there already.
  • A look at the availability_map_* rewrites -- is this an improvement, and is there anything to be done to improve on it?
  • Is there anything additional that would help the code to work smoothly under Argo?

- Add `CICTL::Journal` class for writing dated files to a predefined location to record Zephir files indexed.
- Add `journal_directory` to `Services` with `ENV`-overridable default location for journal files.
- Add `cictl continue` command that calls `cictl all` or `cictl since` depending on presence or absence of relevant jourmals.
@coveralls
Copy link

coveralls commented Oct 18, 2024

Coverage Status

coverage: 92.548% (+1.1%) from 91.419%
when pulling ca44f73 on DEV-1373_date_independence
into 2ade7c3 on main.

- To availability_map_ht.rb add `orphcand`, `icus`, `supp`.
- To availability_map_ht_intl.rb add the above plus `ic-world`, `und-world`, and `pd-pvt`.
- Re-map `umall` to "search only" for consistency with other HT code although it is no longer used.
- Re-order map entries by attribute id where possible, add comments, and where possible prefer strings over regexes.
- Add tests.
@moseshll moseshll requested a review from aelkiss October 22, 2024 19:36
Copy link
Member

@aelkiss aelkiss left a comment

Choose a reason for hiding this comment

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

The journal logic all makes sense to me. The tests could perhaps be made a little bit easier to read as described in the comment.

The translation maps are a little frustrating to look at since I wish we didn't have that information duplicated in so many places... That said, if we're touching the availability maps I think it's worth considering if we can make some small improvements now -- specifically if we can remove a couple of them that may not be used, and if we can just spell out the rights codes rather than using regexes (and thereby avoid adding a test for the availability map).

lib/translation_maps/ht/availability_map_ht.rb Outdated Show resolved Hide resolved
lib/translation_maps/ht/ht_namespace_map.rb Outdated Show resolved Hide resolved
lib/translation_maps/umich/institution_map.rb Outdated Show resolved Hide resolved
spec/spec_helper.rb Outdated Show resolved Hide resolved
spec/cictl/index_command_spec.rb Outdated Show resolved Hide resolved
@moseshll moseshll requested a review from aelkiss October 25, 2024 21:02
Copy link
Member

@aelkiss aelkiss left a comment

Choose a reason for hiding this comment

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

This all seems good to me. It may be worthwhile thinking at some point about how to extract some of the common functionality here and in our other ruby projects (processed file tracking, temp dirs for tests), but I don't have a clear enough sense of how to do that to suggest a specific approach right now.

@moseshll moseshll merged commit 7558bc3 into main Oct 29, 2024
1 check passed
@moseshll moseshll deleted the DEV-1373_date_independence branch October 29, 2024 17:14
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