EdinburghGenomics / pyclarity-lims

Python interface to the GenoLogics LIMS server via its REST API.
MIT License
11 stars 4 forks source link

Another descriptor refactor #6

Closed tcezard closed 7 years ago

tcezard commented 7 years ago

This PR does not change any behaviour of the API but refactors how some of the Descriptors works. The goal is to allow the modification of lists and dict to modify the XML. Here is a few notable changes:

I added a Nestable generic class which give a Descriptor the to be nested in an xml element. that allowed me to remove a few class specifically written to that effect. Building on UdfDictionary, I added generic list and dict object that modify the underlying xml when values are being added/removed from them. I also sub classed them to have specific lists or dicts for specifc usage such as PlacementDictionary, SubTagDictionary, XmlTextList, XmlAttributeList, XmlReagentLabelList, EntityList XmlInputOutputMapList, OutputPlacementList and ExternalidList. Each of these classes support addition/removal of elements that modifies the underlying xml. Added a MuttableDescriptor descriptor class that allow getting/setting of whole list or dict directly. I also subclassed to create the same descriptors we had before. I added several more tests to convince myself that it was all working as expected. I'm happy to add more as required. The diff is big so don't hesitate to ask for more details.