-
-
Notifications
You must be signed in to change notification settings - Fork 79
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
--verbose
flag added to CLI
#234
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## dev #234 +/- ##
==========================================
+ Coverage 99.44% 99.45% +0.01%
==========================================
Files 4 4
Lines 709 718 +9
Branches 108 108
==========================================
+ Hits 705 714 +9
Misses 2 2
Partials 2 2 ☔ View full report in Codecov by Sentry. |
samila/__main__.py
Outdated
@@ -76,13 +88,17 @@ def main(): | |||
data=args.load_data, | |||
config=args.load_config, | |||
) | |||
if args.verbose: | |||
print("[LOG] GenerativeImage object created.") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Move all messages to params.py
samila/__main__.py
Outdated
gi.save_image(args.save_image, args.depth) | ||
result = gi.save_image(args.save_image, args.depth) | ||
if args.verbose: | ||
print("[LOG] Image save. Result: ", result) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
saved
samila/__main__.py
Outdated
gi.save_data(args.save_data) | ||
result = gi.save_data(args.save_data) | ||
if args.verbose: | ||
print("[LOG] Data save. Result: ", result) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
saved
samila/__main__.py
Outdated
gi.save_config(args.save_config) | ||
result= gi.save_config(args.save_config) | ||
if args.verbose: | ||
print("[LOG] Config save. Result: ", result) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
saved
samila/__main__.py
Outdated
if not args.no_display: | ||
plt.show() | ||
|
||
if args.save_image: | ||
gi.save_image(args.save_image, args.depth) | ||
result = gi.save_image(args.save_image, args.depth) | ||
if args.verbose: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For all three saving sections (image
, data
, and config
), we should check result["status"]
and print different messages.
For example:
-
Success
"[LOG] Image saved. File address: ", result["message"])
-
Failed
"[ERROR] Image not saved. Message: ", result["message"])
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🚀
What does this implement/fix? Explain your changes.
--verbose
flag added to Samila CLI