remove experimental ontology support (#2300)

* remove experimental ontology support

* lint

* remove ontologies from unit tests

* additional test changes
This commit is contained in:
Bruce Martin
2021-07-14 07:23:38 -07:00
committed by GitHub
parent 45a8984223
commit e334fbe96e
35 changed files with 28 additions and 269 deletions
@@ -22,9 +22,6 @@ dataset:
local_file_csv:
directory: {local_file_csv_directory}
file: {local_file_csv_file}
ontology:
enable: {ontology_enabled}
obo_location: {obo_location}
embeddings:
names: {embedding_names}
-3
View File
@@ -17,9 +17,6 @@ dataset:
directory: {local_file_csv_directory}
file: {local_file_csv_file}
gene_sets_file: {local_file_csv_gene_sets_file}
ontology:
enable: {ontology_enabled}
obo_location: {obo_location}
gene_sets:
readonly: {gene_sets_readonly}
@@ -124,8 +124,6 @@ class ConfigTests(BaseTest):
hosted_file_directory="null",
local_file_csv_directory="null",
local_file_csv_file="null",
ontology_enabled="false",
obo_location="null",
embedding_names=[],
enable_reembedding="false",
enable_difexp="true",
@@ -193,8 +191,6 @@ class ConfigTests(BaseTest):
hosted_file_directory=hosted_file_directory,
local_file_csv_directory=local_file_csv_directory,
local_file_csv_file=local_file_csv_file,
ontology_enabled=ontology_enabled,
obo_location=obo_location,
embedding_names=embedding_names,
enable_reembedding=enable_reembedding,
enable_difexp=enable_difexp,
@@ -231,8 +227,6 @@ class ConfigTests(BaseTest):
hosted_file_directory="null",
local_file_csv_directory="null",
local_file_csv_file="null",
ontology_enabled="false",
obo_location="null",
embedding_names=[],
enable_reembedding="false",
enable_difexp="true",
@@ -36,7 +36,6 @@ class BaseConfigTest(ConfigTests):
mapping = config.default_dataset_config.create_mapping(config.default_config)
self.assertIsNotNone(mapping["server__app__verbose"])
self.assertIsNotNone(mapping["dataset__presentation__max_categories"])
self.assertIsNotNone(mapping["dataset__user_annotations__ontology__obo_location"])
self.assertIsNotNone(mapping["server__multi_dataset__allowed_matrix_types"])
def test_changes_from_default_returns_list_of_nondefault_config_values(self):
@@ -44,13 +44,12 @@ class TestDatasetConfig(ConfigTests):
self.assertEqual(config.default_dataset_config.presentation__max_categories, 1000)
self.assertEqual(config.default_dataset_config.user_annotations__type, "local_file_csv")
self.assertEqual(config.default_dataset_config.diffexp__lfc_cutoff, 0.01)
self.assertIsNone(config.default_dataset_config.user_annotations__ontology__obo_location)
@patch("backend.czi_hosted.common.config.dataset_config.BaseConfig.validate_correct_type_of_configuration_attribute")
def test_complete_config_checks_all_attr(self, mock_check_attrs):
mock_check_attrs.side_effect = BaseConfig.validate_correct_type_of_configuration_attribute()
self.dataset_config.complete_config(self.context)
self.assertEqual(mock_check_attrs.call_count, 21)
self.assertEqual(mock_check_attrs.call_count, 19)
def test_app_sets_script_vars(self):
config = self.get_config(scripts=["path/to/script"])
@@ -95,8 +95,6 @@ class ConfigTests(unittest.TestCase):
local_file_csv_directory="null",
local_file_csv_file="null",
local_file_csv_gene_sets_file="null",
ontology_enabled="false",
obo_location="null",
gene_sets_readonly="false",
embedding_names=[],
enable_reembedding="false",
@@ -148,8 +146,6 @@ class ConfigTests(unittest.TestCase):
local_file_csv_directory=local_file_csv_directory,
local_file_csv_file=local_file_csv_file,
local_file_csv_gene_sets_file=local_file_csv_gene_sets_file,
ontology_enabled=ontology_enabled,
obo_location=obo_location,
gene_sets_readonly=gene_sets_readonly,
embedding_names=embedding_names,
enable_reembedding=enable_reembedding,
@@ -186,8 +182,6 @@ class ConfigTests(unittest.TestCase):
local_file_csv_directory="null",
local_file_csv_file="null",
local_file_csv_gene_sets_file="null",
ontology_enabled="false",
obo_location="null",
gene_sets_readonly="false",
embedding_names=[],
enable_reembedding="false",
@@ -131,9 +131,8 @@ class AppConfigTest(ConfigTests):
# test simple value in default dataset
config.update_single_config_from_path_and_value(
["dataset", "user_annotations", "ontology", "obo_location"], "dummy_location",
["dataset", "user_annotations"], "dummy_location",
)
self.assertEqual(config.dataset_config.user_annotations__ontology__obo_location, "dummy_location")
# error checking
bad_paths = [
@@ -36,7 +36,6 @@ class BaseConfigTest(ConfigTests):
mapping = config.dataset_config.create_mapping(config.default_config)
self.assertIsNotNone(mapping["server__app__verbose"])
self.assertIsNotNone(mapping["dataset__presentation__max_categories"])
self.assertIsNotNone(mapping["dataset__user_annotations__ontology__obo_location"])
def test_changes_from_default_returns_list_of_nondefault_config_values(self):
config = self.get_config(verbose="true", lfc_cutoff=0.05)
@@ -40,14 +40,13 @@ class TestDatasetConfig(ConfigTests):
self.assertEqual(config.dataset_config.presentation__max_categories, 1000)
self.assertEqual(config.dataset_config.user_annotations__type, "local_file_csv")
self.assertEqual(config.dataset_config.diffexp__lfc_cutoff, 0.01)
self.assertIsNone(config.dataset_config.user_annotations__ontology__obo_location)
@patch("backend.server.common.config.dataset_config.BaseConfig.validate_correct_type_of_configuration_attribute")
def test_complete_config_checks_all_attr(self, mock_check_attrs):
mock_check_attrs.side_effect = BaseConfig.validate_correct_type_of_configuration_attribute()
self.dataset_config.complete_config(self.context)
self.assertIsNotNone(self.config.server_config.data_adaptor)
self.assertEqual(mock_check_attrs.call_count, 19)
self.assertEqual(mock_check_attrs.call_count, 17)
def test_app_sets_script_vars(self):
config = self.get_config(scripts=["path/to/script"])