Package: tripoli
Tripoli: IIIF Document Validation=================================.. image:: https://travis-ci.org/DDMAL/tripoli.svg?branch=master:target: https://travis-ci.org/DDMAL/tripoli.. image:: https://coveralls.io/repos/github/DDMAL/tripoli/badge.svg?branch=master:target: https://coveralls.io/github/DDMAL/tripoli?branch=masterTripoli is a validator for documents conforming to the `IIIFpresentation API 2.1 <http://iiif.io/api/presentation/2.1/>`__. It makesit easy to validate documents, apply provider specific heuristics, andeven correct documents while they are being validated.Documentation-------------Detailed documentation is available athttp://tripoli.readthedocs.io/en/latest/Installation------------Python 3.5+ is required to run Tripoli. You can install Tripoli using pip... code:: bash> pip install tripoliQuick start-----------Once installed, it's easy to start validating. Tripoli can validate theentire document, and will log informative errors and warnings withhelpful paths... code:: python>>> from tripoli import IIIFValidator>>> iv = IIIFValidator()>>> iv.validate(some_manifest)Error: Field has no '@language' key where one is required. - data['metadata']['value']Error: viewingHint 'pages' is not valid and not uri. - data['sequences']['canvases']['viewingHint']Warning: logo SHOULD be IIIF image service. - data['logo']Warning: manifest SHOULD have thumbnail field. - data['thumbnail']Warning: Unknown key 'see_also' in 'manifest' - data['see_also']Warning: ImageResource SHOULD have @id field. - data['sequences']['canvases']['images']['@id'].. :changelog:Release History---------------2.0.0 (2018-02-22)++++++++++++++++++Tripoli v2.0.0 is functionally equivalent to v1.2.2. The major version number is being incrementedto mirror the IIIF Presentation API version it supports. Tripoli v3 will only support PresentationAPI v3.1.2.1 (2017-10-11) / 1.2.2++++++++++++++++++**Improvements**- Unit testing improvements and enhanced coverage- Enhanced testing fixtures- Travis-CI builds and Coveralls integration**Bugfixes**- Multiple sequences are now correctly validated.- Canvas images are more thoroughly checked for their values.NB: 1.2.2 is the same as 1.2.1, but incremented to try and address an issue withdistributing via PyPI.1.2.0 (2017-05-04)++++++++++++++++++**Improvements**- Configuration arguments for the basic IIIFValidator can now be passed in via kwargson the `__init__` function. A validator can now be instantiated with all its settingsin one line.**Bugfixes**- Web interface now specifically mentions that tripoli is for validating IIIF Manifests.1.1.4 (2016-08-23)++++++++++++++++++**Bugfixes**- Fixed an issue with the default values of REQUIRED_FIELDS (and other field sets)being empty dicts instead of empty sets.1.1.3 (2016-08-23)++++++++++++++++++**Bugfixes**- A warning message regarding uncertain HTML tags has been fixed to include the nameof the tag.1.1.2 (2016-08-22)++++++++++++++++++**Improvements**- Added IIIF manifest test suite to tests, ensuring that each throws an error. Anumber of new errors and warning have been added to this end.- Faster hash algorithms for ValidatorLogEntries increasing overall performance.- Added HISTORY.rst to track bugfixes and improvements.- README.rst and HISTORY.rst will be automatically read into the setup.py long_descriptionfield (idea taken from requests).**Bugfixes**- ``ViewingHint`` is now a common field which can be checked on any resource.- ``startCanvas`` is now validated properly.- ``Annotation`` no longer logs a warning if it has a ``@context`` field.- ``ImageResource`` now must have ``@type`` 'dctypes:Image'.- Presence of XML Comments or CDATA sections will cause an error to be logged.- Fixed exception when ``IIIFValidator`` could not discern the ``@type`` of a resource.1.1.1 (2016-08-18)++++++++++++++++++**Bugfixes**- A bug was preventing ``descriptions`` from being validated in all resources.This has been fixed.1.1 (2016-08-18)++++++++++++++++**New Features**- Added HTML validation. This will check that only fields which are allowedto contain HTML have it, that the HTML is valid, and that only allowed tagsand attributes are included.- Added indices in error and message paths. These indices make it easier tofigure out exactly which canvas is failing with an error (if indeed only afew are failing).- Added unique/non unique error aggregation. Using a ``unique_logging` propertyon a ``IIIFValidator``, users can decide whether all errors and warnings will beaggregated, or only unique ones. Here, unique means that only one instance ofeach error/warning per resource will be saved (that is, if every canvas has errorA, then only the first instance of a canvas with error A will be saved).- Added ``verbose`` property to ``IIIFValidatior``. When ``True``, every error andwarning will be logged immediatly to the screen when hit.**Bugfixes**- ``Annotations`` no longer log a warning when they are missing an ``@id`` field.