-
Notifications
You must be signed in to change notification settings - Fork 87
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
Update examples ... #783
Comments
I came here to create an issue about the examples, so I hope this is all valuable input for this ticket instead. I have been working on a new parser and ran into several issues with the examples.
It would be very helpful if the text examples were directly parseable like the json is. They all contain explanations at the top which prevents reading them in as input without modifying them. A centralized readme with the explanations in a table would be a nice alternative. And several of the text files include alternatives within the file whereas the json is split apart into a and b files. It would also be extremely useful for testing new implementations to have more official examples. There are many things that they don't cover and most are very simple. I think these would be nice to have:
If I can contribute anything useful here I am willing to help out as well. I am going to attempt to automatically generate some additional tests myself, but I am not sure how useful they may be to others. Their intent will be coverage on the grammar and not necessarily make any practical sense. |
Meeting 2023-02-15: @pvretano is working on a pull request and merge it once it is done. @eseglem - if you have examples, please send them to pvretano@cubewerx.com and he will include them, many thanks! |
@cportele I have not generated much that is useful yet but I am still working on it. The first attempt was very naive and produced a lot of useless examples. Technically valid within the schemas but not actually usable. If / when I end up with anything useful I will share it. |
Meeting 2023-02-27: @pvretano is working on the PR and also adds additional examples so that we cover all aspects. The goal is to have it ready by the next meeting. |
Finally got my parser to a spot I felt comfortable putting it out there. Its here: https://github.com/eseglem/pycql2 Its still a work in progress but I have 57 examples so far in These were mostly hand generated, with some randomization of parts. No auto generation yet, but that is still in the plans. As I mentioned before, I was aiming for coverage, and not necessarily making things completely logical. I did attempt not to do anything too weird but wasn't worried about property names or exact values making much sense. For example the geometries should mostly be valid GeoJSON but may not be 'valid' in the sense that they could self intersect and things like that. |
With all the recent (and upcoming) changes to CQL2 some of the examples are out of date and need updating. I've created this issue and assigned it to me to do a sweep of the examples to make sure that they align with the current state of the text in the standard.
The text was updated successfully, but these errors were encountered: