Bug #11076

Policy/implementation validation output in METS is excessive

Added by Sarah Romkey over 4 years ago. Updated over 4 years ago.

Status:QA/ReviewStart date:04/13/2017
Priority:MediumDue date:
Assignee:-% Done:

0%

Category:-
Target version:Release 1.7.0
Google Code Legacy ID: Pull Request:https://github.com/artefactual/archivematica/pull/557
Sponsored:No Requires documentation:

Description

To reproduce-

- testing on dev/issue-9478-preforma
- replace the placeholder mediaconch policy with:

import sys
from ammcpc import MediaConchPolicyCheckerCommand

# Valuate this constant with the text (XML) of the policy.
POLICY = """ 
<?xml version="1.0"?>
<policy type="and" name="NYULib_MKVFFV1_MODIFIED" license="CC-BY-SA-4.0+">
  <description>Attempt to re-implement the NYULibraries_MKVFFV1.xsl policy file of MediaConch XML v. 0.1 as a v. 0.3 .xml policy</description>
  <rule name="General Format equals Matroska" value="Format" tracktype="General" occurrence="*" operator="=">Matroska</rule>
  <rule name="Video Format is FFV1" value="Format" tracktype="Video" occurrence="*" operator="=">FFV1</rule>
  <rule name="Video CodecID equals FFV1" value="CodecID" tracktype="Video" occurrence="*" operator="=">V_MS/VFW/FOURCC / FFV1</rule>
  <rule name="Video Width equals 720 (pixels)" value="Width" tracktype="Video" occurrence="*" operator="=">720</rule>
  <rule name="Video Height equals 486 (pixels)" value="Height" tracktype="Video" occurrence="*" operator="=">486</rule>
  <rule name="Video DisplayAspectRatio equals 4:3 (1.333)" value="DisplayAspectRatio" tracktype="Video" occurrence="*" operator="=">1.333</rule>
  <rule name="Video ColorSpace equals YUV" value="ColorSpace" tracktype="Video" occurrence="*" operator="=">YUV</rule>
  <rule name="Video ChromaSubsampling equals 4:2:0" value="ChromaSubsampling" tracktype="Video" occurrence="*" operator="=">4:2:0</rule>
  <rule name="Video BitDepth equals 8 (bits)" value="BitDepth" tracktype="Video" occurrence="*" operator="=">8</rule>
  <rule name="Audio Format equals PCM" value="Format" tracktype="Audio" occurrence="*" operator="=">PCM</rule>
  <rule name="Audio Channels are greater or equal than 1" value="Channels" tracktype="Audio" occurrence="*" operator="&gt;=">1</rule>
  <rule name="Audio SamplingRate is greater or equal than 48 kHz (48000)" value="SamplingRate" tracktype="Audio" occurrence="*" operator="&gt;=">48000</rule>
  <rule name="Audio BitDepth is greater or equal than 16-bit" value="BitDepth" tracktype="Audio" occurrence="*" operator="&gt;=">16</rule>
</policy>
""".strip()

# Valuate this constant with the name of the policy.
POLICY_NAME = 'NYULib_MKVFFV1_MODIFIED.xml'

if __name__ == '__main__':
    target = sys.argv[1]
    policy_checker = MediaConchPolicyCheckerCommand(
        policy=POLICY,
        policy_file_name=POLICY_NAME)
    sys.exit(policy_checker.check(target))

- enable command
- enable rule for mkv file
- create transfer using /acceptance-tests/preforma/all-conform-policy-originals
- ensure check policies on originals is enabled in configuration

See resulting METS file. I'm not sure what the eventOutcomeDetailNote should include exactly, but it's clearly repetitive/excessive!

Joel, can you look at this as part of release planning?

crazy_policy_validation.xml Magnifier (91.9 KB) Sarah Romkey, 04/13/2017 06:47 PM

crazy_implementation_check.xml Magnifier (89.3 KB) Sarah Romkey, 04/25/2017 04:15 PM

History

#1 Updated by Sarah Romkey over 4 years ago

I just noticed that similar output is coming from implementation checks as well, see attached.

#2 Updated by Sarah Romkey over 4 years ago

  • Subject changed from Policy validation output in METS is excessive to Policy/implementation validation output in METS is excessive

#3 Updated by Joel Dunham over 4 years ago

  • Status changed from New to Code Review
  • Assignee changed from Joel Dunham to Nick Wilkinson
  • Pull Request set to https://github.com/artefactual/archivematica/pull/634

This should be fixed by the following commits in the appropriate PRs:

- commit 47538131f3fc0f0367e99c124a6fe6451ac55bfa in https://github.com/artefactual/archivematica-fpr-admin/pull/35
- commit e6bad33ad0985445509a418aadf636263bd76501 in https://github.com/artefactual-labs/ammcpc/commits/master

A machine provisioned with AM branch dev/issue-9478-preforma-qa-1-x should no longer exhibit the excessive output behaviour. See the main AM PR:

- AM PR: https://github.com/artefactual/archivematica/pull/634

#4 Updated by Nick Wilkinson over 4 years ago

  • Assignee changed from Nick Wilkinson to Jesús García Crespo

Hi Jesús, assigning to you for CR.

#5 Updated by Jesús García Crespo over 4 years ago

  • Pull Request changed from https://github.com/artefactual/archivematica/pull/634 to https://github.com/artefactual/archivematica/pull/557

#6 Updated by Jesús García Crespo over 4 years ago

  • Status changed from Code Review to In progress
  • Assignee changed from Jesús García Crespo to Joel Dunham

LGTM

#7 Updated by Nick Wilkinson over 4 years ago

  • Status changed from In progress to QA/Review
  • Assignee deleted (Joel Dunham)

Merged to qa/1.x on July 13th.

Also available in: Atom PDF