Skip to content

Commit

Permalink
rtd tuning
Browse files Browse the repository at this point in the history
  • Loading branch information
wshayes committed Jan 25, 2018
1 parent 378252f commit 4ebe5cb
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 42 deletions.
31 changes: 0 additions & 31 deletions bel/db/scripts.py

This file was deleted.

1 change: 0 additions & 1 deletion bel/lang/completion.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@

from bel.Config import config

# logging.config.dictConfig(config['logging'])
log = logging.getLogger(__name__)

default_bel = config['bel']['lang']['default_bel_version']
Expand Down
3 changes: 2 additions & 1 deletion bel/lang/partialparse.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@

from bel.Config import config

logging.config.dictConfig(config['logging'])
if config.get('logging', False):
logging.config.dictConfig(config.get('logging'))
log = logging.getLogger(__name__)

start_arg_chars = ['(', ',']
Expand Down
10 changes: 5 additions & 5 deletions bel/nanopub/edges.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
from typing import Mapping, Any, List
import copy
import itertools
import yaml
import os

import bel.lang.belobj
Expand All @@ -19,6 +18,8 @@
import bel.utils as utils
import bel.nanopub.files as files

from bel.Config import config

import logging
log = logging.getLogger(__name__)

Expand Down Expand Up @@ -276,11 +277,10 @@ def main():
module_fn = os.path.basename(__file__)
module_fn = module_fn.replace('.py', '')

logging_conf_fn = "./logging-conf.yaml"
if config.get('logging', False):
logging.config.dictConfig(config.get('logging'))

with open(logging_conf_fn, mode='r') as f:
logging.config.dictConfig(yaml.load(f))
log = logging.getLogger(f'{module_fn}')
log = logging.getLogger(f'{module_fn}')

main()

3 changes: 2 additions & 1 deletion bel/nanopub/pubmed.py
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,8 @@ def main():

if __name__ == '__main__':

logging.config.dictConfig(config['logging'])
if config.get('logging', False):
logging.config.dictConfig(config.get('logging'))
log = logging.getLogger(__name__)

main()
Expand Down
3 changes: 2 additions & 1 deletion bel/scripts.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
import logging
import logging.config

logging.config.dictConfig(config.get('logging', {}))
if config.get('logging', False):
logging.config.dictConfig(config.get('logging'))
log = logging.getLogger(__name__)


Expand Down
2 changes: 0 additions & 2 deletions docs/source/script.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,12 @@ The BEL CLI commands are installed by pip install bel. These are nested commands
for which you can review the help at each nested level by:

*belc* stands for BEL CLI (Command Line Interface)

.. code-block:: bash
belc --help
belc stmt --help
belc stmt canonicalize --help
.. click:: bel.scripts:belc
:prog: belc
:show-nested:
Expand Down

0 comments on commit 4ebe5cb

Please sign in to comment.