-
-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
better structure test suite to make clear what's required of CSL implementers #17
Comments
For illustration, this:
... could become:
... or maybe we allow a YAML header of something like this (standard, and much more compact):
The above would say the same behavior applies across both 1.0 and 1.1. Perhaps we have a directory structure that would correspond to generated documents (though current file names already have this sort of structure); like:
It does seems like the existing tests have enough info to largely automate this conversion as a first pass (version can be derived from embedded CSL, for example), and then human could add anything else as time permits, or they need to deal with a particular test or test section. |
Hmm .... here's a problem with automating a key part of this; was hoping we could somehow test on the embedded CSL, but it turns out ...
E.g. it seems that there's no version distinction based on csl vs csl-m? |
Maybe there are no csl-m tests in this repo? |
That would be great; if effectively there were only a handful that slipped through? |
Have you had a look a jest-csl? Concering
Maybe something like this:
??? |
No, but that looks really promising! It uses YAML. Where the hell is @cormacrelf anyway; seems we could use his help ;-) Not just because of jest (and because I look forward to a complete citeproc-rs!), but because he's the most recent developer to work his way through a full CSL implementation. Oh, and sure on your suggestion; I just floated a concrete strawman to get the ball rolling. Might be jest has some better ideas. |
I have to admit that I don't always understand which features require csl-m version attribute. Some csl-m features seem to work also with |
This test viewer is pretty nice too: https://cormacrelf.github.io/citeproc-rs-test-viewer/ Am curious about those "ignored" ones. And then there's this: https://github.com/cormacrelf/citeproc-rs#running-the-csl-test-suite The yaml format? |
His "ignore" list, with explanation: One possibility immediately, then, is to add his list to our test directory, with our preface? |
Until #17 is addressed, this borrows the ignore.txt list from the citeproc-rs project, with explanation, to provide guidance to implementers on which tests they should ignore.
Until #17 is addressed, this borrows the ignore.txt list from the citeproc-rs project, with explanation, to provide guidance to implementers on which tests they should ignore.
I'm going to close this for now, as I think we've done what we can quickly. The bigger and broader changes (though it should be feasible to automate a lot of what I suggest I think) will be necessary as we move towards v1.1, but those will have to wait. |
To confirm, tests that exercise CSL-M style code have a version of |
So at this point, @fbennett, the only issues in the files in this repo may be where spec and test need to be aligned? And are you saying in the cslm test repo, you are also using a "version" variable? |
There may still be some things in there that need weeding out. If you come across any culprits, let me know and I'll move them out to the other repo. On version markers and description, YAML would be good. Also, it might be helpful to both style and processor developers to assign tags to the fixtures, to indicate features that each is meant to exercise, maybe to indicate the "level" of CSL complexity reflected in the test, and to flag things that may want editorial attention (such as fixtures with unnecessarily verbose CSL). I guess something like that would start with a controlled and curated list of tag names. |
YAML would be better, but how sensitive is all this to change?
|
If a team dug into it, the choices of syntax and content constraints should be made carefully, of course. |
So sounds like maybe I should add |
This arises from #13 and #16. What I concluded on the former issue is:
What I'm contemplating is we need to add three additional parameters or sections to the tests; perhaps:
My thought is that we do this in such a way that a processing spec can (at least mostly) be auto-assembled without additional work.
If we do this right, the tests themselves become definitive, very clear, and the documentation can be directly tied to them.
While it would take time, this seems the quickest path to addressing the concerns in the linked issue, in iterative ways that fit existing resource constraints.
I realize it's more complicated than this (for example, multiple tests will often describe one larger processing logic), but hopefully those are solvable problems.
Not sure about whether subdirs would be necessary with this approach, but it might wise to at least separate CSL-M?
@citation-style-language/schema-pr-reviewers
The text was updated successfully, but these errors were encountered: