Skip to content

Support verbose command option#85

Open
ftylitak wants to merge 10 commits into
scientifichackers:masterfrom
insighio:support-verbose-messages
Open

Support verbose command option#85
ftylitak wants to merge 10 commits into
scientifichackers:masterfrom
insighio:support-verbose-messages

Conversation

@ftylitak
Copy link
Copy Markdown
Contributor

@ftylitak ftylitak commented Dec 9, 2019

Add support to "-v, --verbose" option to the cli.

This will enable printing of progress messages regarding the files that are being handled at the moment.

Affected operations:

  • mkdir
  • put
  • rm
  • rmdir
  • run

(also some whitespaces have been removed automatically by the linter.)

@devxpy
Copy link
Copy Markdown
Member

devxpy commented Jan 22, 2020

This is a good idea, thanks!

But the implementation you proposed looks a little ugly to me.

I'd be much more comfortable with a logging based solution.

Then we can just have the --verbose switch on the common cli() entrypoint instead of each command, and call Logger.setLevel() there.

@ftylitak
Copy link
Copy Markdown
Contributor Author

Hello @devxpy

here are the changes for the logging implementation.

I have updated the branch to your latest changes and made the logging implementation on top....though (for a reason that I do not know) github sees as commits of this pull request also commits that took place after the initial submission of the Pull Request.

If you want the Pull Request to be cleaner, I could close this PR and open a new one.

Waiting for your feedback.

@ftylitak ftylitak force-pushed the support-verbose-messages branch from c5ee7ed to c0427a3 Compare July 16, 2020 09:27
@ftylitak ftylitak force-pushed the support-verbose-messages branch from c0427a3 to 8b83a71 Compare July 16, 2020 12:53
@ftylitak
Copy link
Copy Markdown
Contributor Author

ftylitak commented Jul 16, 2020

@devxpy finally did a reset and rebase to get rid of all the irrelevant commits. I hope now it would be easier to review.

curiouswala added a commit that referenced this pull request Apr 16, 2026
)

PR #85 cherry-pick: add logging.debug() calls at the start of every
Files method (get, ls, mkdir, put, rm, rmdir, run). Logging is silent
by default and activates when the caller configures the 'ampy.files'
logger at DEBUG level. User-facing output (print) is unchanged.

PR #88 EISDIR decision: auto-falling back from rm to rmdir when a
directory is encountered was intentionally not implemented — it would
silently delete directory contents without user confirmation. The
existing "Is a directory (use rmdir to remove)" error is safer.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants