Skip to content

Commit

Permalink
add verbose flag to CLI
Browse files Browse the repository at this point in the history
  • Loading branch information
ale94mleon committed Nov 25, 2023
1 parent d8f10c1 commit ef6c927
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion src/moldrug/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,12 @@ def __init__(self, parser) -> None:
self.fitness = self.args.fitness
self.outdir = self.args.outdir
self.continuation = self.args.continuation
self.verbose = self.args.verbose
self._set_attributes()

if self.verbose:
os.environ['MOLDRUG_VERBOSE'] = 'True'

def _set_attributes(self):
# Get and set configuration
self._set_config()
Expand Down Expand Up @@ -304,7 +308,14 @@ def __moldrug_cmd():
'-v', '--version',
action='version',
version=f"moldrug: {__version__}")

parser.add_argument(
'-V', '--verbose',
nargs="?",
dest='verbose',
const=True,
default=False,
type=bool
)
UserArgs = CommandLineHelper(parser)

print(
Expand Down

0 comments on commit ef6c927

Please sign in to comment.