Skip to content

Commit

Permalink
initialize session in pypath_common
Browse files Browse the repository at this point in the history
  • Loading branch information
deeenes committed Nov 24, 2023
1 parent 3b018d3 commit 8292a54
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions pypath/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,17 +33,17 @@

from pypath._metadata import __version__, __author__, __license__
from pypath._metadata import metadata as _metadata
from pypath.share import session as _session_mod
from pypath.share import session as _session

session = _session_mod._session('pypath', paths = 'pypath_common')
session = _session.session()


def log():
"""
Browse the current pypath logfile.
"""

_session_mod.log().browse()
session._logger.browse()


def disclaimer():
Expand Down Expand Up @@ -78,7 +78,7 @@ def info(loglevel = -9):
Prints basic information about the current session.
"""

_session_mod.log().msg(
session._logger.msg(
(
'\n'
'\t- session ID: `%s`\n'
Expand All @@ -89,11 +89,11 @@ def info(loglevel = -9):
'\t- imported from: `%s`\n'
'\t- Python version: %s\n'
'\t- Platform: %s'% (
_session_mod.session().label,
session.label,
os.getcwd(),
_session_mod.log().fname,
session._logger.fname,
'\n\t\t- '.join(
map(str, _session_mod.session().config._parsed)
map(str, session.config._parsed)
),
__version__,
os.path.dirname(__file__),
Expand Down

0 comments on commit 8292a54

Please sign in to comment.