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

Neaten logger-init code #196

Merged
merged 1 commit into from
Jun 25, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
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
12 changes: 4 additions & 8 deletions apis/python/examples/uniformizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,10 @@ def main() -> int:
args = parser.parse_args()

if args.verbose:
# tiledbsc.logging.logger.setLevel(logging.INFO)
# logger = logging.getLogger('tiledbsc')
# logger.setLevel(logging.INFO)
# logging.getLogger("tiledbsc").setLevel(logging.INFO)
# Not able to get any of the above to 'stick'. The following sets level for the whole app,
# not just the tiledbsc library, but that's an acceptable workaround since this CLI does
# nothing except invoke the tiledbsc library.
logging.basicConfig(level=logging.INFO)
tiledbsc.logging.logger.setLevel(logging.INFO)
logger = logging.getLogger("tiledbsc")
logger.setLevel(logging.INFO)
logger.addHandler(logging.StreamHandler())

uniformizer = Uniformizer(
atlas_uri=args.atlas_uri,
Expand Down
12 changes: 4 additions & 8 deletions apis/python/tools/ingestor
Original file line number Diff line number Diff line change
Expand Up @@ -100,14 +100,10 @@ select `relative=True`. (This is the default.)
write_soco = args.soco
verbose = not args.quiet
if verbose:
# tiledbsc.logging.logger.setLevel(logging.INFO)
# logger = logging.getLogger('tiledbsc')
# logger.setLevel(logging.INFO)
# logging.getLogger("tiledbsc").setLevel(logging.INFO)
# Not able to get any of the above to 'stick'. The following sets level for the whole app,
# not just the tiledbsc library, but that's an acceptable workaround since this CLI does
# nothing except invoke the tiledbsc library.
logging.basicConfig(level=logging.INFO)
tiledbsc.logging.logger.setLevel(logging.INFO)
logger = logging.getLogger("tiledbsc")
logger.setLevel(logging.INFO)
logger.addHandler(logging.StreamHandler())

if args.relative is not None:
relative = args.relative[0]
Expand Down
12 changes: 4 additions & 8 deletions apis/python/tools/outgestor
Original file line number Diff line number Diff line change
Expand Up @@ -78,14 +78,10 @@ def main():

verbose = not args.quiet
if verbose:
# tiledbsc.logging.logger.setLevel(logging.INFO)
# logger = logging.getLogger('tiledbsc')
# logger.setLevel(logging.INFO)
# logging.getLogger("tiledbsc").setLevel(logging.INFO)
# Not able to get any of the above to 'stick'. The following sets level for the whole app,
# not just the tiledbsc library, but that's an acceptable workaround since this CLI does
# nothing except invoke the tiledbsc library.
logging.basicConfig(level=logging.INFO)
tiledbsc.logging.logger.setLevel(logging.INFO)
logger = logging.getLogger("tiledbsc")
logger.setLevel(logging.INFO)
logger.addHandler(logging.StreamHandler())

soma = tiledbsc.SOMA(input_path)
tiledbsc.io.to_h5ad(soma, output_path)
Expand Down