From angelo at gladding.name Wed Jul 14 21:11:22 2010 From: angelo at gladding.name (Angelo Gladding) Date: Wed Jul 14 21:16:27 2010 Subject: [uf-dev] `microformats` and a universal test suite Message-ID: I originally posted the following to microformats-discuss. Sorry for the duplicate. - - - Hello all, I am currently writing a universal parser [1]. It goes by the name `microformats` because I intend it to be as close as possible to a canonical codification of all things Microformats. This will be accomplished by codifying each specification in a Python module using what can best be described as a domain-specific language. See the `adr` definition [2] and accompanying tests [3]. Each definition file will contain as much spec-related information as possible. Each test suite will provide a series of HTML/ufJSON equivalents. A web interface (currently functional, but unreliable as I develop) acts as a web service for transformation and validation but also to summarize the current state of Microformats down to author tables and overall analysis of the lexicon. The code currently in the repository is a reduction of the current state of the project. I have defined 33 formats, ranging from proposal to spec, in the definition format. Additionally I have a buggy analysis module that renders DOT graphs of the entire lexicon [4] and subsections thereof. The scope is a bit wide but most is already written and output is finally beginning to look robust -- which leads me to my main point: - - - Is anyone interested in helping with the compilation of a universal test suite? I'd like to bring this up sooner than later as it is the one aspect of my project that requires community participation for it to be truly effective. In particular, I'd like to grab the ear of Toby Inkster and Mike Kaply and collaborate to standardize the results of Swignition, Operator, and `microformats`. The ultimate goal of the test suite is multi-part: - to have a concrete set of tests that will allow future implementors to be able to implement with confidence; - to have a common format for specification authors to be able to codify their designs; - and to provide a plethora of examples for content creators including *all* possible edge cases of all formats and patterns. I have had little luck pursuing my ventures via the wiki due to its rather ironic incapacity to implement microformats. The reasoning is understandable, though, so I suggest that we just keep this simple and rally around good old DVCS. I am aware of http://hg.microformats.org/ and am not opposed to forming a shared subrepo for the suite releasing all tests under a CC0 in the process. - - - There are other aspects of the project that I'd like to involve the community in as well, such as automated XMDP inferencing, semantic graphing (graphing the semantic web as opposed to graphing the Microformat lexicon), and consolidation of properties (which becomes more apparent once you stare at a webpage presenting a spec's profile, its graph, and property/subproperty derivation/relatives. These, however, are considerably less important than testing and conformity at the moment. Looking forward to hearing from anyone interested. [1]: https://bitbucket.org/angelo/microformats/ [2]: https://bitbucket.org/angelo/microformats/src/5f8dbe75b683/microformats/lexicon/adr.py [3]: https://bitbucket.org/angelo/microformats/src/5f8dbe75b683/tests/adr/ [4]: http://imgur.com/5dpq7.jpg -- Angelo Gladding angelo@gladding.name From mail at tobyinkster.co.uk Thu Jul 15 08:26:43 2010 From: mail at tobyinkster.co.uk (Toby Inkster) Date: Thu Jul 15 08:27:29 2010 Subject: [uf-dev] `microformats` and a universal test suite In-Reply-To: References: Message-ID: <20100715162643.7de2fdb9@miranda.g5n.co.uk> On Wed, 14 Jul 2010 21:11:22 -0700 Angelo Gladding wrote: > I am currently writing a universal parser [1]. It goes by the name > `microformats` because I intend it to be as close as possible to a > canonical codification of all things Microformats. This will be > accomplished by codifying each specification in a Python module using > what can best be described as a domain-specific language. See the > `adr` definition [2] and accompanying tests [3]. I used something similar in Swignition, which has been ported to HTML::Microformats. It summarises how each property is parsed, and how they're mapped to RDF. e.g. http://goddamn.co.uk/viewvc/perlmods/HTML-Microformats/lib/HTML/Microformats/hRecipe.pm?revision=409#l62 Shows 'fn' follows pattern '1' which means that it's singular and required, whereas property 'photo' follows pattern 'u*' meaning that it's optional, multiple and parsed as a URL. Most microformats have a few little features that can't be captured that way, but I've found it covers most things. Regarding test cases, have you seen Glen Jones' effort? http://ufxtract.com/testsuite/ -- Toby A Inkster From tantek at cs.stanford.edu Fri Jul 16 18:55:17 2010 From: tantek at cs.stanford.edu (=?UTF-8?Q?Tantek_=C3=87elik?=) Date: Fri Jul 16 18:55:52 2010 Subject: [uf-dev] Re: [uf-discuss] `microformats` and a universal test suite In-Reply-To: References: <1E3B98EC-FB68-48B8-8511-75F63831962A@randomchaos.com> Message-ID: (moving to uf-dev) On Wed, Jul 14, 2010 at 9:08 PM, Angelo Gladding wrote: > On Wed, Jul 14, 2010 at 8:37 PM, Scott Reynen wrote: >> On Jul 14, 2010, at 8:30 PM, Angelo Gladding wrote: >> >>> I am currently writing a universal parser [1]. >> >> Hi Angelo, >> >> Sounds like an ambitious project and I'd like to have more to contribute, but all I have now is a suggestion to move this discussion to the microformats-dev list, which is focused on exactly this kind of topic: >> >> http://microformats.org/mailman/listinfo/microformats-dev/ >> >> Peace, >> Scott >> > > I wasn't sure -- thought that might be more for development of > specifications. Will cross-post, thanks. Hi Angelo - Take a look at the extensive work that Glenn and Ben Ward have already done with the test suites project/pages: http://microformats.org/wiki/test-suite and the test-fixture poshformat: http://microformats.org/wiki/test-fixture Thanks, Tantek -- http://tantek.com/ I made an HTML5 tutorial video/book! http://tantek.com/html5