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

enhance complete() #18

Open
feth opened this issue Mar 24, 2012 · 4 comments
Open

enhance complete() #18

feth opened this issue Mar 24, 2012 · 4 comments

Comments

@feth
Copy link
Owner

feth commented Mar 24, 2012

maybe provide a start() that accepts an optional id and returns it.

complete would provide a separator, the time elapsed, the iterations number (if relevant)

@GaelVaroquaux
Copy link
Collaborator

I am just wondering if this could be implemented with a context manager:

with logger.progress_report() as progress:
     # Optional
     progress.print_progress()

The name of the different methods/objects are crap, but such an API would give for free the start and stop separator, and implement easily the progress indicator.

@feth
Copy link
Owner Author

feth commented Mar 24, 2012

Nice idea!

@feth
Copy link
Owner Author

feth commented Sep 13, 2012

I suggest the progress_report() could accept many arguments, allowing for a full configuration of the progress.

Arguments that I think of:

  • expected_iterations: even if "complete" will only take place when exiting the context, that allows for a completion information.
  • dot_default_char : character.

@GaelVaroquaux
Copy link
Collaborator

Sounds good.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants