Skip to content

Commit

Permalink
No warnings test
Browse files Browse the repository at this point in the history
  • Loading branch information
jjkoehorst committed Aug 17, 2023
1 parent b930842 commit aa0054e
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 4 deletions.
1 change: 1 addition & 0 deletions cwltool/argparser.py
Original file line number Diff line number Diff line change
Expand Up @@ -385,6 +385,7 @@ def arg_parser() -> argparse.ArgumentParser:

volumegroup = parser.add_mutually_exclusive_group()
volumegroup.add_argument("--verbose", action="store_true", help="Default logging")
volumegroup.add_argument("--no-warnings", action="store_true", help="Only print errors.")
volumegroup.add_argument("--quiet", action="store_true", help="Only print warnings and errors.")
volumegroup.add_argument("--debug", action="store_true", help="Print even more logging")

Expand Down
1 change: 0 additions & 1 deletion cwltool/cwlprov/ro.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import os
import shutil
import tempfile
import traceback
import uuid
from pathlib import Path, PurePosixPath
from typing import (
Expand Down
3 changes: 3 additions & 0 deletions cwltool/loghandler.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

def configure_logging(
stderr_handler: logging.Handler,
no_warnings: bool,
quiet: bool,
debug: bool,
enable_color: bool,
Expand All @@ -21,6 +22,8 @@ def configure_logging(
rdflib_logger = logging.getLogger("rdflib.term")
rdflib_logger.addHandler(stderr_handler)
rdflib_logger.setLevel(logging.ERROR)
if no_warnings:
stderr_handler.setLevel(logging.ERROR)
if quiet:
# Silence STDERR, not an eventual provenance log file
stderr_handler.setLevel(logging.WARN)
Expand Down
1 change: 0 additions & 1 deletion cwltool/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
import io
import logging
import os
import shutil
import signal
import subprocess # nosec
import sys
Expand Down
2 changes: 1 addition & 1 deletion tests/test_js_sandbox.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
("v7.7.3\n", True),
]

configure_logging(_logger.handlers[-1], False, True, True, True)
configure_logging(_logger.handlers[-1], False, False, True, True, True)
_logger.setLevel(logging.DEBUG)


Expand Down
2 changes: 1 addition & 1 deletion tests/test_load_tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

from .util import get_data

configure_logging(_logger.handlers[-1], False, True, True, True)
configure_logging(_logger.handlers[-1], False, False, True, True, True)
_logger.setLevel(logging.DEBUG)


Expand Down

0 comments on commit aa0054e

Please sign in to comment.