cjcodeproj / medialibrary

Python code to read XML media files
MIT License
2 stars 0 forks source link

Validation tool should work at the media level. #118

Closed cjcodeproj closed 1 year ago

cjcodeproj commented 1 year ago

The validation tool should work at the media level, for the purpose of checking all data.

cjcodeproj commented 1 year ago

The validation code should be an extensible framework for running tests against the data.

Any class structure under media.data should be testable by a separate validation class. Those classes will probably sit under media.validation.

Ex, validating data in the class media.data.media.contents.generic.catalog.Catalog() would be validated against a class called media.validator.media.contents.generic.catalog.Catalog().

Rules:

cjcodeproj commented 1 year ago

Design Notes:

The validator class will probably operate as follows:

  1. Initialization of object.
  2. Loading a class which references a suite of testing classes to also be loaded.
  3. Loading of media objects.
  4. Run suite of applicable tests against every media object. IE, only run the tests suitable to the loaded media/
  5. Return an object that contains all scoring information.
cjcodeproj commented 1 year ago

Additional features:

cjcodeproj commented 1 year ago

Additional features/notes:

cjcodeproj commented 1 year ago

Definitions:

cjcodeproj commented 1 year ago

Commit: https://github.com/cjcodeproj/medialibrary/commit/ec9315bb21db136e50f08ec7da3b1fbb51e030a0

cjcodeproj commented 1 year ago

Framework has been built:

Main validation tool is now media.tools.media.validate

Notes:

Operation of the validator is pretty easy, from a high-level code perspective.

cjcodeproj commented 1 year ago

Pull request (merged).

https://github.com/cjcodeproj/medialibrary/pull/129