Skip to content

Commit

Permalink
Hotfix for edges from master
Browse files Browse the repository at this point in the history
Plus issues with isort and black
  • Loading branch information
wshayes committed Mar 6, 2020
1 parent ee897a1 commit c5460d8
Show file tree
Hide file tree
Showing 29 changed files with 85 additions and 19 deletions.
2 changes: 2 additions & 0 deletions bel/Config.py
Expand Up @@ -10,6 +10,7 @@
~/.belbio_{conf|secrets} (dotfiles in home directory)
"""

# Standard Library
import collections
import copy
import functools
Expand All @@ -18,6 +19,7 @@
import re
from typing import Any, Mapping, MutableMapping

# Third Party Imports
import yaml

log = logging.getLogger(__name__)
Expand Down
2 changes: 2 additions & 0 deletions bel/__init__.py
Expand Up @@ -2,8 +2,10 @@
# BEL FUNCTION IMPORTS #
########################

# Standard Library
import logging

# Local Imports
import bel.db
import bel.edge
import bel.lang
Expand Down
10 changes: 7 additions & 3 deletions bel/cli/scripts.py
@@ -1,10 +1,17 @@
# Standard Library
import gzip
import json
import logging
import logging.config
import re
import sys

# Third Party Imports
import click
import timy
import yaml

# Local Imports
import bel.Config
import bel.db.arangodb
import bel.db.elasticsearch
Expand All @@ -13,9 +20,6 @@
import bel.nanopub.files as bnf
import bel.nanopub.nanopubs as bnn
import bel.utils as utils
import click
import timy
import yaml
from bel.Config import config
from bel.lang.belobj import BEL

Expand Down
6 changes: 5 additions & 1 deletion bel/db/elasticsearch.py
@@ -1,11 +1,15 @@
# Standard Library
import logging
import os

# Third Party Imports
import elasticsearch.helpers
import yaml
from bel.Config import config
from elasticsearch import Elasticsearch

# Local Imports
from bel.Config import config

log = logging.getLogger(__name__)

cur_dir_name = os.path.dirname(os.path.realpath(__file__))
Expand Down
6 changes: 5 additions & 1 deletion bel/edge/computed.py
@@ -1,11 +1,15 @@
# Compute Edges related code

# Standard Library
import copy
from typing import Any, List, Mapping, MutableSequence

from bel.lang.ast import BELAst, Function, NSArg
# Third Party Imports
from structlog import get_logger

# Local Imports
from bel.lang.ast import BELAst, Function, NSArg

log = get_logger()

# Typings
Expand Down
1 change: 1 addition & 0 deletions bel/edge/edges.py
Expand Up @@ -292,6 +292,7 @@ def generate_assertion_edge_info(
causal_edge_type = []
if "causal" in bo.spec["relations"]["info"][assertion["relation"]]["categories"]:
edge_types.append("causal")
causal_edge_type = ["causal"]

edge_info = {
"edge_types": edge_types,
Expand Down
6 changes: 5 additions & 1 deletion bel/lang/migrate_1_2.py
Expand Up @@ -5,12 +5,16 @@
# Migrate BEL from 1 to 2.0.0
#

# Standard Library
import json

# Third Party Imports
import structlog

# Local Imports
import bel
import bel.lang.ast
import bel.lang.partialparse
import structlog
from bel import BEL
from bel.Config import config
from bel.lang.ast import BELAst, Function, NSArg, StrArg
Expand Down
6 changes: 5 additions & 1 deletion bel/lang/partialparse.py
Expand Up @@ -9,14 +9,18 @@
"""
# Standard Library
import copy
import logging
import logging.config
import re
from typing import Any, List, Mapping, MutableMapping, Optional, Tuple

import bel.lang.bel_specification as bel_specification
# Third Party Imports
import structlog

# Local Imports
import bel.lang.bel_specification as bel_specification
from bel.Config import config
from bel.lang.ast import BELAst, Function, NSArg, StrArg

Expand Down
2 changes: 2 additions & 0 deletions bel/nanopub/belscripts.py
Expand Up @@ -13,6 +13,7 @@
*
"""

# Standard Library
import collections
import copy
import csv
Expand All @@ -21,6 +22,7 @@
import re
import sys

# Third Party Imports
import structlog
import yaml

Expand Down
6 changes: 5 additions & 1 deletion bel/nanopub/validate.py
@@ -1,9 +1,13 @@
# Standard Library
import re
from typing import Tuple

# Third Party Imports
import structlog

# Local Imports
import bel.db.elasticsearch
import bel.lang.belobj
import structlog
from bel.Config import config

log = structlog.getLogger(__name__)
Expand Down
10 changes: 7 additions & 3 deletions bel/resources/namespace.py
@@ -1,15 +1,19 @@
# Standard Library
import copy
import gzip
import json
from typing import IO

# Third Party Imports
import timy
from arango import ArangoError
from structlog import get_logger

# Local Imports
import bel.db.arangodb as arangodb
import bel.db.elasticsearch as elasticsearch
import bel.utils
import timy
from arango import ArangoError
from bel.Config import config
from structlog import get_logger

# import structlog
# import logging
Expand Down
10 changes: 7 additions & 3 deletions bel/resources/ortholog.py
@@ -1,14 +1,18 @@
# Standard Library
import gzip
import json
from typing import IO

import bel.db.arangodb as arangodb
import bel.utils
# Third Party Imports
import timy
from arango import ArangoError
from bel.Config import config
from structlog import get_logger

# Local Imports
import bel.db.arangodb as arangodb
import bel.utils
from bel.Config import config

log = get_logger()


Expand Down
8 changes: 6 additions & 2 deletions bel/resources/resource.py
@@ -1,15 +1,19 @@
# Standard Library
import copy
import gzip
import json

# Third Party Imports
import timy
from structlog import get_logger

# Local Imports
import bel.db.arangodb as arangodb
import bel.db.elasticsearch as elasticsearch
import bel.resources.namespace
import bel.resources.ortholog
import bel.utils
import timy
from bel.Config import config
from structlog import get_logger

log = get_logger()

Expand Down
10 changes: 7 additions & 3 deletions bel/scripts.py
@@ -1,10 +1,17 @@
# Standard Library
import gzip
import json
import logging
import logging.config
import re
import sys

# Third Party Imports
import click
import timy
import yaml

# Local Imports
import bel.Config
import bel.db.arangodb
import bel.db.elasticsearch
Expand All @@ -13,9 +20,6 @@
import bel.nanopub.files as bnf
import bel.nanopub.nanopubs as bnn
import bel.utils as utils
import click
import timy
import yaml
from bel.Config import config
from bel.lang.belobj import BEL

Expand Down
2 changes: 2 additions & 0 deletions docs/source/conf.py
Expand Up @@ -18,9 +18,11 @@
# documentation root, use os.path.abspath to make it absolute, like shown here.
#

# Standard Library
import os
import sys

# Third Party Imports
import sphinx_rtd_theme

# To get ReadTheDocs working - autodoc missing modules error
Expand Down
1 change: 1 addition & 0 deletions tests/edge/test_computed_edges.py
@@ -1,3 +1,4 @@
# Local Imports
import bel.edge.computed
import bel.lang.belobj
from bel.Config import config
Expand Down
1 change: 1 addition & 0 deletions tests/edge/test_create_edges.py
@@ -1,3 +1,4 @@
# Local Imports
import bel.edge.edges
import pytest
from bel.Config import config
Expand Down
1 change: 1 addition & 0 deletions tests/lang/test_ast.py
@@ -1,3 +1,4 @@
# Local Imports
import bel.lang.ast
import bel.lang.bel_utils
import bel.lang.belobj
Expand Down
1 change: 1 addition & 0 deletions tests/lang/test_auto_version.py
@@ -1,3 +1,4 @@
# Local Imports
from bel.lang.bel_utils import _default_to_version

EXAMPLE_AVAILABLE_VERSIONS = ["1.0.0", "0.0.3", "3.0.1", "2.0.1", "2.0.0", "6.1.1", "0.5.1"]
Expand Down
1 change: 1 addition & 0 deletions tests/lang/test_belobj.py
@@ -1,3 +1,4 @@
# Local Imports
import bel.db.arangodb
import bel.lang.ast
import bel.lang.bel_utils
Expand Down
1 change: 1 addition & 0 deletions tests/lang/test_canonicalize.py
@@ -1,3 +1,4 @@
# Local Imports
import bel.Config
import bel.lang.bel_utils
import bel.lang.belobj
Expand Down
1 change: 1 addition & 0 deletions tests/lang/test_orthologize.py
@@ -1,3 +1,4 @@
# Local Imports
import bel.lang.belobj
import pytest
from bel.Config import config
Expand Down
1 change: 1 addition & 0 deletions tests/lang/test_parse.py
@@ -1,3 +1,4 @@
# Local Imports
import bel.lang.belobj
import pytest
from bel.Config import config
Expand Down
1 change: 1 addition & 0 deletions tests/lang/test_semantic_checks.py
@@ -1,3 +1,4 @@
# Local Imports
import bel.lang.belobj
import pytest
from bel.Config import config
Expand Down
1 change: 1 addition & 0 deletions tests/lang/test_syntax_checks.py
@@ -1,3 +1,4 @@
# Local Imports
import bel.lang.belobj
from bel.Config import config

Expand Down
2 changes: 2 additions & 0 deletions tests/nanopub/test_nanopub_to_edge.py
@@ -1,6 +1,8 @@
# Standard Library
import json
import os

# Local Imports
import bel.nanopub.nanopubs as nb
import pytest

Expand Down
2 changes: 2 additions & 0 deletions tests/nanopub/test_nanopub_validation.py
@@ -1,7 +1,9 @@
# import bel.nanopub.nanopubs as nb
# import yaml
# Standard Library
import os

# Local Imports
import pytest

local_dir = os.path.dirname(__file__)
Expand Down
2 changes: 2 additions & 0 deletions tests/nanopub/test_pubmed.py
@@ -1,6 +1,8 @@
# Standard Library
import json
import time

# Local Imports
import bel.nanopub.pubmed


Expand Down
1 change: 1 addition & 0 deletions tests/terms/test_terms.py
@@ -1,3 +1,4 @@
# Local Imports
import bel.terms.terms


Expand Down

0 comments on commit c5460d8

Please sign in to comment.