{"action":"created","issue":{"url":"https://api.github.com/repos/MarcusBarnes/mik/issues/460","repository_url":"https://api.github.com/repos/MarcusBarnes/mik","labels_url":"https://api.github.com/repos/MarcusBarnes/mik/issues/460/labels{/name}","comments_url":"https://api.github.com/repos/MarcusBarnes/mik/issues/460/comments","events_url":"https://api.github.com/repos/MarcusBarnes/mik/issues/460/events","html_url":"https://github.com/MarcusBarnes/mik/pull/460","id":306941958,"number":460,"title":"Issue 421 - allow page-level OCR files in MIK input for CSV Books","user":{"login":"mjordan","id":403918,"avatar_url":"https://avatars1.githubusercontent.com/u/403918?v=4","gravatar_id":"","url":"https://api.github.com/users/mjordan","html_url":"https://github.com/mjordan","followers_url":"https://api.github.com/users/mjordan/followers","following_url":"https://api.github.com/users/mjordan/following{/other_user}","gists_url":"https://api.github.com/users/mjordan/gists{/gist_id}","starred_url":"https://api.github.com/users/mjordan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mjordan/subscriptions","organizations_url":"https://api.github.com/users/mjordan/orgs","repos_url":"https://api.github.com/users/mjordan/repos","events_url":"https://api.github.com/users/mjordan/events{/privacy}","received_events_url":"https://api.github.com/users/mjordan/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2018-03-20T16:28:59Z","updated_at":"2018-03-20T19:54:43Z","closed_at":null,"author_association":"COLLABORATOR","pull_request":{"url":"https://api.github.com/repos/MarcusBarnes/mik/pulls/460","html_url":"https://github.com/MarcusBarnes/mik/pull/460","diff_url":"https://github.com/MarcusBarnes/mik/pull/460.diff","patch_url":"https://github.com/MarcusBarnes/mik/pull/460.patch"},"body":"**Github issue**: (#421)\r\n\r\n# What does this Pull Request do?\r\n\r\nAdds the ability to include page-level OCR for book pages in the MIK CSV Book input. Use case here is that the OCR is generated outside Islandora. The CSV Newspapers toolchain already has this capability.\r\n\r\n# What's new?\r\n\r\nChanges to the CSV Books Writer class and CSV Books Input Validator class files that parallel those in the CSV newspaper classes. \r\n\r\n# How should this be tested?\r\n\r\nThis change does not include PHPUnit tests, so it needs to be smoke tested. However, PHPUnit tests continue to pass.\r\n\r\nTo smoke test:\r\n\r\n1. Check out the issue-421 branch.\r\n1. Unzip the file attached to this PR, which includes test configuration and data.\r\n1. Adjust the paths in issue-421.ini to suit your system\r\n1. Test the new functionality by running `php mik -c issue-421.ini`. The book ingest packages that are created by MIK should have OCR.txt files in all page-level directories.\r\n1. Test that the input validator works by deleting the output and temp directories and changing the `input_directory` value to `input_directory = \"issue-421/files_no_text\"` in your .ini file and rerunning MIK. Since the input directories do not contain OCR files, MIK will not produce any ingest packages and the input_validator log will indicate that there are missing OCR files.\r\n1. Test that this PR works when there are not OCR files in the input directories, by deleting the output and temp directories and changing changing `log_missing_ocr_files` in your .ini file to FALSE and rerunning MIK. The output should be ingest packages that do not contain OCR.txt files. No problems should appear in any of the log files. `log_missing_ocr_files` has a default value of 'FALSE', so not including it in your .ini file will preserve the same behaviour that existed prior to this PR.\r\n\r\n[issue-421.zip](https://github.com/MarcusBarnes/mik/files/1822840/issue-421.zip)\r\n\r\n# Additional Notes\r\n\r\nAny additional information that you think would be helpful when reviewing this PR.\r\n\r\nExample:\r\n\r\n* Does this change require documentation to be updated? \r\n\r\nYes. The section in the CSV Newspapers toolchain wiki page \"Including page-level OCR files\" can be adapted for the CSV Books wiki page.\r\n\r\n* Does this change add any new dependencies? \r\n\r\nNo.\r\n\r\n* Could this change impact execution of existing code?\r\n\r\nYes, but test data demonstrates that it doesn't.\r\n\r\n# Interested parties\r\n\r\n@bondjimbond @MarcusBarnes \r\n"},"comment":{"url":"https://api.github.com/repos/MarcusBarnes/mik/issues/comments/374734912","html_url":"https://github.com/MarcusBarnes/mik/pull/460#issuecomment-374734912","issue_url":"https://api.github.com/repos/MarcusBarnes/mik/issues/460","id":374734912,"user":{"login":"bondjimbond","id":6069170,"avatar_url":"https://avatars1.githubusercontent.com/u/6069170?v=4","gravatar_id":"","url":"https://api.github.com/users/bondjimbond","html_url":"https://github.com/bondjimbond","followers_url":"https://api.github.com/users/bondjimbond/followers","following_url":"https://api.github.com/users/bondjimbond/following{/other_user}","gists_url":"https://api.github.com/users/bondjimbond/gists{/gist_id}","starred_url":"https://api.github.com/users/bondjimbond/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bondjimbond/subscriptions","organizations_url":"https://api.github.com/users/bondjimbond/orgs","repos_url":"https://api.github.com/users/bondjimbond/repos","events_url":"https://api.github.com/users/bondjimbond/events{/privacy}","received_events_url":"https://api.github.com/users/bondjimbond/received_events","type":"User","site_admin":false},"created_at":"2018-03-20T19:54:43Z","updated_at":"2018-03-20T19:54:43Z","author_association":"COLLABORATOR","body":"Ah, that did the job! Thanks. I'd bet this would be kind of a stumbling block, though; could a note on the use of `validate_input = false` to allow for a mix of ocr/non-ocr be added to the toolchain's documentation?"}}
{"actor":{"display_login":"bondjimbond"}}