From fbc62a01f3e4652d0174a4e708796df661967243 Mon Sep 17 00:00:00 2001 From: Harshad Hegde Date: Thu, 15 Aug 2024 14:37:38 -0500 Subject: [PATCH] tox -e format --- tests/integration_tests/test_sqlite_full.py | 1 - tests/test_cli.py | 4 ++-- .../test_logical_definition_flattener_converter.py | 2 +- tests/test_converters/test_obo_format.py | 2 +- tests/test_converters/test_obo_graph_to_cx.py | 2 +- tests/test_converters/test_obo_graph_to_fhir.py | 2 +- tests/test_converters/test_obo_graph_to_obo_format.py | 2 +- .../test_obo_graph_to_rdf_owl_converter.py | 2 +- tests/test_datamodels/test_obograph_datamodel.py | 2 +- tests/test_datamodels/test_ontology_metadata_datamodel.py | 2 +- tests/test_datamodels/test_search_datamodel.py | 1 + tests/test_datamodels/test_text_annotator_datamodel.py | 2 +- tests/test_datamodels/test_validation_datamodel.py | 2 +- tests/test_implementations/__init__.py | 2 +- tests/test_implementations/test_aggregator.py | 2 +- tests/test_implementations/test_bioportal.py | 2 +- tests/test_implementations/test_cx.py | 1 - tests/test_implementations/test_funowl.py | 2 +- tests/test_implementations/test_gilda.py | 1 - tests/test_implementations/test_ncbigene.py | 1 - tests/test_implementations/test_obograph.py | 2 +- tests/test_implementations/test_ols.py | 2 +- tests/test_implementations/test_ontobee.py | 1 - tests/test_implementations/test_pantherdb.py | 1 + tests/test_implementations/test_pronto.py | 2 +- tests/test_implementations/test_robot_template.py | 2 +- .../test_implementations/test_semsimian_implementation.py | 2 +- tests/test_implementations/test_simple_obo.py | 2 +- tests/test_implementations/test_sparql.py | 1 - tests/test_implementations/test_sqldb.py | 6 +++--- tests/test_implementations/test_ubergraph.py | 1 - tests/test_implementations/test_uniprot.py | 1 - tests/test_implementations/test_wikidata.py | 1 + tests/test_indexes/test_edge_index.py | 1 - tests/test_inference/test_relation_graph_reasoner.py | 1 - tests/test_parsers/test_boomer_parser.py | 2 +- tests/test_parsers/test_gaf_association_parser.py | 1 - tests/test_parsers/test_gencc_association_parser.py | 1 - tests/test_parsers/test_hpoa_association_parser.py | 1 - tests/test_parsers/test_hpoa_g2d_association_parser.py | 1 - tests/test_parsers/test_hpoa_g2p_association_parser.py | 1 - tests/test_parsers/test_mim2gene_association_parser.py | 1 - tests/test_parsers/test_obojson_parser.py | 2 +- tests/test_parsers/test_pairwise_association_parser.py | 1 - tests/test_parsers/test_phaf_association_parser.py | 1 - tests/test_parsers/test_xaf_association_parser.py | 1 - tests/test_selector.py | 2 +- tests/test_utilities/test_association_diffs.py | 2 +- tests/test_utilities/test_association_index.py | 1 - tests/test_utilities/test_boomer_utils.py | 1 - tests/test_utilities/test_cross_ontology_diff.py | 2 +- tests/test_utilities/test_disjointness_analysis.py | 1 - tests/test_utilities/test_kgcl_utilities.py | 1 - tests/test_utilities/test_lexical_index.py | 1 - .../test_utilities/test_logical_definition_summarizer.py | 1 - tests/test_utilities/test_mapping_validation.py | 4 ++-- tests/test_utilities/test_networkx_bridge.py | 2 +- tests/test_utilities/test_obograph_utils.py | 2 +- tests/test_utilities/test_patternizer.py | 2 +- tests/test_utilities/test_pubdb_wrapper.py | 1 + tests/test_utilities/test_relationship_walker.py | 1 - tests/test_utilities/test_roll_up_to_subset.py | 1 - tests/test_utilities/test_sqlite_utils.py | 1 - tests/test_utilities/test_sssom_matcher.py | 8 ++++---- tests/test_utilities/test_subset_analysis.py | 1 - tests/test_utilities/test_synonymizer.py | 2 +- tests/test_utilities/test_table_filler.py | 4 ++-- tests/test_utilities/test_taxon_constraints.py | 2 +- tests/test_utilities/test_unreciprocated_mappings.py | 1 - tests/test_utilities/test_value_set_expander.py | 2 +- tests/test_validation/test_definition_ontology_rules.py | 1 - tests/test_validation/test_disjointness_rule.py | 2 +- tests/test_validation/test_lint_utils.py | 1 - tests/test_validation/test_rule_runner.py | 1 - tox.ini | 2 +- 75 files changed, 50 insertions(+), 79 deletions(-) diff --git a/tests/integration_tests/test_sqlite_full.py b/tests/integration_tests/test_sqlite_full.py index 0327c676e..4a71cb3a5 100644 --- a/tests/integration_tests/test_sqlite_full.py +++ b/tests/integration_tests/test_sqlite_full.py @@ -6,7 +6,6 @@ from oaklib.utilities.mapping.cross_ontology_diffs import ( calculate_pairwise_relational_diff, ) - from tests import EXTERNAL_DB_DIR DB_FOLDER = EXTERNAL_DB_DIR / "unreciprocated-mapping-test.obo" diff --git a/tests/test_cli.py b/tests/test_cli.py index 399424c10..3fc048585 100644 --- a/tests/test_cli.py +++ b/tests/test_cli.py @@ -12,6 +12,8 @@ from click.testing import CliRunner from kgcl_schema.datamodel.kgcl import MappingCreation, NodeChange, RemoveMapping from linkml_runtime.loaders import json_loader, yaml_loader +from sssom.parsers import parse_sssom_table, to_mapping_set_document + from oaklib import get_adapter from oaklib.cli import clear_cli_settings, main from oaklib.datamodels import fhir, obograph, taxon_constraints @@ -22,8 +24,6 @@ SKOS_EXACT_MATCH, ) from oaklib.utilities.kgcl_utilities import parse_kgcl_files -from sssom.parsers import parse_sssom_table, to_mapping_set_document - from tests import ( ATOM, CATALYTIC_ACTIVITY, diff --git a/tests/test_converters/test_logical_definition_flattener_converter.py b/tests/test_converters/test_logical_definition_flattener_converter.py index 97fde1e3c..3f2d81a3b 100644 --- a/tests/test_converters/test_logical_definition_flattener_converter.py +++ b/tests/test_converters/test_logical_definition_flattener_converter.py @@ -1,12 +1,12 @@ import unittest from linkml_runtime.loaders import json_loader + from oaklib import get_adapter from oaklib.converters.logical_definition_flattener import LogicalDefinitionFlattener from oaklib.datamodels import obograph from oaklib.datamodels.obograph import GraphDocument from oaklib.datamodels.vocabulary import HAS_PART, PART_OF - from tests import INPUT_DIR, OUTPUT_DIR from tests.test_implementations import ComplianceTester diff --git a/tests/test_converters/test_obo_format.py b/tests/test_converters/test_obo_format.py index ccf000b96..2bb789ec3 100644 --- a/tests/test_converters/test_obo_format.py +++ b/tests/test_converters/test_obo_format.py @@ -92,9 +92,9 @@ import pytest import rdflib -from oaklib import get_adapter from rdflib.compare import isomorphic +from oaklib import get_adapter from tests import INPUT_DIR, OUTPUT_DIR logger = logging.getLogger(__name__) diff --git a/tests/test_converters/test_obo_graph_to_cx.py b/tests/test_converters/test_obo_graph_to_cx.py index 089e5f4ff..51c2f9937 100644 --- a/tests/test_converters/test_obo_graph_to_cx.py +++ b/tests/test_converters/test_obo_graph_to_cx.py @@ -4,10 +4,10 @@ import curies from linkml_runtime.loaders import json_loader from ndex2 import create_nice_cx_from_file + from oaklib.converters.obo_graph_to_cx_converter import OboGraphToCXConverter from oaklib.datamodels.obograph import GraphDocument from oaklib.interfaces.basic_ontology_interface import get_default_prefix_map - from tests import INPUT_DIR, OUTPUT_DIR from tests.test_implementations import ComplianceTester diff --git a/tests/test_converters/test_obo_graph_to_fhir.py b/tests/test_converters/test_obo_graph_to_fhir.py index 8072d314a..24f6bf962 100644 --- a/tests/test_converters/test_obo_graph_to_fhir.py +++ b/tests/test_converters/test_obo_graph_to_fhir.py @@ -7,12 +7,12 @@ import curies import requests from linkml_runtime.loaders import json_loader + from oaklib.constants import TIMEOUT_SECONDS from oaklib.converters.obo_graph_to_fhir_converter import OboGraphToFHIRConverter from oaklib.datamodels.fhir import CodeSystem from oaklib.datamodels.obograph import GraphDocument from oaklib.interfaces.basic_ontology_interface import get_default_prefix_map - from tests import IMBO, INPUT_DIR, NUCLEUS, OUTPUT_DIR from tests.test_implementations import ComplianceTester diff --git a/tests/test_converters/test_obo_graph_to_obo_format.py b/tests/test_converters/test_obo_graph_to_obo_format.py index 42970be57..fa716e2cf 100644 --- a/tests/test_converters/test_obo_graph_to_obo_format.py +++ b/tests/test_converters/test_obo_graph_to_obo_format.py @@ -2,6 +2,7 @@ import curies from linkml_runtime.loaders import json_loader + from oaklib import OntologyResource from oaklib.converters.obo_graph_to_obo_format_converter import ( OboGraphToOboFormatConverter, @@ -9,7 +10,6 @@ from oaklib.datamodels.obograph import GraphDocument from oaklib.implementations import SimpleOboImplementation from oaklib.interfaces.basic_ontology_interface import get_default_prefix_map - from tests import INPUT_DIR, OUTPUT_DIR from tests.test_implementations import ComplianceTester diff --git a/tests/test_converters/test_obo_graph_to_rdf_owl_converter.py b/tests/test_converters/test_obo_graph_to_rdf_owl_converter.py index 2af976a66..1b1220df2 100644 --- a/tests/test_converters/test_obo_graph_to_rdf_owl_converter.py +++ b/tests/test_converters/test_obo_graph_to_rdf_owl_converter.py @@ -2,12 +2,12 @@ import curies from linkml_runtime.loaders import json_loader + from oaklib import OntologyResource from oaklib.converters.obo_graph_to_rdf_owl_converter import OboGraphToRdfOwlConverter from oaklib.datamodels.obograph import GraphDocument from oaklib.implementations import SparqlImplementation from oaklib.interfaces.basic_ontology_interface import get_default_prefix_map - from tests import INPUT_DIR, OUTPUT_DIR from tests.test_implementations import ComplianceTester diff --git a/tests/test_datamodels/test_obograph_datamodel.py b/tests/test_datamodels/test_obograph_datamodel.py index e63788ff6..820050a83 100644 --- a/tests/test_datamodels/test_obograph_datamodel.py +++ b/tests/test_datamodels/test_obograph_datamodel.py @@ -1,8 +1,8 @@ from linkml_runtime.dumpers import yaml_dumper from linkml_runtime.utils.introspection import package_schemaview + from oaklib.datamodels import obograph from oaklib.datamodels.vocabulary import IS_A - from tests import output_path from tests.test_datamodels import AbstractDatamodelTestCase diff --git a/tests/test_datamodels/test_ontology_metadata_datamodel.py b/tests/test_datamodels/test_ontology_metadata_datamodel.py index e2eaf7de7..97fedb25c 100644 --- a/tests/test_datamodels/test_ontology_metadata_datamodel.py +++ b/tests/test_datamodels/test_ontology_metadata_datamodel.py @@ -4,8 +4,8 @@ from linkml_runtime.dumpers import yaml_dumper from linkml_runtime.loaders import yaml_loader from linkml_runtime.utils.introspection import package_schemaview -from oaklib.datamodels import ontology_metadata +from oaklib.datamodels import ontology_metadata from tests import output_path diff --git a/tests/test_datamodels/test_search_datamodel.py b/tests/test_datamodels/test_search_datamodel.py index 52d10c79c..73b4af133 100644 --- a/tests/test_datamodels/test_search_datamodel.py +++ b/tests/test_datamodels/test_search_datamodel.py @@ -1,6 +1,7 @@ import unittest from linkml_runtime.utils.introspection import package_schemaview + from oaklib.datamodels import search_datamodel from oaklib.datamodels.search import create_search_configuration from oaklib.datamodels.search_datamodel import SearchProperty, SearchTermSyntax diff --git a/tests/test_datamodels/test_text_annotator_datamodel.py b/tests/test_datamodels/test_text_annotator_datamodel.py index 53b067ec9..34b37e720 100644 --- a/tests/test_datamodels/test_text_annotator_datamodel.py +++ b/tests/test_datamodels/test_text_annotator_datamodel.py @@ -2,8 +2,8 @@ from linkml_runtime.dumpers import yaml_dumper from linkml_runtime.utils.introspection import package_schemaview -from oaklib.datamodels import text_annotator +from oaklib.datamodels import text_annotator from tests import NUCLEUS, output_path diff --git a/tests/test_datamodels/test_validation_datamodel.py b/tests/test_datamodels/test_validation_datamodel.py index 2b73d704b..9cd5873b6 100644 --- a/tests/test_datamodels/test_validation_datamodel.py +++ b/tests/test_datamodels/test_validation_datamodel.py @@ -1,10 +1,10 @@ import logging import unittest -import oaklib.datamodels.validation_datamodel as vdm from linkml_runtime.dumpers import yaml_dumper from linkml_runtime.utils.introspection import package_schemaview +import oaklib.datamodels.validation_datamodel as vdm from tests import output_path diff --git a/tests/test_implementations/__init__.py b/tests/test_implementations/__init__.py index 5ea67f33c..a90060c5c 100644 --- a/tests/test_implementations/__init__.py +++ b/tests/test_implementations/__init__.py @@ -17,6 +17,7 @@ from kgcl_schema.datamodel.kgcl import Change, NodeObsoletion from kgcl_schema.grammar.render_operations import render from linkml_runtime.dumpers import json_dumper, yaml_dumper + from oaklib import BasicOntologyInterface, get_adapter from oaklib.datamodels import obograph from oaklib.datamodels.association import Association @@ -78,7 +79,6 @@ from oaklib.interfaces.semsim_interface import SemanticSimilarityInterface from oaklib.interfaces.summary_statistics_interface import SummaryStatisticsInterface from oaklib.utilities.kgcl_utilities import generate_change_id - from tests import ( ARCHAEA, BACTERIA, diff --git a/tests/test_implementations/test_aggregator.py b/tests/test_implementations/test_aggregator.py index 4fe44b9fe..03c37c130 100644 --- a/tests/test_implementations/test_aggregator.py +++ b/tests/test_implementations/test_aggregator.py @@ -2,6 +2,7 @@ import unittest from linkml_runtime.dumpers import yaml_dumper + from oaklib.datamodels.vocabulary import IS_A, PART_OF from oaklib.implementations.aggregator.aggregator_implementation import ( AggregatorImplementation, @@ -9,7 +10,6 @@ from oaklib.implementations.pronto.pronto_implementation import ProntoImplementation from oaklib.resource import OntologyResource from oaklib.utilities.obograph_utils import graph_as_dict - from tests import ( CELLULAR_COMPONENT, CYTOPLASM, diff --git a/tests/test_implementations/test_bioportal.py b/tests/test_implementations/test_bioportal.py index 173644a5a..dc240ac23 100644 --- a/tests/test_implementations/test_bioportal.py +++ b/tests/test_implementations/test_bioportal.py @@ -4,11 +4,11 @@ from unittest import mock from linkml_runtime.dumpers import yaml_dumper + from oaklib.implementations.ontoportal.bioportal_implementation import ( BioPortalImplementation, ) from oaklib.utilities.apikey_manager import get_apikey_value - from tests import CELLULAR_COMPONENT, CYTOPLASM, DIGIT, HUMAN, NEURON, VACUOLE diff --git a/tests/test_implementations/test_cx.py b/tests/test_implementations/test_cx.py index e032d5138..1bc58c1b6 100644 --- a/tests/test_implementations/test_cx.py +++ b/tests/test_implementations/test_cx.py @@ -2,7 +2,6 @@ from oaklib.implementations.cx.cx_implementation import CXImplementation from oaklib.resource import OntologyResource - from tests import INPUT_DIR from tests.test_implementations import ComplianceTester diff --git a/tests/test_implementations/test_funowl.py b/tests/test_implementations/test_funowl.py index 22b38e161..26597e1ef 100644 --- a/tests/test_implementations/test_funowl.py +++ b/tests/test_implementations/test_funowl.py @@ -4,12 +4,12 @@ from funowl import EquivalentClasses, SubClassOf from funowl.writers.FunctionalWriter import FunctionalWriter from kgcl_schema.datamodel import kgcl + from oaklib.implementations.funowl.funowl_implementation import FunOwlImplementation from oaklib.interfaces.obograph_interface import OboGraphInterface from oaklib.interfaces.owl_interface import AxiomFilter from oaklib.resource import OntologyResource from oaklib.utilities.kgcl_utilities import generate_change_id - from tests import CHEBI_NUCLEUS, HUMAN, INPUT_DIR, NUCLEUS, VACUOLE TEST_ONT = INPUT_DIR / "go-nucleus.ofn" diff --git a/tests/test_implementations/test_gilda.py b/tests/test_implementations/test_gilda.py index d57d1bb02..f33d5bbe4 100644 --- a/tests/test_implementations/test_gilda.py +++ b/tests/test_implementations/test_gilda.py @@ -4,7 +4,6 @@ from oaklib.datamodels.text_annotator import TextAnnotationConfiguration from oaklib.implementations import GildaImplementation - from tests import CELL_CORTEX try: diff --git a/tests/test_implementations/test_ncbigene.py b/tests/test_implementations/test_ncbigene.py index feb97c8e6..79ec63070 100644 --- a/tests/test_implementations/test_ncbigene.py +++ b/tests/test_implementations/test_ncbigene.py @@ -7,7 +7,6 @@ from oaklib.interfaces.association_provider_interface import ( AssociationProviderInterface, ) - from tests import CYTOPLASM, INPUT_DIR from tests.input.mock_ncbi_objects import NCBI_ASSOCIATIONS diff --git a/tests/test_implementations/test_obograph.py b/tests/test_implementations/test_obograph.py index befaa30a7..10b6b4442 100644 --- a/tests/test_implementations/test_obograph.py +++ b/tests/test_implementations/test_obograph.py @@ -3,6 +3,7 @@ from copy import deepcopy from kgcl_schema.datamodel import kgcl + from oaklib.datamodels import obograph from oaklib.datamodels.search import SearchConfiguration from oaklib.datamodels.search_datamodel import SearchProperty, SearchTermSyntax @@ -22,7 +23,6 @@ index_graph_edges_by_subject, index_graph_nodes, ) - from tests import ( CELL, CELLULAR_COMPONENT, diff --git a/tests/test_implementations/test_ols.py b/tests/test_implementations/test_ols.py index d2b1effd5..e7c264f72 100644 --- a/tests/test_implementations/test_ols.py +++ b/tests/test_implementations/test_ols.py @@ -3,11 +3,11 @@ import unittest from linkml_runtime.dumpers import yaml_dumper + from oaklib.datamodels.search import SearchConfiguration, SearchProperty from oaklib.datamodels.vocabulary import IS_A from oaklib.implementations.ols.ols_implementation import OlsImplementation from oaklib.resource import OntologyResource - from tests import CELLULAR_COMPONENT, CYTOPLASM, DIGIT, VACUOLE diff --git a/tests/test_implementations/test_ontobee.py b/tests/test_implementations/test_ontobee.py index 75f7bbe04..509c9c6e3 100644 --- a/tests/test_implementations/test_ontobee.py +++ b/tests/test_implementations/test_ontobee.py @@ -6,7 +6,6 @@ from oaklib.datamodels.vocabulary import IS_A, PART_OF from oaklib.implementations.ontobee.ontobee_implementation import OntobeeImplementation from oaklib.resource import OntologyResource - from tests import CELLULAR_COMPONENT, DIGIT, INPUT_DIR, OUTPUT_DIR, SHAPE, VACUOLE TEST_ONT = INPUT_DIR / "go-nucleus.obo" diff --git a/tests/test_implementations/test_pantherdb.py b/tests/test_implementations/test_pantherdb.py index 62810335e..ce0461ec4 100644 --- a/tests/test_implementations/test_pantherdb.py +++ b/tests/test_implementations/test_pantherdb.py @@ -1,6 +1,7 @@ import unittest import pytest + from oaklib import get_adapter from oaklib.interfaces.association_provider_interface import ( AssociationProviderInterface, diff --git a/tests/test_implementations/test_pronto.py b/tests/test_implementations/test_pronto.py index ba254c994..6386ca40d 100644 --- a/tests/test_implementations/test_pronto.py +++ b/tests/test_implementations/test_pronto.py @@ -3,6 +3,7 @@ import pronto from kgcl_schema.datamodel import kgcl + from oaklib import get_adapter from oaklib.datamodels import obograph from oaklib.datamodels.search import SearchConfiguration @@ -22,7 +23,6 @@ from oaklib.utilities.validation.definition_ontology_rule import ( DefinitionOntologyRule, ) - from tests import ( CELL, CELLULAR_COMPONENT, diff --git a/tests/test_implementations/test_robot_template.py b/tests/test_implementations/test_robot_template.py index 9e586f912..8146ce0ff 100644 --- a/tests/test_implementations/test_robot_template.py +++ b/tests/test_implementations/test_robot_template.py @@ -2,6 +2,7 @@ import pytest from kgcl_schema.datamodel import kgcl from linkml_runtime.dumpers import yaml_dumper + from oaklib import BasicOntologyInterface, get_adapter from oaklib.implementations.tabular.robot_template_implementation import ( template_modify, @@ -10,7 +11,6 @@ from oaklib.interfaces.dumper_interface import DumperInterface from oaklib.interfaces.patcher_interface import PatcherInterface from oaklib.utilities.kgcl_utilities import tidy_change_object - from tests import INPUT_DIR, OUTPUT_DIR TEMPLATES = INPUT_DIR / "obi-templates" diff --git a/tests/test_implementations/test_semsimian_implementation.py b/tests/test_implementations/test_semsimian_implementation.py index cb0c531ff..fb1e32973 100644 --- a/tests/test_implementations/test_semsimian_implementation.py +++ b/tests/test_implementations/test_semsimian_implementation.py @@ -3,11 +3,11 @@ import unittest from linkml_runtime.dumpers import yaml_dumper + from oaklib.datamodels.similarity import TermPairwiseSimilarity from oaklib.datamodels.vocabulary import IS_A, PART_OF from oaklib.interfaces.semsim_interface import SemanticSimilarityInterface from oaklib.selector import get_adapter - from tests import ( ENDOMEMBRANE_SYSTEM, FUNGI, diff --git a/tests/test_implementations/test_simple_obo.py b/tests/test_implementations/test_simple_obo.py index c9aee221f..93edd1e48 100644 --- a/tests/test_implementations/test_simple_obo.py +++ b/tests/test_implementations/test_simple_obo.py @@ -3,6 +3,7 @@ from copy import deepcopy from kgcl_schema.datamodel import kgcl + from oaklib import get_adapter from oaklib.datamodels import obograph from oaklib.datamodels.search import SearchConfiguration @@ -34,7 +35,6 @@ index_graph_edges_by_subject, index_graph_nodes, ) - from tests import ( BIOLOGICAL_ENTITY, CELL, diff --git a/tests/test_implementations/test_sparql.py b/tests/test_implementations/test_sparql.py index 2dbeb8b49..1488ea9aa 100644 --- a/tests/test_implementations/test_sparql.py +++ b/tests/test_implementations/test_sparql.py @@ -17,7 +17,6 @@ index_graph_edges_by_subject, index_graph_nodes, ) - from tests import ( CATALYTIC_ACTIVITY, CELL_CORTEX, diff --git a/tests/test_implementations/test_sqldb.py b/tests/test_implementations/test_sqldb.py index 62bb68584..de89ae327 100644 --- a/tests/test_implementations/test_sqldb.py +++ b/tests/test_implementations/test_sqldb.py @@ -5,6 +5,9 @@ from kgcl_schema.datamodel import kgcl from linkml_runtime.dumpers import yaml_dumper from linkml_runtime.loaders import yaml_loader +from semsql.sqla.semsql import Statements +from sqlalchemy import delete + from oaklib import BasicOntologyInterface, get_adapter from oaklib.conf import CONF_DIR_PATH from oaklib.datamodels import obograph @@ -26,9 +29,6 @@ from oaklib.utilities.lexical.lexical_indexer import add_labels_from_uris from oaklib.utilities.obograph_utils import graph_as_dict from oaklib.utilities.validation.rule_runner import RuleRunner -from semsql.sqla.semsql import Statements -from sqlalchemy import delete - from tests import ( CELLULAR_COMPONENT, CHEBI_NUCLEUS, diff --git a/tests/test_implementations/test_ubergraph.py b/tests/test_implementations/test_ubergraph.py index beb9e736d..e1c35df6d 100644 --- a/tests/test_implementations/test_ubergraph.py +++ b/tests/test_implementations/test_ubergraph.py @@ -4,7 +4,6 @@ from oaklib.datamodels.search import SearchConfiguration from oaklib.datamodels.vocabulary import IS_A, PART_OF from oaklib.implementations import UbergraphImplementation - from tests import ( CELL, CELLULAR_ANATOMICAL_ENTITY, diff --git a/tests/test_implementations/test_uniprot.py b/tests/test_implementations/test_uniprot.py index 5c3c1c3d3..4832ff4dc 100644 --- a/tests/test_implementations/test_uniprot.py +++ b/tests/test_implementations/test_uniprot.py @@ -6,7 +6,6 @@ from oaklib.interfaces.association_provider_interface import ( AssociationProviderInterface, ) - from tests import INPUT_DIR PROTEIN_PATH = INPUT_DIR / "uniprot-P12345.json" diff --git a/tests/test_implementations/test_wikidata.py b/tests/test_implementations/test_wikidata.py index fdcaa868f..4bb6f5aca 100644 --- a/tests/test_implementations/test_wikidata.py +++ b/tests/test_implementations/test_wikidata.py @@ -2,6 +2,7 @@ import unittest from linkml_runtime.dumpers import yaml_dumper + from oaklib.datamodels.search import SearchConfiguration from oaklib.datamodels.vocabulary import IS_A, PART_OF from oaklib.implementations.wikidata.wikidata_implementation import ( diff --git a/tests/test_indexes/test_edge_index.py b/tests/test_indexes/test_edge_index.py index 22c525811..508853509 100644 --- a/tests/test_indexes/test_edge_index.py +++ b/tests/test_indexes/test_edge_index.py @@ -2,7 +2,6 @@ from oaklib.datamodels.vocabulary import HAS_PART, IS_A, PART_OF from oaklib.indexes.edge_index import EdgeIndex - from tests import CELL, IMBO, NUCLEUS, VACUOLE RELS = [ diff --git a/tests/test_inference/test_relation_graph_reasoner.py b/tests/test_inference/test_relation_graph_reasoner.py index c44f77230..adc19514b 100644 --- a/tests/test_inference/test_relation_graph_reasoner.py +++ b/tests/test_inference/test_relation_graph_reasoner.py @@ -3,7 +3,6 @@ from oaklib import get_adapter from oaklib.datamodels.vocabulary import IS_A, PART_OF from oaklib.inference.relation_graph_reasoner import RelationGraphReasoner - from tests import CELL, IMBO, INPUT_DIR, NUCLEAR_MEMBRANE, NUCLEUS, ORGANELLE, VACUOLE ONT = INPUT_DIR / "go-nucleus.obo" diff --git a/tests/test_parsers/test_boomer_parser.py b/tests/test_parsers/test_boomer_parser.py index 9a0f77916..876ee9e2f 100644 --- a/tests/test_parsers/test_boomer_parser.py +++ b/tests/test_parsers/test_boomer_parser.py @@ -2,8 +2,8 @@ import unittest from linkml_runtime.dumpers import yaml_dumper -from oaklib.parsers.boomer_parser import BoomerParser +from oaklib.parsers.boomer_parser import BoomerParser from tests import INPUT_DIR EXAMPLE = INPUT_DIR / "boomer-example.md" diff --git a/tests/test_parsers/test_gaf_association_parser.py b/tests/test_parsers/test_gaf_association_parser.py index 09987f54e..5f98486a6 100644 --- a/tests/test_parsers/test_gaf_association_parser.py +++ b/tests/test_parsers/test_gaf_association_parser.py @@ -4,7 +4,6 @@ from oaklib.datamodels.association import Association from oaklib.parsers import GAF from oaklib.parsers.association_parser_factory import get_association_parser - from tests import INPUT_DIR INPUT_GAF = INPUT_DIR / "test-uniprot.gaf" diff --git a/tests/test_parsers/test_gencc_association_parser.py b/tests/test_parsers/test_gencc_association_parser.py index 8da25b608..0ff3b37eb 100644 --- a/tests/test_parsers/test_gencc_association_parser.py +++ b/tests/test_parsers/test_gencc_association_parser.py @@ -5,7 +5,6 @@ from oaklib.conf import CONF_DIR_PATH from oaklib.parsers import GENCC from oaklib.parsers.association_parser_factory import get_association_parser - from tests import INPUT_DIR G2D_INPUT = INPUT_DIR / "example-g2d.gencc.csv" diff --git a/tests/test_parsers/test_hpoa_association_parser.py b/tests/test_parsers/test_hpoa_association_parser.py index a679a8c04..4cb933bf0 100644 --- a/tests/test_parsers/test_hpoa_association_parser.py +++ b/tests/test_parsers/test_hpoa_association_parser.py @@ -4,7 +4,6 @@ from oaklib.datamodels.association import Association from oaklib.parsers import HPOA from oaklib.parsers.association_parser_factory import get_association_parser - from tests import INPUT_DIR HPOA_INPUT = INPUT_DIR / "test.hpoa.tsv" diff --git a/tests/test_parsers/test_hpoa_g2d_association_parser.py b/tests/test_parsers/test_hpoa_g2d_association_parser.py index 53c90cf7e..f47859c60 100644 --- a/tests/test_parsers/test_hpoa_g2d_association_parser.py +++ b/tests/test_parsers/test_hpoa_g2d_association_parser.py @@ -5,7 +5,6 @@ from oaklib.conf import CONF_DIR_PATH from oaklib.parsers import HPOA_G2D from oaklib.parsers.association_parser_factory import get_association_parser - from tests import INPUT_DIR G2D_INPUT = INPUT_DIR / "example-hpoa-g2d.tsv" diff --git a/tests/test_parsers/test_hpoa_g2p_association_parser.py b/tests/test_parsers/test_hpoa_g2p_association_parser.py index 8eadda55f..6fd808246 100644 --- a/tests/test_parsers/test_hpoa_g2p_association_parser.py +++ b/tests/test_parsers/test_hpoa_g2p_association_parser.py @@ -4,7 +4,6 @@ from oaklib.datamodels.association import Association from oaklib.parsers import HPOA_G2P from oaklib.parsers.association_parser_factory import get_association_parser - from tests import INPUT_DIR G2P_INPUT = INPUT_DIR / "test.hpoa_g2p.tsv" diff --git a/tests/test_parsers/test_mim2gene_association_parser.py b/tests/test_parsers/test_mim2gene_association_parser.py index 455b21398..16fc5b2e7 100644 --- a/tests/test_parsers/test_mim2gene_association_parser.py +++ b/tests/test_parsers/test_mim2gene_association_parser.py @@ -3,7 +3,6 @@ from oaklib.parsers import MEDGEN_MIM_G2D from oaklib.parsers.association_parser_factory import get_association_parser - from tests import INPUT_DIR G2D_INPUT = INPUT_DIR / "example-g2d.mim2gene.tsv" diff --git a/tests/test_parsers/test_obojson_parser.py b/tests/test_parsers/test_obojson_parser.py index d542dc54f..a5da40fac 100644 --- a/tests/test_parsers/test_obojson_parser.py +++ b/tests/test_parsers/test_obojson_parser.py @@ -1,8 +1,8 @@ import unittest from linkml_runtime.loaders import json_loader -from oaklib.datamodels.obograph import GraphDocument +from oaklib.datamodels.obograph import GraphDocument from tests import INPUT_DIR ONT = INPUT_DIR / "go-nucleus.json" diff --git a/tests/test_parsers/test_pairwise_association_parser.py b/tests/test_parsers/test_pairwise_association_parser.py index 4b6d6c757..ee8bade3f 100644 --- a/tests/test_parsers/test_pairwise_association_parser.py +++ b/tests/test_parsers/test_pairwise_association_parser.py @@ -4,7 +4,6 @@ from oaklib.datamodels.association import Association from oaklib.parsers import G2T from oaklib.parsers.association_parser_factory import get_association_parser - from tests import INPUT_DIR INPUT_TSV = INPUT_DIR / "test-pairwise-associations.tsv" diff --git a/tests/test_parsers/test_phaf_association_parser.py b/tests/test_parsers/test_phaf_association_parser.py index fa0f58751..4b9195879 100644 --- a/tests/test_parsers/test_phaf_association_parser.py +++ b/tests/test_parsers/test_phaf_association_parser.py @@ -4,7 +4,6 @@ from oaklib.datamodels.association import Association from oaklib.parsers import PHAF from oaklib.parsers.association_parser_factory import get_association_parser - from tests import INPUT_DIR PHAF_INPUT = INPUT_DIR / "test.phaf.tsv" diff --git a/tests/test_parsers/test_xaf_association_parser.py b/tests/test_parsers/test_xaf_association_parser.py index d19632efb..3a3efa1ed 100644 --- a/tests/test_parsers/test_xaf_association_parser.py +++ b/tests/test_parsers/test_xaf_association_parser.py @@ -4,7 +4,6 @@ from oaklib.datamodels.association import Association from oaklib.parsers.parser_base import ColumnReference from oaklib.parsers.xaf_association_parser import XafAssociationParser - from tests import INPUT_DIR GAF = INPUT_DIR / "test-uniprot.gaf" diff --git a/tests/test_selector.py b/tests/test_selector.py index d8c80495f..35cb52364 100644 --- a/tests/test_selector.py +++ b/tests/test_selector.py @@ -8,6 +8,7 @@ from gilda.grounder import Grounder from gilda.term import Term + from oaklib.datamodels.text_annotator import TextAnnotationConfiguration from oaklib.implementations.gilda import GildaImplementation from oaklib.implementations.ontobee.ontobee_implementation import OntobeeImplementation @@ -19,7 +20,6 @@ AssociationProviderInterface, ) from oaklib.selector import get_adapter, get_resource_from_shorthand - from tests import INPUT_DIR diff --git a/tests/test_utilities/test_association_diffs.py b/tests/test_utilities/test_association_diffs.py index ca48ffa61..924d8001b 100644 --- a/tests/test_utilities/test_association_diffs.py +++ b/tests/test_utilities/test_association_diffs.py @@ -3,13 +3,13 @@ from kgcl_schema.datamodel import kgcl from linkml_runtime.dumpers import yaml_dumper + from oaklib import OntologyResource from oaklib.datamodels.association import Association from oaklib.datamodels.vocabulary import IS_A, LOCATED_IN, PART_OF from oaklib.implementations import ProntoImplementation from oaklib.utilities.associations.association_differ import AssociationDiffer from oaklib.utilities.basic_utils import powerset - from tests import ( IMBO, INPUT_DIR, diff --git a/tests/test_utilities/test_association_index.py b/tests/test_utilities/test_association_index.py index fb30e474f..d6c6ede0d 100644 --- a/tests/test_utilities/test_association_index.py +++ b/tests/test_utilities/test_association_index.py @@ -7,7 +7,6 @@ from oaklib.parsers.parser_base import ColumnReference from oaklib.parsers.xaf_association_parser import XafAssociationParser from oaklib.utilities.associations.association_index import AssociationIndex - from tests import INPUT_DIR GAF = INPUT_DIR / "test-uniprot.gaf" diff --git a/tests/test_utilities/test_boomer_utils.py b/tests/test_utilities/test_boomer_utils.py index 38685a9b0..fc979becc 100644 --- a/tests/test_utilities/test_boomer_utils.py +++ b/tests/test_utilities/test_boomer_utils.py @@ -3,7 +3,6 @@ from oaklib import get_adapter from oaklib.interfaces import MappingProviderInterface from oaklib.utilities.mapping.boomer_utils import BoomerEngine, DiffType - from tests import EXAMPLE_ONTOLOGY_DB, INPUT_DIR, NUCLEUS, VACUOLE EXAMPLE = INPUT_DIR / "boomer-example.md" diff --git a/tests/test_utilities/test_cross_ontology_diff.py b/tests/test_utilities/test_cross_ontology_diff.py index a03781663..18fb4c482 100644 --- a/tests/test_utilities/test_cross_ontology_diff.py +++ b/tests/test_utilities/test_cross_ontology_diff.py @@ -3,6 +3,7 @@ import kgcl_schema.grammar.parser as kgcl_parser import yaml from linkml_runtime.dumpers import yaml_dumper + from oaklib import get_adapter from oaklib.datamodels.cross_ontology_diff import DiffCategory, RelationalDiff from oaklib.datamodels.vocabulary import HAS_PART, IS_A, PART_OF @@ -14,7 +15,6 @@ from oaklib.utilities.mapping.cross_ontology_diffs import ( calculate_pairwise_relational_diff, ) - from tests import ( CELLULAR_COMPONENT, EXAMPLE_ONTOLOGY_OBO, diff --git a/tests/test_utilities/test_disjointness_analysis.py b/tests/test_utilities/test_disjointness_analysis.py index 46a818d2b..f882b46be 100644 --- a/tests/test_utilities/test_disjointness_analysis.py +++ b/tests/test_utilities/test_disjointness_analysis.py @@ -10,7 +10,6 @@ generate_disjoint_class_expressions_axioms, subsumed_by, ) - from tests import ( FUNGI, INPUT_DIR, diff --git a/tests/test_utilities/test_kgcl_utilities.py b/tests/test_utilities/test_kgcl_utilities.py index fa92bbbbd..1df7cf273 100644 --- a/tests/test_utilities/test_kgcl_utilities.py +++ b/tests/test_utilities/test_kgcl_utilities.py @@ -1,7 +1,6 @@ import unittest from oaklib.utilities.kgcl_utilities import parse_kgcl_files - from tests import INPUT_DIR, OUTPUT_DIR TEST_ONT = INPUT_DIR / "go-nucleus.obo" diff --git a/tests/test_utilities/test_lexical_index.py b/tests/test_utilities/test_lexical_index.py index 9882add13..c9de05f4a 100644 --- a/tests/test_utilities/test_lexical_index.py +++ b/tests/test_utilities/test_lexical_index.py @@ -16,7 +16,6 @@ save_lexical_index, ) from oaklib.utilities.ontology_builder import OntologyBuilder - from tests import INPUT_DIR, OUTPUT_DIR TEST_ONT = INPUT_DIR / "go-nucleus.obo" diff --git a/tests/test_utilities/test_logical_definition_summarizer.py b/tests/test_utilities/test_logical_definition_summarizer.py index 41f63c1aa..0c91a2bb0 100644 --- a/tests/test_utilities/test_logical_definition_summarizer.py +++ b/tests/test_utilities/test_logical_definition_summarizer.py @@ -6,7 +6,6 @@ logical_definitions_to_matrix, parse_axes_to_config, ) - from tests import INPUT_DIR TEST_ONT = INPUT_DIR / "go-nucleus.obo" diff --git a/tests/test_utilities/test_mapping_validation.py b/tests/test_utilities/test_mapping_validation.py index 0901f40b8..8434a3b56 100644 --- a/tests/test_utilities/test_mapping_validation.py +++ b/tests/test_utilities/test_mapping_validation.py @@ -1,10 +1,10 @@ import unittest +from sssom_schema import Mapping + from oaklib import get_adapter from oaklib.datamodels.vocabulary import IS_A, PART_OF, SEMAPV, SKOS_EXACT_MATCH from oaklib.utilities.mapping.mapping_validation import validate_mappings -from sssom_schema import Mapping - from tests import CYTOPLASM, FUNGI, INPUT_DIR, NUCLEUS, OUTPUT_DIR, VACUOLE DB = INPUT_DIR / "go-nucleus.db" diff --git a/tests/test_utilities/test_networkx_bridge.py b/tests/test_utilities/test_networkx_bridge.py index bf4d536df..781be4d5c 100644 --- a/tests/test_utilities/test_networkx_bridge.py +++ b/tests/test_utilities/test_networkx_bridge.py @@ -2,6 +2,7 @@ import unittest import networkx as nx + from oaklib.datamodels.vocabulary import IS_A, PART_OF from oaklib.implementations.pronto.pronto_implementation import ProntoImplementation from oaklib.resource import OntologyResource @@ -10,7 +11,6 @@ transitive_reduction, transitive_reduction_by_predicate, ) - from tests import INPUT_DIR, OUTPUT_DIR TEST_ONT = INPUT_DIR / "go-nucleus.obo" diff --git a/tests/test_utilities/test_obograph_utils.py b/tests/test_utilities/test_obograph_utils.py index fd84fc510..7170d5519 100644 --- a/tests/test_utilities/test_obograph_utils.py +++ b/tests/test_utilities/test_obograph_utils.py @@ -4,6 +4,7 @@ from copy import deepcopy from curies import Converter + from oaklib.datamodels.vocabulary import IS_A, PART_OF from oaklib.implementations.pronto.pronto_implementation import ProntoImplementation from oaklib.interfaces.obograph_interface import OboGraphInterface @@ -23,7 +24,6 @@ shortest_paths, trim_graph, ) - from tests import ( CELLULAR_ANATOMICAL_ENTITY, CELLULAR_COMPONENT, diff --git a/tests/test_utilities/test_patternizer.py b/tests/test_utilities/test_patternizer.py index cd18ee7c1..a377a08b2 100644 --- a/tests/test_utilities/test_patternizer.py +++ b/tests/test_utilities/test_patternizer.py @@ -1,6 +1,7 @@ import unittest import yaml + from oaklib.datamodels.vocabulary import ( NEGATIVELY_REGULATES, PART_OF, @@ -17,7 +18,6 @@ lexical_pattern_instances, load_pattern_collection, ) - from tests import INPUT_DIR, MEMBRANE, NUCLEAR_MEMBRANE, NUCLEUS, OUTPUT_DIR TEST_ONT = INPUT_DIR / "go-nucleus.obo" diff --git a/tests/test_utilities/test_pubdb_wrapper.py b/tests/test_utilities/test_pubdb_wrapper.py index f18216dcf..d6bf08271 100644 --- a/tests/test_utilities/test_pubdb_wrapper.py +++ b/tests/test_utilities/test_pubdb_wrapper.py @@ -1,4 +1,5 @@ import pytest + from oaklib.utilities.publication_utils.pubmed_wrapper import PubmedWrapper diff --git a/tests/test_utilities/test_relationship_walker.py b/tests/test_utilities/test_relationship_walker.py index 3b58ed19c..86ac5ec9f 100644 --- a/tests/test_utilities/test_relationship_walker.py +++ b/tests/test_utilities/test_relationship_walker.py @@ -5,7 +5,6 @@ from oaklib.implementations.pronto.pronto_implementation import ProntoImplementation from oaklib.resource import OntologyResource from oaklib.utilities.graph.relationship_walker import walk_down, walk_up - from tests import INPUT_DIR, OUTPUT_DIR TEST_ONT = INPUT_DIR / "go-nucleus.obo" diff --git a/tests/test_utilities/test_roll_up_to_subset.py b/tests/test_utilities/test_roll_up_to_subset.py index b688d0bd5..39c951b49 100644 --- a/tests/test_utilities/test_roll_up_to_subset.py +++ b/tests/test_utilities/test_roll_up_to_subset.py @@ -4,7 +4,6 @@ from oaklib.implementations.sqldb.sql_implementation import SqlImplementation from oaklib.resource import OntologyResource from oaklib.utilities.subsets.slimmer_utils import roll_up_to_named_subset - from tests import INPUT_DIR, OUTPUT_DIR DB = INPUT_DIR / "go-nucleus.db" diff --git a/tests/test_utilities/test_sqlite_utils.py b/tests/test_utilities/test_sqlite_utils.py index 156992c1e..c8f2b6a82 100644 --- a/tests/test_utilities/test_sqlite_utils.py +++ b/tests/test_utilities/test_sqlite_utils.py @@ -7,7 +7,6 @@ sqlite_bulk_load, sqlite_bulk_load2, ) - from tests import INPUT_DIR, OUTPUT_DIR TSV = INPUT_DIR / "foo.tsv" diff --git a/tests/test_utilities/test_sssom_matcher.py b/tests/test_utilities/test_sssom_matcher.py index 8ec1a340e..e144640c9 100644 --- a/tests/test_utilities/test_sssom_matcher.py +++ b/tests/test_utilities/test_sssom_matcher.py @@ -2,6 +2,10 @@ from pathlib import Path import yaml +from sssom.parsers import to_mapping_set_document +from sssom.writers import write_table +from sssom_schema import Mapping + from oaklib import get_adapter from oaklib.datamodels.cross_ontology_diff import EntityReference from oaklib.datamodels.mapping_rules_datamodel import ( @@ -32,10 +36,6 @@ precondition_holds, save_lexical_index, ) -from sssom.parsers import to_mapping_set_document -from sssom.writers import write_table -from sssom_schema import Mapping - from tests import ( CELL_CORTEX, CELL_PERIPHERY, diff --git a/tests/test_utilities/test_subset_analysis.py b/tests/test_utilities/test_subset_analysis.py index 96bf50c32..4d368008f 100644 --- a/tests/test_utilities/test_subset_analysis.py +++ b/tests/test_utilities/test_subset_analysis.py @@ -9,7 +9,6 @@ compare_all_subsets, terms_by_subsets, ) - from tests import INPUT_DIR, OUTPUT_DIR DB = INPUT_DIR / "go-nucleus.db" diff --git a/tests/test_utilities/test_synonymizer.py b/tests/test_utilities/test_synonymizer.py index 3dfb37807..63af405e3 100644 --- a/tests/test_utilities/test_synonymizer.py +++ b/tests/test_utilities/test_synonymizer.py @@ -1,9 +1,9 @@ import pytest from kgcl_schema.grammar.render_operations import render + from oaklib import get_adapter from oaklib.datamodels.synonymizer_datamodel import RuleSet, Synonymizer from oaklib.utilities.lexical.synonymizer import apply_synonymizer, apply_synonymizer_to_terms - from tests import CYTOPLASM, INPUT_DIR, NUCLEAR_MEMBRANE, NUCLEUS TEST_SIMPLE_ONT = INPUT_DIR / "go-nucleus-simple.obo" diff --git a/tests/test_utilities/test_table_filler.py b/tests/test_utilities/test_table_filler.py index 5ca6b18b9..280f7d10e 100644 --- a/tests/test_utilities/test_table_filler.py +++ b/tests/test_utilities/test_table_filler.py @@ -2,12 +2,13 @@ import unittest from copy import deepcopy -import oaklib.datamodels.ontology_metadata as om import yaml from linkml.utils.schema_builder import SchemaBuilder from linkml_runtime.dumpers import yaml_dumper from linkml_runtime.linkml_model import SlotDefinition from linkml_runtime.utils.introspection import package_schemaview + +import oaklib.datamodels.ontology_metadata as om from oaklib.datamodels.vocabulary import IS_A from oaklib.implementations import SqlImplementation from oaklib.implementations.sparql.sparql_implementation import SparqlImplementation @@ -19,7 +20,6 @@ parse_table, write_table, ) - from tests import IMBO, INPUT_DIR, NUCLEAR_ENVELOPE, NUCLEUS, OUTPUT_DIR DB = INPUT_DIR / "go-nucleus.db" diff --git a/tests/test_utilities/test_taxon_constraints.py b/tests/test_utilities/test_taxon_constraints.py index 29750ca0a..80235c2d0 100644 --- a/tests/test_utilities/test_taxon_constraints.py +++ b/tests/test_utilities/test_taxon_constraints.py @@ -3,13 +3,13 @@ from typing import List from linkml_runtime.dumpers import yaml_dumper + from oaklib.datamodels.taxon_constraints import SubjectTerm, Taxon, TaxonConstraint from oaklib.datamodels.vocabulary import IS_A, PART_OF from oaklib.implementations.pronto.pronto_implementation import ProntoImplementation from oaklib.resource import OntologyResource from oaklib.types import TAXON_CURIE from oaklib.utilities.taxon.taxon_constraint_utils import parse_gain_loss_file - from tests import ( BACTERIA, CELLULAR_ORGANISMS, diff --git a/tests/test_utilities/test_unreciprocated_mappings.py b/tests/test_utilities/test_unreciprocated_mappings.py index 9186b59cc..a0ca9a281 100644 --- a/tests/test_utilities/test_unreciprocated_mappings.py +++ b/tests/test_utilities/test_unreciprocated_mappings.py @@ -5,7 +5,6 @@ from oaklib.resource import OntologyResource from oaklib.utilities.mapping.mapping_validation import unreciprocated_mappings from oaklib.utilities.mapping.sssom_utils import mappings_to_pairs - from tests import INPUT_DIR TEST_ONT = INPUT_DIR / "unreciprocated-mapping-test.obo" diff --git a/tests/test_utilities/test_value_set_expander.py b/tests/test_utilities/test_value_set_expander.py index 9d034fe0f..41c59c7ba 100644 --- a/tests/test_utilities/test_value_set_expander.py +++ b/tests/test_utilities/test_value_set_expander.py @@ -2,9 +2,9 @@ from linkml_runtime.linkml_model import EnumDefinition, SchemaDefinition from linkml_runtime.loaders import yaml_loader + from oaklib.datamodels.value_set_configuration import ValueSetConfiguration from oaklib.utilities.subsets.value_set_expander import ValueSetExpander - from tests import ( BACTERIA, EXAMPLE_ONTOLOGY_DB, diff --git a/tests/test_validation/test_definition_ontology_rules.py b/tests/test_validation/test_definition_ontology_rules.py index edf2fc308..70c15dbda 100644 --- a/tests/test_validation/test_definition_ontology_rules.py +++ b/tests/test_validation/test_definition_ontology_rules.py @@ -11,7 +11,6 @@ DefinitionOntologyRule, ) from oaklib.utilities.validation.rule_runner import RuleRunner - from tests import INPUT_DIR, MEMBRANE, NUCLEAR_MEMBRANE, NUCLEUS, OUTPUT_DIR TEST_OUT = OUTPUT_DIR / "lint-test-output.obo" diff --git a/tests/test_validation/test_disjointness_rule.py b/tests/test_validation/test_disjointness_rule.py index f5f3cfc83..e726dd324 100644 --- a/tests/test_validation/test_disjointness_rule.py +++ b/tests/test_validation/test_disjointness_rule.py @@ -1,10 +1,10 @@ import unittest from linkml_runtime.dumpers import yaml_dumper + from oaklib import get_adapter from oaklib.utilities.validation.disjointness_rule import DisjointnessRule from oaklib.utilities.validation.rule_runner import RuleRunner - from tests import INPUT_DIR, OUTPUT_DIR, SUBATOMIC_PARTICLE TEST_OUT = OUTPUT_DIR / "lint-test-output.obo" diff --git a/tests/test_validation/test_lint_utils.py b/tests/test_validation/test_lint_utils.py index 476b14625..2ede0d613 100644 --- a/tests/test_validation/test_lint_utils.py +++ b/tests/test_validation/test_lint_utils.py @@ -6,7 +6,6 @@ from oaklib.interfaces.obograph_interface import OboGraphInterface from oaklib.resource import OntologyResource from oaklib.utilities.validation.lint_utils import lint_ontology - from tests import INPUT_DIR, OUTPUT_DIR TEST_OUT = OUTPUT_DIR / "lint-test-output.obo" diff --git a/tests/test_validation/test_rule_runner.py b/tests/test_validation/test_rule_runner.py index 30628f1c6..4668ddaf8 100644 --- a/tests/test_validation/test_rule_runner.py +++ b/tests/test_validation/test_rule_runner.py @@ -3,7 +3,6 @@ from oaklib.implementations.pronto.pronto_implementation import ProntoImplementation from oaklib.resource import OntologyResource from oaklib.utilities.validation.rule_runner import RuleRunner - from tests import INPUT_DIR, OUTPUT_DIR TEST_OUT = OUTPUT_DIR / "lint-test-output.obo" diff --git a/tox.ini b/tox.ini index 2a2283f7e..aba351f7f 100644 --- a/tox.ini +++ b/tox.ini @@ -42,7 +42,7 @@ deps = skip_install = true commands = black src/ tests/ --exclude src\/oaklib\/datamodels\/.*\.py - ruff --fix src/ tests/ + ruff check --fix src/ tests/ description = Run linters. # This is used for QC checks.