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

Issue 403 - add Excel fetcher. #404

Closed mjordan closed 7 years ago

mjordan commented 7 years ago

Github issue: #403

What does this Pull Request do?

Adds a fetcher capable of reading Excel (.xlsx) files. This fetcher is a drop-in replacement for the Csv fetcher in Csv toolchains.

What's new?

How should this be tested?

This change is testable. To test:

  1. Check out the issue-403 branch.
  2. Run composer update or equivalent on your system.
  3. Run the PHPUnit tests: phpunit --exclude-group inputvalidators --bootstrap vendor/autoload.php tests. You should get 49 tests, 69 assertions.
  4. When you check out master branch again, you probably should rerun composer update.

Additional Notes

We'll need to document the new Excel fetcher. Consistent with #372 and #373, I'm thinking something like https://github.com/MarcusBarnes/mik/wiki/Cookbook:-Templated-Metadata-Parser plus a mention in all the Csv toolchain wiki pages as an allowed option for [FETCHER] class. Draft is at https://github.com/MarcusBarnes/mik/wiki/Cookbook:-Using-the-Excel-fetcher (toolchain docs not updated yet).

I've tested this new fetcher on Linux and Windows with CsvToMods and Templated metadata parsers, and appears to work as intended.

Interested parties

@MarcusBarnes

@whikloj this is an example of the 'testable' workflow I mentioned in #402.

MarcusBarnes commented 7 years ago

Looks good. Running PHPUnit locally, I got OK (49 tests, 69 assertions) as expected. Thank you @mjordan.

mjordan commented 7 years ago

Thanks for testing, having this in master will make work on #408 a lot easier.