Merge branch 'main' into colinmegill/geneset-prototype

This commit is contained in:
Colin Megill
2021-03-05 16:14:49 -08:00
185 changed files with 16613 additions and 253 deletions
+2 -2
View File
@@ -33,10 +33,10 @@ class Annotations(metaclass=ABCMeta):
raise OntologyLoadFailure("Unable to find OBO ontology path") from e
except SyntaxError as e:
raise OntologyLoadFailure("Syntax error loading OBO ontology") from e
raise OntologyLoadFailure(f"{path}:{e.lineno}:{e.offset} OBO syntax error, unable to read ontology") from e
except Exception as e:
raise OntologyLoadFailure("Error loading OBO file") from e
raise OntologyLoadFailure(f"{path}:Error loading OBO file") from e
def get_schema(self, data_adaptor):
schema = []
+7
View File
@@ -42,6 +42,9 @@ class ServerConfig(BaseConfig):
self.app__web_base_url = default_config["app"]["web_base_url"]
self.authentication__type = default_config["authentication"]["type"]
self.authentication__insecure_test_environment = default_config["authentication"][
"insecure_test_environment"
]
self.authentication__params_oauth__oauth_api_base_url = default_config["authentication"]["params_oauth"][
"oauth_api_base_url"
]
@@ -168,6 +171,10 @@ class ServerConfig(BaseConfig):
def handle_authentication(self):
self.validate_correct_type_of_configuration_attribute("authentication__type", (type(None), str))
self.validate_correct_type_of_configuration_attribute("authentication__insecure_test_environment", bool)
if self.authentication__type == "test" and not self.authentication__insecure_test_environment:
raise ConfigurationError("Test auth can only be used in an insecure test environment")
# oauth
ptypes = str if self.authentication__type == "oauth" else (type(None), str)
+1 -1
View File
@@ -44,7 +44,7 @@ def get_dtype_from_dtype(dtype, array_values=None):
if dtype_name == "bool":
return np.uint8
if dtype_name == "object" and dtype_kind == "O":
return np.unicode
return str
if dtype_name == "category":
return get_dtype_from_dtype(dtype.categories.dtype, array_values)