Skip to content

Commit

Permalink
tox -e format
Browse files Browse the repository at this point in the history
  • Loading branch information
hrshdhgd committed Aug 15, 2024
1 parent 13d8475 commit fbc62a0
Show file tree
Hide file tree
Showing 75 changed files with 50 additions and 79 deletions.
1 change: 0 additions & 1 deletion tests/integration_tests/test_sqlite_full.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
4 changes: 2 additions & 2 deletions tests/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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,
Expand Down
Original file line number Diff line number Diff line change
@@ -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

Expand Down
2 changes: 1 addition & 1 deletion tests/test_converters/test_obo_format.py
Original file line number Diff line number Diff line change
Expand Up @@ -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__)
Expand Down
2 changes: 1 addition & 1 deletion tests/test_converters/test_obo_graph_to_cx.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion tests/test_converters/test_obo_graph_to_fhir.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion tests/test_converters/test_obo_graph_to_obo_format.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@

import curies
from linkml_runtime.loaders import json_loader

from oaklib import OntologyResource
from oaklib.converters.obo_graph_to_obo_format_converter import (
OboGraphToOboFormatConverter,
)
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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion tests/test_datamodels/test_obograph_datamodel.py
Original file line number Diff line number Diff line change
@@ -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

Expand Down
2 changes: 1 addition & 1 deletion tests/test_datamodels/test_ontology_metadata_datamodel.py
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down
1 change: 1 addition & 0 deletions tests/test_datamodels/test_search_datamodel.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion tests/test_datamodels/test_text_annotator_datamodel.py
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down
2 changes: 1 addition & 1 deletion tests/test_datamodels/test_validation_datamodel.py
Original file line number Diff line number Diff line change
@@ -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


Expand Down
2 changes: 1 addition & 1 deletion tests/test_implementations/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion tests/test_implementations/test_aggregator.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
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,
)
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,
Expand Down
2 changes: 1 addition & 1 deletion tests/test_implementations/test_bioportal.py
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down
1 change: 0 additions & 1 deletion tests/test_implementations/test_cx.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion tests/test_implementations/test_funowl.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
1 change: 0 additions & 1 deletion tests/test_implementations/test_gilda.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

from oaklib.datamodels.text_annotator import TextAnnotationConfiguration
from oaklib.implementations import GildaImplementation

from tests import CELL_CORTEX

try:
Expand Down
1 change: 0 additions & 1 deletion tests/test_implementations/test_ncbigene.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion tests/test_implementations/test_obograph.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -22,7 +23,6 @@
index_graph_edges_by_subject,
index_graph_nodes,
)

from tests import (
CELL,
CELLULAR_COMPONENT,
Expand Down
2 changes: 1 addition & 1 deletion tests/test_implementations/test_ols.py
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down
1 change: 0 additions & 1 deletion tests/test_implementations/test_ontobee.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
1 change: 1 addition & 0 deletions tests/test_implementations/test_pantherdb.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import unittest

import pytest

from oaklib import get_adapter
from oaklib.interfaces.association_provider_interface import (
AssociationProviderInterface,
Expand Down
2 changes: 1 addition & 1 deletion tests/test_implementations/test_pronto.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -22,7 +23,6 @@
from oaklib.utilities.validation.definition_ontology_rule import (
DefinitionOntologyRule,
)

from tests import (
CELL,
CELLULAR_COMPONENT,
Expand Down
2 changes: 1 addition & 1 deletion tests/test_implementations/test_robot_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion tests/test_implementations/test_simple_obo.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -34,7 +35,6 @@
index_graph_edges_by_subject,
index_graph_nodes,
)

from tests import (
BIOLOGICAL_ENTITY,
CELL,
Expand Down
1 change: 0 additions & 1 deletion tests/test_implementations/test_sparql.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
index_graph_edges_by_subject,
index_graph_nodes,
)

from tests import (
CATALYTIC_ACTIVITY,
CELL_CORTEX,
Expand Down
6 changes: 3 additions & 3 deletions tests/test_implementations/test_sqldb.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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,
Expand Down
1 change: 0 additions & 1 deletion tests/test_implementations/test_ubergraph.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
1 change: 0 additions & 1 deletion tests/test_implementations/test_uniprot.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
from oaklib.interfaces.association_provider_interface import (
AssociationProviderInterface,
)

from tests import INPUT_DIR

PROTEIN_PATH = INPUT_DIR / "uniprot-P12345.json"
Expand Down
1 change: 1 addition & 0 deletions tests/test_implementations/test_wikidata.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down
Loading

0 comments on commit fbc62a0

Please sign in to comment.