From dd55aef3e53aafd75e0be1eb9abf649f9b61101f Mon Sep 17 00:00:00 2001 From: Celine Mercier Date: Wed, 21 Sep 2016 17:08:44 +0200 Subject: [PATCH] Added column class method to get the unique references (name and version) of a column --- python/obitools3/obidms/_obidms.pxd | 1 + python/obitools3/obidms/_obidms.pyx | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/python/obitools3/obidms/_obidms.pxd b/python/obitools3/obidms/_obidms.pxd index 75cfa1b..ac2b7c5 100644 --- a/python/obitools3/obidms/_obidms.pxd +++ b/python/obitools3/obidms/_obidms.pxd @@ -23,6 +23,7 @@ cdef class OBIDMS_column: cpdef index_t get_nb_lines_used(self) cpdef str get_creation_date(self) cpdef str get_comments(self) + cpdef dict get_references(self) cpdef close(self) @staticmethod cdef object get_subclass_type(OBIDMS_column_p column_p) diff --git a/python/obitools3/obidms/_obidms.pyx b/python/obitools3/obidms/_obidms.pyx index 3287767..a7cdbb7 100644 --- a/python/obitools3/obidms/_obidms.pyx +++ b/python/obitools3/obidms/_obidms.pyx @@ -141,6 +141,12 @@ cdef class OBIDMS_column : cpdef str get_comments(self): return bytes2str((self.pointer)[0].header.comments) + cpdef dict get_references(self): # Make properties + refs = {} + refs['name'] = self.column_name + refs['version'] = (self.pointer)[0].header.version + return refs + def __str__(self) : cdef str to_print to_print = ''