Skip to content

1.0.0 - A Time for Releases

Compare
Choose a tag to compare
@orangewolf orangewolf released this 18 Aug 21:21
· 521 commits to main since this release
134cc77

As more community members begin to use Bulkrax in earnest, it is time for the rapid and often breaking changes to Bulkrax to come to a close. This will be the first of regular releases going forward.

Recent Breaking Changes:

  • Source Identifiers and Work Identifiers (previously system identifier)
    There has been a lot of confusion in the code between these two items. Some of that confusion stemed from the names being to similar, but the majority of it came from the idea of specifying them separately. Instead of two seperate variables, we now specify which field is the source_identifier in the field hash. This simplifies the specification and makes it more flexible to overriding.

    # Was
    config.system_identifier_field = 'source'
    config.source_identifier_field_mapping = { 'Bulkrax::CsvEntry'  => 'MyIdentifierField' }
    
    # Now
    config.field_mappings["Bulkrax::CsvParser"]["source"] = { from: ["MyIdentifierField"], source_identifier: true  }
    
  • Fill in missing identifier functionality

      # Should Bulkrax make up source identifiers for you? This allows round tripping and downloaded errored entries to still work, but does
      # mean if you upload the same source record in two different files you WILL get duplicates.
      # for the importer id and the row in the file
      #    config.fill_in_blank_source_identifiers.call = -> { "b-#{importer.id}-#{_index}"}
      # or use a uuid
      #    config.fill_in_blank_source_identifiers.call = -> { SecureRandom.uuid }
    
  • Refactored ObjectFactory initializer to use named arguments

    ObjectFactory.new(attrs, source_identifier, work_id, false, user)
    
    # Now
    ObjectFactory.new(attributes: attrs, source_identifier_value: source_identifier, work_identifier: work_id, user: user, replace_files: false)
    

New Features

  • Parsers handle numerated notation
    1_value
    # or
    value_1
    
  • Parsers handle fields that are prefixed or not prefixed with the object name
    "creator_first_name" => { from: ["creator_first_name"], object: "creator" }
    # or
    "first_name" => { from: ["creator_first_name"], object: "creator" }
    
  • Parsers handle values nested in an object
    # ['Queen'] is the nested value within the "creator" object below
    
    [{
        creator: {
            position: ['Queen']
        }
    }]
    
  • Updating an importer has a new option. Instead of only a destructive update, whereby all FileSets are destroyed and then re-created, there is now a nondestructive option that uses fedora/hyrax's versioning tools to create a version of the FileSet then update it.
  • We have also made great strides in setting up the ability to round-trip. Now when a new importer is created, if any of the works imported already exist in the system, it will match and update the work rather than duplicating it. This matching is based on the source identifiers and work identifiers (mentioned above).

Bug Fixes

Many bug fixes around exports, field sizes and the way file updates are handled.