Closed mromanello closed 2 years ago
I would love to help out!
Hi @mromanello and @Grantglass ! As a user I would really love to have this. I do not find the IIIF one terribly useful however, if I may. beside checking json syntax and the ld part by making sure the context is there and is real I would love if a validator would inform me on
Unfortunately, this hack idea did not take off (for lack of time). But I'm pasting here the preparatory notes/brainstorming I've jotted down while thinking about implementation.
Aspects to be tested/validated:
syntax/formal aspects
coherence
validity/completeness
functionality
Implementation idea
Basically an adaption of the IIIF image validator
Core classes:
Class | Description |
---|---|
TestSuite |
A collection of tests to run against a given DTS API. It has a run_test() method to run each test, as well as methods to find and list them (list_tests() ) |
DTS_API |
Object responsible for building and making API calls to the DTS instance under validation. TestSuite.run_test() passes as input the test name and an instance of DTS_API |
BaseTest |
Class that each test class will have to extend. Defines basic behaviour and information related to each test. Each test has a run() method which takes in input an instance of DTS_API and tests a certain aspect. |
Validator |
This classes uses the Bottle Python framework to create an API/web service. |
ValidationInfo |
object that gets passed around to each test by TestSuite , so that validation infos are stored in it via ValidationInfo.check() |
Other stuff
validating API responses for all resources vs validating for a sample
how to present the validation results? ideally a JSON summary that is both machine- and human- readable/renderable. This way it can be displayed for humans and also read by machines (clients, services, etc.)
Proponent / Mentor
Matteo Romanello (@mromanello)
Brief Description
(I believe this came up during the hackathon info session, but I can't recall exactly by whom, sorry!) The idea is to develop a validation tool for the DTS API, along the lines of IIIF's validators for the image- and presentation-APIs (see https://github.com/IIIF/image-validator and https://github.com/IIIF/presentation-validator). Such a tool would be extremely valuable to developers for testing new DTS API implementations. The front-end can be kept extremely simple. The bulk of the work would be define validation tests based on the current specs.
Coding skills needed
Javascript, Python
Team members (if applicable)
Anyone with the above (or a comparable) set of skills is welcome to join this hack.