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 EnhancerScripts ItemEnhancerEntityType ItemEnhancerByDate #440

Open
wants to merge 1 commit into
base: main-cris
Choose a base branch
from

Conversation

floriangantner
Copy link

References

Add references/links to any related issues or PRs. These may include:

Description

  • two improved item-enhancer scripts extending the current implementation

Enhancer Scripts:
ItemEnhancerEntityType

  • item-enhancer-type
    • database-based approach
      • -c --collection : restrict enhancement to all Items of a collection
        -e --entitytype : restrict enhancement to all Items of a given type
      • -m --max : only enhance a maximum number of items (e.g. test result or effect on new enhancer)
      • -m && -e : restrict enhancement to limited number of Items of a given type of all collections
      • -l --limit : use some limit after which some commit is made (avoid long time processes and one single commit on all entities)
      • -o --offset: enhance skipping the first items. Usable together with max for pagination.
      • Use case: apply new enhancers on some fractial of the repositories content saving time.

Options:

  • ItemEnhancerByDate*
  • item-enhancer-date
    • solr-based approach
    • -c --collection restrict enhancement to all Items of a collection
    • -e --entity : restrict enhancement to all Items of a given entity type
    • -m --max : only enhance a maximum number of items (e.g. test result or effect on new enhancer)
    • -l --limit : use some limit after which some commit is made (avoid long time processes and one single commit on all entities)
    • -s --datelower -d --dateupper : apply some solr daterange filter on the lastModified date (enhance all items modified between x and y || enhance all items modified before date z)
    • -q --query apply some general solr-filter (e.g. enhance all items matching some criteria, e.g. not enhanced by some cris.virtual.* field or some other criteria yet)
    • Use case: reapply enhancers on some run where some enhancement was suddenly broken.
    • Use case: Enhance all items modified between some timespan

Include guidance for how to test or review your PR.

  • provided some test case. The tests are the same as in the ItemEnhancerScriptIT , so the enhancement of the common enhancment should lead to the same result.
  • In addition extended with further test cases about the script options

Checklist

This checklist provides a reminder of what we are going to look for when reviewing your PR. You need not complete this checklist prior to creating your PR (draft PRs are always welcome). If you are unsure about an item in the checklist, don't hesitate to ask. We're here to help!

  • My PR is small in size (e.g. less than 1,000 lines of code, not including comments & integration tests). Exceptions may be made if previously agreed upon.
  • My PR passes Checkstyle validation based on the Code Style Guide.
  • My PR includes Javadoc for all new (or modified) public methods and classes. It also includes Javadoc for large or complex private methods.
  • My PR passes all tests and includes new/updated Unit or Integration Tests based on the Code Testing Guide.
  • If my PR includes new libraries/dependencies (in any pom.xml), I've made sure their licenses align with the DSpace BSD License based on the Licensing of Contributions documentation.
  • If my PR modifies REST API endpoints, I've opened a separate REST Contract PR related to this change.
  • If my PR includes new configurations, I've provided basic technical documentation in the PR itself.
  • If my PR fixes an issue ticket, I've linked them together.

@floriangantner floriangantner mentioned this pull request Mar 6, 2024
6 tasks
@floriangantner floriangantner changed the base branch from main-cris to dspace-cris-2023_02_x April 9, 2024 09:59
@floriangantner floriangantner changed the base branch from dspace-cris-2023_02_x to main-cris April 9, 2024 10:00
@floriangantner floriangantner changed the base branch from main-cris to dspace-cris-2023_02_x April 15, 2024 10:20
@floriangantner floriangantner changed the base branch from dspace-cris-2023_02_x to main-cris April 15, 2024 10:20
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.

New Enhancements Script
1 participant