pkp / ots

PKP XML Parsing Service
GNU General Public License v3.0
32 stars 19 forks source link

Clean up final job stage page #28

Closed crism closed 8 years ago

crism commented 9 years ago

Filter output documents; only list the ones of interest to a user, and integrate the descriptions of the files into that list as well.

crism commented 8 years ago

The config file should enumerate the stages whose output is considered “interesting.” The Manager\Entity\Job class should have a method for enumerating only over the “interesting” output documents. ZipConversion\Model\Queue\Job\ZipJob and Manager/view/manager/manager/details.phtml should use that method when creating their lists.

crism commented 8 years ago

Functionality to support this is all in place, and the tests pass, but when I try to use it to build the zip file, it fails. I can’t figure out why. If anyone else wants to look at the commit that should hit in a moment, I would love any suggestions…

crism commented 8 years ago

Because Job is persisted in the database by Doctrine, and the configuration is not mapped to the database, the configuration is lost and unavailable.

crism commented 8 years ago

Sorted. Zip creation is now working. Next:

  1. Naming: the singular XML file should be called document.xml regardless of its provenance. This means renaming the meTypeset- and CERMINE-produced XML files, renaming the merge product, and causing the merge to rename the CERMINE-produced file if there was no WP input for meTypeset.
  2. Bringing this logic to the output file listing as well (details.phtml).
crism commented 8 years ago

@axfelix, I’m not sure the list of output documents I’ve chosen in global.php is the one you actually want, but it should Just Work if you change those.

axfelix commented 8 years ago

Excellent, thanks. Will tweak.

crism commented 8 years ago

This will require:

  1. vendor/doctrine/doctrine-module/bin/doctrine-module -v orm:schema-tool:update --force
  2. In the database, UPDATE job SET config="a:1:{s:7:\"outputs\";a:11:{i:0;i:15;i:1;i:16;i:2;i:14;i:3;i:3;i:4;i:4;i:5;i:6;i:6;i:7;i:7;i:11;i:8;i:8;i:9;i:9;i:10;i:10;}}"; The actual values of the database UPDATE don’t actually matter, as they’ll only affect still-in-process jobs, but if left NULL, the job listing will choke and die.
crism commented 8 years ago

OK, the problem is that some of our output documents have hardcoded names (e.g. document.epub) while others derive their names from the name of the input document. This leads to possible collisions if the input document is something like document.odt, and that’s what’s been screwing me up.

crism commented 8 years ago

Sorted.