mirror of
https://github.com/chanzuckerberg/cellxgene.git
synced 2026-09-22 05:58:12 +08:00
Updates due dependency version changes. (#1960)
* Updates due dependency version changes. h5py recently changes and now values once returned as str are now returned as bytes. This would have caused a much larger change, so instead the version is restricted to <3.0.0. This caused the bulk of the testing failues. A few other changes were needed to make a few other tests pass. #1959
This commit is contained in:
@@ -34,6 +34,12 @@ class AnnotationsHostedTileDB(Annotations):
|
||||
f"{unsanitary_original_category_names} are not valid category names, please resubmit"
|
||||
)
|
||||
|
||||
def get_user_name(self):
|
||||
return current_app.auth.get_user_name()
|
||||
|
||||
def get_user_id(self):
|
||||
return current_app.auth.get_user_id()
|
||||
|
||||
def is_safe_collection_name(self, name):
|
||||
"""
|
||||
return true if this is a safe collection name
|
||||
@@ -48,7 +54,7 @@ class AnnotationsHostedTileDB(Annotations):
|
||||
self.CXG_ANNO_COLLECTION = name
|
||||
|
||||
def read_labels(self, data_adaptor):
|
||||
user_id = current_app.auth.get_user_id()
|
||||
user_id = self.get_user_id()
|
||||
if user_id is None:
|
||||
return
|
||||
dataset_name = data_adaptor.get_location()
|
||||
@@ -103,8 +109,8 @@ class AnnotationsHostedTileDB(Annotations):
|
||||
return new_df
|
||||
|
||||
def write_labels(self, df, data_adaptor):
|
||||
auth_user_id = current_app.auth.get_user_id()
|
||||
user_name = current_app.auth.get_user_name()
|
||||
auth_user_id = self.get_user_id()
|
||||
user_name = self.get_user_name()
|
||||
timestamp = time.time()
|
||||
dataset_location = data_adaptor.get_location()
|
||||
dataset_id = self.db.get_or_create_dataset(dataset_location)
|
||||
|
||||
Reference in New Issue
Block a user