wrobstory/vincent — pull request #5 by dnmiller (2013-04-27 02:55:20+00:00)
Title: Enhancements to to_json function

I made some modifications to the `to_json` function of the Vega object if you're interested.

Some enhancements:
- The HTML template has an optional filename.
- The path of the data file is now specified by the user. It seems like a reasonable use case where the user wants the data file in a separate directory with a unique name.
- Added tests.

Some issues discovered along the way:
- `vega_template.html` required the JSON file to be named `vega.json` to work.
- HTML file would only generate if `split_data` was True. This shouldn't be necessary.

Note that I used the mock library for testing, so running the unit tests now requires either mock or Python > 3.3 to be installed.

Comments are welcome.