test data?

So I mentioned recently an idea that’s some up before: having some test
data to use for style previewing (and maybe implementation testing).

I was wondering if it might make sense to start on this, using a simple
JSON/YAML syntax that maps to the CSL model rather directly? E.g.
something like:

{
“type”: “journalArticle”,
“dateIssued”: “2000-01-01”,
“title”: “Some Title”,
“containerTitle”: “ABC Journal”,
“volume”: “23” ,
“issue”: “3”,
“pages”: “121-145”,
“url”: “http://ex.net/1”,
“dateAccessed”: “2007-11-12”,
“authors”: [
{ “name”: “Doe, Jane” },
{ “name”: “Smith, John” }
]
}

The above ought to work with both JS and YAML parsers I believe.

If this makes sense, I can commit a file for people to add to.

Bruce

PS - Am realizing it perhaps wasn’t a good idea to use hyphens in
variable names :wink:

Yes, that’s a great idea as it will be implementation-neutral.

Thanks,
Peter

This is an excellent idea. I’ve been working on a similar approach with
the bibliontology model, but that of course is not implementation-neutral.

Regards,

Liam.

Bruce D’Arcus wrote:> So I mentioned recently an idea that’s some up before: having some test

Liam wrote:

This is an excellent idea.

OK, I’ve added a data directory with a test_data.txt file. Those of you
who work with YAML and/or JSON, take a look and see if it’s sensible.

I’d like to start with a handful of examples that really show a lot
(ideally, sorting, substitution, et al, etc.). I suppose it’d be good if
we could have real examples ultimately if we’re going to use them for
previewing (seems more professional I guess).

Bruce

Yes, I agree with this too. It would save a lot of time writing fixtures
for each implementation. It might also be useful to have some examples
of expected outputs of the test data in various styles as well.

Regards,

Liam.

Bruce D’Arcus wrote:> Liam wrote: