acl-org / acl-anthology

Data and software for building the ACL Anthology.
https://aclanthology.org
Apache License 2.0
444 stars 300 forks source link

Tests for BibTeX <-> XML conversion #201

Open davidweichiang opened 5 years ago

davidweichiang commented 5 years ago

I routinely test the BibTeX to XML conversion by converting all the old BibTeX files and diffing them. I assume that's too big for CI, right? But maybe we should make a small set of tough cases.

mbollmann commented 5 years ago

We're currently building the full site in CI, so I doubt this would be too big, as long as the tests are reliable (and run in a reasonable amount of time).

davidweichiang commented 5 years ago

Oh, ok. So the test would simply involve diffing the .bib files against the previously-built ones?

I guess the reverse (bib->xml) direction is not under the Anthology, so not worth discussing here.

mbollmann commented 5 years ago

You can run a script that interacts with the .bib files as they are produced during the build, yes. I'm not sure what exactly you'd be trying to do, since a plain diff would also produce mismatches if the fields were in a order or formatted differently, which is certainly not what you want?

But as long as there's a command that reliably exits with 0 if all is okay, and with 1 (or sth else) only if there actually is a clear error, then it can be integrated into CI.