[Cubicweb] PyLit and Cubic Web

Julien Jehannet julien.jehannet at logilab.fr
Fri Dec 3 11:28:40 CET 2010


> * Fletcher, John P <j.p.fletcher at aston.ac.uk> [02-déc.-2010 11:31]:
> Has any work been done to integrate PyLit into CubicWeb?  http://pylit.berlios.de/index.html
> 
> I am interested to combine Literate Programming and the Semantic Web and this looks an interesting tool, as it uses ReST.
> 
> John

Thank you for pointing PyLit. Seems interesting.

Nevertheless, CubicWeb provides some literate programming capabilities
right now. If you're already familiar with the `cubicweb-ctl shell`
command, you'll be happy to know that you can pass testfile (ReST file)
as a normal migration script.

For example, in the skm cube we use a `vibraphone.txt` test scenario
(in french but you can get the idea there) that you can run on a fresh
database by:

	#after: cubicweb-ctl db-create skm  <skm_instance>
	cubicweb-ctl shell <skm_instance> test/vibraphone.txt

Thanks to recent changes in the framewsork, you will be able to address
it directly in unit tests soon.

--- 8< -----------------------------------------
	from os.path import dirname, join
	from logilab.common.testlib import unittest_main
	from cubicweb.devtools.testlib import CubicWebTC

	class AcceptanceTC(CubicWebTC):

		def test_demo_conference_scenario(self):
			self.assertDocTestFile(join(dirname(__file__), 'demo_conference.txt'))

	if __name__ == '__main__':
		unittest_main()
--- 8< -----------------------------------------

This feature is not yet in the book but I will update the doc
accordingly with the last usage.

Regards,
-- 
Julien JEHANNET                                          LOGILAB, Paris (France)
http://www.cubicweb.org                 CubicWeb, le cadriciel du web sémantique
http://www.logilab.org             Dépôt des logiciels libres conçus par Logilab
http://www.logilab.fr       Informatique scientifique & Gestion de connaissances
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.cubicweb.org/pipermail/cubicweb/attachments/20101203/706f788e/attachment.pgp>


More information about the Cubicweb mailing list