Skip to content

Releases: collectionspace/collectionspace-mapper

Use Ruby 2.7.2

16 Jan 00:39
9046241
Compare
Choose a tag to compare

Use Ruby 2.7.2

Response can return XML string instead of Nokogiri XML Document

04 Jan 17:54
4bba11b
Compare
Choose a tag to compare

Response can return XML string instead of Nokogiri XML Document.

BREAKING CHANGE: creation of DataHandler

04 Jan 17:10
f8b1209
Compare
Choose a tag to compare

Introduces a breaking change to the public API!

A new DataHandler must now be initialized with keyword arguments.

Improvements for cspace-batch-import integration

24 Dec 18:10
367336b
Compare
Choose a tag to compare
  • updates collectionspace-client and collectionspace-refcache versions
  • reorganizes and updates usage and config options documentation
  • add check_terms and check_record_status config options and add support for handling the different options
  • add method to DataHandler to update Response.terms.found to false 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 term found=false, and added it to the cache on a previous row does not mean the term should be reported as found=true in a subsequent row. All uses of an unknown term should be included in the processing report from cspace-batch-import.
  • raise IdFieldNotInMapperError upon initialization of DataHandler with a mapper missing [:config][:identifier_field].
  • return record_status attribute in Response. If record_status = :existing, also return attributes: csid, uri, refname

Handles raw JSON configs

16 Dec 22:57
9ec0465
Compare
Choose a tag to compare

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

16 Dec 01:39
62e17d1
Compare
Choose a tag to compare

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

15 Dec 19:31
cdf458f
Compare
Choose a tag to compare
  • 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

21 Oct 20:46
0c0af4d
Compare
Choose a tag to compare

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

28 Sep 16:50
f108174
Compare
Choose a tag to compare

Module aliases were mostly all to the global namespace, so they have been removed to prevent namespace stomping.

Remove development dependency on ruby-prof

28 Sep 14:44
239a28f
Compare
Choose a tag to compare

Removes development dependency on ruby-prof profiling gem