Releases: collectionspace/collectionspace-mapper
Use Ruby 2.7.2
Use Ruby 2.7.2
Response can return XML string instead of Nokogiri XML Document
Response can return XML string instead of Nokogiri XML Document.
BREAKING CHANGE: creation of DataHandler
Introduces a breaking change to the public API!
A new DataHandler
must now be initialized with keyword arguments.
Improvements for cspace-batch-import integration
- updates
collectionspace-client
andcollectionspace-refcache
versions - reorganizes and updates usage and config options documentation
- add
check_terms
andcheck_record_status
config options and add support for handling the different options - add method to
DataHandler
to updateResponse.terms.found
tofalse
in all rows where a term not found in CollectionSpace is used. That is, existence in the cache because we created the refname, marked the termfound=false
, and added it to the cache on a previous row does not mean the term should be reported asfound=true
in a subsequent row. All uses of an unknown term should be included in the processing report fromcspace-batch-import
. - raise
IdFieldNotInMapperError
upon initialization ofDataHandler
with a mapper missing[:config][:identifier_field]
. - return
record_status
attribute inResponse
. Ifrecord_status = :existing
, also return attributes:csid
,uri
,refname
Handles raw JSON configs
External tools such as cspace-batch-import
can now pass in raw JSON strings as configs. They will be parsed into Ruby hashes which will have keys turned into symbols as expected for processing.
Mapper results terms include refname objects
Instead of listing :type
, :subtype
, :urn
, etc. in the term hashes returned as part of Mapper::Result
, include :refname
, which has as value a Mapper::Tools::Refname
object, from which all necessary bits of info for further processing can be directly requested without fiddly parsing, etc.
Refname value mapping, plus fixes and utilities
- Adds support for mapping "Refname" datacolumns directly without vocabulary/authority value lookup.
- Add data quality check for basic refname well-formedness in "Refname" datacolumns
- Two new utilities scripts to support testing: one to create a JSON datahash from each row in a CSV, and one to create a single-row CSV from a JSON datahash
- Default multivalue field delimiter is now
|
- Update documentation of config options
- Improvements to date processing, including a new option for how to handle two-digit years
- Add basic structure/setup for testing UCB PAHMA NAGPRA data mapping
Validate presence of required fields populated by multiple authorities
Previous to this release, record types such as Core / Movement would not validate because currentLocation
is a non-repeatable required field that can be populated by three authorities.
In no case would incoming data have a currentLocationLocationLocal
, currentLocationLocationOffsite
and currentLocationOrganization
value.
This release ensures that one populated data field associated with a multi-authority required field will suffice as valid.
Remove aliases
Module aliases were mostly all to the global namespace, so they have been removed to prevent namespace stomping.
Remove development dependency on ruby-prof
Removes development dependency on ruby-prof profiling gem