mirror of
https://github.com/chanzuckerberg/cellxgene.git
synced 2026-10-01 01:08:11 +08:00
Add provenance header to labels CSV file (#1041)
* add last mod time lookup to data locator * store data locator in Driver * save metadata header in labels csv * lint * fix tests * change datetime format to second precision
This commit is contained in:
@@ -11,18 +11,20 @@ Sort order for methods
|
||||
|
||||
|
||||
class CXGDriver(metaclass=ABCMeta):
|
||||
def __init__(self, data=None, args={}):
|
||||
def __init__(self, data_locator=None, args={}):
|
||||
self.config = self._get_default_config()
|
||||
self.config.update(args)
|
||||
if data:
|
||||
self._load_data(data)
|
||||
if data_locator:
|
||||
self._load_data(data_locator)
|
||||
self.data_locator = data_locator
|
||||
else:
|
||||
self.data = None
|
||||
|
||||
def update(self, data=None, args={}):
|
||||
def update(self, data_locator=None, args={}):
|
||||
self.config.update(args)
|
||||
if data:
|
||||
self._load_data(data)
|
||||
if data_locator:
|
||||
self._load_data(data_locator)
|
||||
self.data_locator = data_locator
|
||||
|
||||
@staticmethod
|
||||
def _get_default_config():
|
||||
|
||||
Reference in New Issue
Block a user