EdinburghGenomics / pyclarity-lims

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

Queue Class does not have an easily acessible "queue-time" member variable #18

Closed Rubyj closed 6 years ago

Rubyj commented 6 years ago

In the Queue Class I feel as if the "queue-time" member variable should exist under artifacts just like location does. However, I have to traverse artifacts._elems[0]._children[0].text to get the queue time. Can we make this so something like artifacts[0].queue_time works? Thanks.

tcezard commented 6 years ago

It would probably be a new list of tuple or dict like

[
    (Artifact(), '2017-12-19T15:02:33.050+00:00', (Container(), 'H11')),
    (Artifact(), '2017-12-19T15:02:33.050+00:00', (Container(), 'H12')), 
]

or

[
    {'artifact': Artifact(), 'queue-time': '2017-12-19T15:02:33.050+00:00', 'location': (Container(), 'H11')},
    {'artifact': Artifact(), 'queue-time': '2017-12-19T15:02:33.050+00:00', 'location': (Container(), 'H12')}
]

and queue.artifacts would still return the list of artifacts only for backward compatibility. It is certainly doable.

Rubyj commented 6 years ago

something like this would be perfect! Thanks!