Hi Ryan, I have only the single static test in the RDFLib test suite for comparison, but it caters for most cases, I think! Yes, I admit it could be more methodical but I've just built on top of RDFLib's regular Turtle serializer so far, so there's little criticality in testing for everything as the worst case outcome is just regular turtle.
Here is the test file: https://github.com/RDFLib/rdflib/blob/main/test/test_serializers/test_serializer_longturtle.py You can see it's taking in JSON-LD data, to ensure no Turtle formatting is preserved, then comparing a serialization to a fixed string. Easy to add more data to cover more cases within the same test. I'm on leave at the moment but could look in to more issues here in a couple of weeks if needed. Cheers, Nick ------- Original Message ------- On Saturday, July 29th, 2023 at 23:43, Shaw, Ryan <[email protected]> wrote: > Nick, > > Do you have a set of test cases that you’ve been working with as you develop > the longturtle format? > > As I worked on the Jena implementation I was just testing in an ad hoc way, > and I’ve since noticed that I missed some edge cases. It would be nice to be > able to confirm that the RDFLib and Jena output are as close as possible. > > Thanks, > Ryan > > > On Jul 25, 2023, at 5:00 PM, Nicholas Car [email protected] wrote: > > > > Hi all, > > > > Please note that I've just today improved the longturtle format as it is > > implemented in RDFLib. The implementation now better aligns Blank Nodes, > > Collections and fixes a small semi-bug (two trailing blank lines). > > > > Jena users might just like to compare Jena's longturtle to the longturtle > > now implemented in RDFLib master branch. > > > > I think that longturtle will be the default turtle format in RDFLib 7.x due > > out soon (couple of months) as it's better fro Git and better for > > similarity with SPARQL. > > > > Cheers, Nick > > > > ------- Original Message ------- > > On Friday, June 23rd, 2023 at 22:40, Andy Seaborne [email protected] wrote: > > > > > On 23/06/2023 15:02, Shaw, Ryan wrote: > > > > > > > > On Jun 22, 2023, at 5:32 PM, Andy Seaborne [email protected] wrote: > > > > > > > > > > is it doing lists? > > > > > > > > Yes, with a newline for every list item as in rdflib’s longturtle. > > > > > > > > > More generally - > > > > > We have Jena 5.x coming up (at a minimum - require Java17) > > > > > > > > > > Should this become the default pretty layout? or some variant? > > > > > > > > I’m agnostic about making it the default. Maybe it should just be an > > > > option initially? > > > > > > Yes. > > > > > > I hope we can get this into Jena 4.9.0 accessible as a RDFFormat which > > > is "soon". > > > > > > Andy > > > > > > > > > How should I register a new RDFFormat (e.g. TURTLE_LONG)? > > > > > > Yes. > > > > > > > > 👍
