Releases: lyrasis/kiba-extend
Adding documentation, refactoring, adjusting tests
This is a maintenance release that does what it says in the title...
File registry, reusable jobs, new transforms
Adds support for a project file registry for use in configuring jobs in a simple way
Adds Jobs, including:
- the abstract
Kiba::Extend::Jobs::BaseJob
, which provides the general interface for jobs Kiba::Extend::Jobs::Job
, which takes one Source file, one Destination file and 0-n Lookup filesKiba::Extend::Jobs::TestingJob
, which supports an Enumerable source and Lambda destination- several mixin sources to decorate or otherwise change the behavior of a job
Adds Helper::ExampleFormatter
to help with creating documentation that is aligned with specs
Adds Extract::Fields
and Deduplicate::Table
transforms
Add `Take::First` transform
Takes (i.e. keeps) the first value from a multivalued field
Breaking: Split::IntoMultipleColumns now requires max_segments param
Kiba processes data one row at a time. No single row knows about the qualities of other rows.
Also, it is expected that rows will all have the same fields.
Therefore, it was a problem if one row's value was going to be split into 5 columns, while another row's would be split into 2 columns.
Now you have to tell the Split::IntoMultipleColumns
transform how many columns to create. These will be created for all rows and filled in with nil
(blank in output spreadsheet) if the split value doesn't fill them all in for a given row.
This is a breaking change To fix any errors, provide a value for the max_segments
parameter when calling this transformation.
Underlying code stuff that should not affect use
- Use activesupport instead of facets
- Clean up Gemfile
- Handle loading all .rb files automatically
Enhance `Clean::AlphabetizeFieldValues`
- Move the
delim_only?
helper method toTransforms::Helpers
and add tests and documentation for it - Add
field_values
method toTransforms::Helpers
to support refactoring - Enhance
Clean::AlphabetizeFieldValues
to improve:- ability to handle %NULLVALUE% as blanks in the sort
- ability to set sort direction
- sort ignores non-alphanumeric and space characters
Fix handling prepending field if target blank or prepend is multival
For target_field
=';foo' and prepended_field
='q', it was returning
'q: ;q: foo'. Now it returns ';q: foo'
For target_field
=';foo' and prepended_field
='q;t', it was returning
'q: ;t: foo'. Now it returns ';t: foo'
For target_field
='foo;bar;baz' and prepended_field
='q;t', it was returning
'q: foo;t: bar;t:baz'. Now it returns 'q: foo;t: bar;baz'
Use Rubocop; minor refactoring, fixes
- Add Rubocop to project
- Do initial autocorrections and a bit of minor refactoring and reformatting
Should not affect function of code, but one never knows what invisible oddities may have crept in.
`Prepend::FieldToFieldValue` with multi-value prepended field
- Makes
Prepend::FieldToFieldValue
work with multi-value prepended field - Refactors
Explode::ColumnsRemappedInNewRows
- Improves test cases/coverage for several transforms
- Adds documentation (60.62% documented)
add Prepend::FieldToFieldValue transform
- add Prepend::FieldToFieldValue transform
- make add Prepend::ToFieldValue transform work for multivalued fields