Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Replace table in TerminalWriter.progress docstring

  • Loading branch information...
commit 55a93ff89112d6e26158124141afe04ccd5637b3 1 parent 280759a
Daniel Neuhäuser authored

Showing 1 changed file with 37 additions and 25 deletions. Show diff stats Hide diff stats

  1. +37 25 brownie/terminal/__init__.py
62 brownie/terminal/__init__.py
@@ -521,31 +521,43 @@ def progress(self, description, maxsteps=None, widgets=None):
521 521
522 522 The following widgets are available:
523 523
524   - +--------------+------------------------+--------------+--------------+
525   - | Name | Requires Initial Value | ... Argument | ... maxsteps |
526   - +==============+========================+==============+==============+
527   - | `hint` | Optional | Op. (`hint`) | No |
528   - +--------------+------------------------+--------------+--------------+
529   - | `percentage` | No | No | Yes |
530   - +--------------+------------------------+--------------+--------------+
531   - | `bar` | No | No | No |
532   - +--------------+------------------------+--------------+--------------+
533   - | `sizedbar` | No | No | Yes |
534   - +--------------+------------------------+--------------+--------------+
535   - | `step` | Optional | No | Yes |
536   - +--------------+------------------------+--------------+--------------+
537   - | `time` | No | No | No |
538   - +--------------+------------------------+--------------+--------------+
539   - | `speed` | No | No | No |
540   - +--------------+------------------------+--------------+--------------+
541   -
542   - As you can see there are other things you have to think about as well;
543   - certain widgets require that
544   - :meth:`~brownie.terminal.progress.ProgressBar.next` is called with a
545   - keyword argument to show additional information.
546   -
547   - Furthermore some widgets require that the number of steps is known in
548   - order to calculate the percentage, ETA or similar things.
  524 + `hint`
  525 + Shows a string of text that can be given using the `hint` argument
  526 + at any update performed with :meth:`.ProgressBar.init`,
  527 + :meth:`.ProgressBar.next` or :meth:`.ProgressBar.finish`. If the
  528 + argument is not given an empty string is used instead.
  529 +
  530 + `percentage`
  531 + Shows the progress in percent; this requires `maxsteps` to be set.
  532 +
  533 + `bar`
  534 + Shows a simple bar which moves which each update not corresponding
  535 + with the progress being made. This is useful if you just want to
  536 + show that something is happening.
  537 +
  538 + `sizedbar`
  539 + Shows a simple progress bar which is being filled corresponding
  540 + to the percentage of progress. This requires `maxsteps` to be
  541 + set.
  542 +
  543 + `step`
  544 + Shows the current at maximum number of steps as ``step of steps``,
  545 + this method takes an initial value determining the unit of each
  546 + step e.g. if each step represents a byte and you choose `bytes`
  547 + as a unit a reasonable prefix will be chosen.
  548 +
  549 + Supported units:
  550 +
  551 + - `bytes` - Uses a binary prefix.
  552 +
  553 + This requires `maxsteps` to be set.
  554 +
  555 + `time`
  556 + Shows the elapsed time in hours, minutes and seconds.
  557 +
  558 + `speed`
  559 + Shows the speed in bytes (or with a reasonable prefix) per seconds,
  560 + this assumes that each `step` represents a byte.
549 561
550 562 If you want to implement your own widget(s) take a look at
551 563 :class:`brownie.terminal.progress.Widget`, you can use them by passing

0 comments on commit 55a93ff

Please sign in to comment.
Something went wrong with that request. Please try again.