trungdong/prov — pull request #56 by krischer (2014-07-31 14:18:35+00:00)
Title: Convenience read() method with a lazy format detection.

This PR adds a convenience deserialization method to prov with a lazy format autodetection. It enables the following:

```python
import prov

doc = prov.read("provenance.json")
```

The format autodetection is performed by looping through all known deserializers and trying if they work. This is fairly fast assuming the deserializers fail fast and early which they should. It would of course be possible to perform a more advanced format detection but I frankly don't think its worth the effort or necessary.

A disadvantage of the current approach is that is hides errors. It is also possible to pass the format to the function in which case the format detection is skipped and proper errors will be raised.

One should also add tests once the PROV XML support has been merged. Right now there only is one format.