Fork me on GitHub
#data-science
<
2019-11-15
>
chrisn18:11:34

@metasoarous Testing vega2pdf with invalid files means it produces simply invalid (empty) output. It doesn't validate its input nor does the vega-cli stuff ship with a validator. So vegan, which both provides a validator and always validates its input before it renders it has that advantage...Seems like validating vega is a thing that team doesn't give a care about. So one difference that may actually make a big difference in a production offline rendering workflow is you would actually see errors. I tried validating some invalid files with jsonlint (it can't handle the actual vega-lite schema) for instance and this seems a tough road. The vega editor uses ajv for validation (as does vegan)...

metasoarous19:11:45

@chris441 Interesting... You said they don't seem to care about validation; Have you seen them reject proposals in this direction, or are you inferring from lack of a feature like this presently? I've generally found the Vega team super receptive to suggestions, but if they're not open to that, it would certainly be some motivation for continuing to put energy into Vegan.

chrisn19:11:17

I haven't seen it worked into their system at a meaningful level. So that is what I mean about caring about validation. Fundamentally, I would expect it as an optional step in either compile or parse or both.

jsa-aerial23:11:22

I'm pretty sure the way this works is, if you have a schema reference in your spec, it will validate your spec otherwise it skips that step

chrisn23:11:10

At least using vg2pdf, an invalid file (with a schema) causes an empty pdf with no command line warnings or output of any kind. The only validation I have found in their system is built into their editor as a separate step using ajv. Here is the file for reference: https://github.com/cnuernber/vegan/blob/master/bar-chart.vgl.json

chrisn19:11:44

Especially considering how confusing or opaque the errors are at those levels when some things go down wrong.

✔️ 4
chrisn19:11:04

But you are exactly right on the intent, my next move should be to file a very polite issue and see what happens.

👍 4
jsa-aerial23:11:22

I'm pretty sure the way this works is, if you have a schema reference in your spec, it will validate your spec otherwise it skips that step