Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

work toward implementing drs #28

Merged
merged 5 commits into from
Oct 30, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
cleanup
nsheff committed Oct 26, 2023
commit 3b2026ba7c30057d8b55375a12015ddeba5a8d79
4 changes: 2 additions & 2 deletions bbconf/bbconf.py
Original file line number Diff line number Diff line change
@@ -43,14 +43,14 @@
from bbconf.exceptions import MissingConfigDataError, BedBaseConfError
from bbconf.helpers import raise_missing_key, get_bedbase_cfg

os.environ["TF_CPP_MIN_LOG_LEVEL"] = "3" # to suppress verbose warnings tensorflow
# os.environ["TF_CPP_MIN_LOG_LEVEL"] = "3" # to suppress verbose warnings tensorflow
from geniml.text2bednn import text2bednn
from geniml.search import QdrantBackend
from sentence_transformers import SentenceTransformer
from geniml.region2vec import Region2VecExModel
from geniml.io import RegionSet

_LOGGER = getLogger(PKG_NAME)
_LOGGER = getLogger(__name__)

DRS_ACCESS_URL = "{server_url}/objects/{object_id}/access/{access_id}"

26 changes: 19 additions & 7 deletions interactive_testing.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,28 @@
# This provides a short script to explore bbconf interactively
# First you have to set the env vars with something like:
# source ../bedbase.org/environment/production.env

from bbconf import BedBaseConf

import logging
import sys

log = logging.getLogger()
log.setLevel(logging.DEBUG)
stream = logging.StreamHandler(sys.stdout)
stream.setLevel(logging.DEBUG)
log.addHandler(stream)
logging.getLogger("bbconf").setLevel(logging.DEBUG)
def set_up_interactive_logger(package=None) -> logging.Logger:
"""Set up a logger for interactive testing"""
_LOGGER = logging.getLogger(package)
formatter = logging.Formatter('%(asctime)s - %(name)s - %(levelname)s - %(message)s')
stream = logging.StreamHandler(sys.stdout)
stream.setFormatter(formatter)
stream.setLevel(logging.DEBUG)
_LOGGER.addHandler(stream)
_LOGGER.setLevel(logging.DEBUG)
return _LOGGER

_LOGGER = set_up_interactive_logger()
_LOGGER.debug("Test log message")


bbc = BedBaseConf("bedbase.org/config/bedbase2.yaml")
bbc = BedBaseConf("../bedbase.org/config/bedbase.yaml")

bbc.bed.retrieve("78c0e4753d04b238fc07e4ebe5a02984")