MarcusBarnes / mik

The Move to Islandora Kit is an extensible PHP command-line tool for converting source content and metadata into packages suitable for importing into Islandora (or other digital repository and preservations systems).
GNU General Public License v3.0
34 stars 11 forks source link

Work on #461 - Inconsistent default configuration between toolchains #470

Closed mjordan closed 6 years ago

mjordan commented 6 years ago

Github issue: (#461 )

What does this Pull Request do?

Makes the default child sequence separator in the CSV compound toolchain consistent with the page sequence separator in the CSV books and newspapers toolchains (i.e., a hypehn).

What's new?

Changed the default separator in the CsvCompound writer class and input validator class, and renamed test files to use that separator. Also marked the testCsvCompoundInputValidator() test as skipped (see below).

How should this be tested?

Running phpunit in the mik directory should should pass, but now, two tests are reported as skipped. As I tried to get testCsvCompoundInputValidator(), unrelated tests started failing. There is obviously something unrelated wrong with our tests for the CSV Compound toolchain, a suspicion supported by also skipped testWritePackages() test in CsvCompoundToolchainTest.php.

To test the change, unzip the attached zip file and run MIK (after modifying any paths in the .ini file to suit your system). The output should be as expected. To test changing the default separator, swap:

input_directory = "issue-461/dash"
; input_directory = "issue-461/underscore"

and uncomment

; child_sequence_separator = '_'

and rerun mik. All output should be as expected.

Additional Notes

We will need to update https://github.com/MarcusBarnes/mik/wiki/Toolchain:-CSV-compound-objects to indicate the new default, and also add a note about when the default was changed.

Interested parties

@bondjimbond

issue-461.zip

mjordan commented 6 years ago

Cool, I'll update the wiki page and close the issue. Thanks for testing.