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
@@ -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"])