Updated XML Topic Definition Provider

13 views
Skip to first unread message

Josh English

unread,
Jul 11, 2013, 12:26:36 AM7/11/13
to pypu...@googlegroups.com
This is revision 4. It should be comprehensive enough. It can import and export XML trees, uses the self-documenting structure Oliver suggested, and should be better documented.

Thanks, everyone, for the help with this.

Josh English
xmltopicdefnprovider.py

oliver

unread,
Jul 12, 2013, 10:44:45 PM7/12/13
to PyPubSub
Thanks Josh, that's great! Can I include it in pubsub utils? The copyright notice could have your name if you like, but you'd have to include a note stating that I am allowed to edit and distribute the file with pubsub, and that the license terms are the same as for pubsub. 

Also, it would be good to move the "__main__" block into a test file under "tests" folder and extend it into a proper test (doesn't have to be exhaustive, but should contain assertions as done for other test cases in that folder). Might be easier to copy one of the other topic provider test files and edit the defn provider registration part, the rest should not need changing. 

Oliver



Josh English

--
You received this message because you are subscribed to the Google Groups "pypubsub" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pypubsub+u...@googlegroups.com.
To post to this group, send email to pypu...@googlegroups.com.
Visit this group at http://groups.google.com/group/pypubsub.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Josh English

unread,
Jul 13, 2013, 7:26:39 PM7/13/13
to pypu...@googlegroups.com
Sure, let me work on that.
--
Josh English
Joshua.R...@gmail.com
http://www.joshuarenglish.com

Josh English

unread,
Jul 27, 2013, 3:23:09 PM7/27/13
to pypu...@googlegroups.com
Okay, hopefully this is the sort of thing you're looking for.

I tried to copy the testing format from the other pubsub tests. I'm not familiar with nose, so I don't know if these are properly formatted or not.

I have added the ability to import from an XML file, since I could export to one anyway.

I almost thought about trying to include this as a serializer, so the regular pub.addTopicDefnProvider and pub.importTopicTree could work with XML,

In fact, I think I will, so expect version 7 of this file soon, but I'd like some feedback on the tests.

Josh


On Saturday, July 13, 2013 4:26:39 PM UTC-7, Josh English wrote:
Sure, let me work on that.

xmltopicdefnprovider.py
testtopics.xml
testxml_provider.py
Reply all
Reply to author
Forward
0 new messages