Giter Club home page Giter Club logo

progress-table's People

Contributors

sjmikler avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

progress-table's Issues

[FEATURE] Colorful embedded progress bar

Currently, when progress bar is embedded and the head is behind some text it will not be visible. Add an option (possibly default) to have a colorful bar that would be visible behind the text (like htop has)

[BUG] pip install seemingly not working

Hello. Thank you for your amazing work. Looks really interesting and I really would like to implement it in my pytorch training loop.
However, when installing using pip and trying your proposed example, the import fails with error:

File "/usr/local/lib/python3.10/site-packages/progress_table/init.py", line 3, in
from progress_table.v0.progress_table import ProgressTableV0
ModuleNotFoundError: No module named 'progress_table.v0'

I'm working in a conda environment with python 3.10.
Maybe there's some issue with the Pypi installer? Thank you for any help you could give me.

[FEATURE] Support for colors on the row level

Thanks for the library, been using it in a personal project and its been nice, just opening up a few issues that I'll hopefully be able to pitch in on.

I have a use case for setting color on the row level, somewhat dynamically. Each of my rows can either pass or fail (sort of like a test) and it would be nice to highlight them when they do fail.

[FEATURE] Support for multiline rows

Most modern terminal support cursor movements well. After playing with nested progress bars I think we could support rows with multiple lines in progress-table.

Adding this functionality will require a minor rewrite of the library.

Going further, we could allow to modify previously finished cells.

Example API:

table = ProgressTable(
wrap=True, # enables wrapping lines that are overflowing instead of clipping (which is default)
)

...

# Editing existing column
row_number = 10
column_name = "test"
new_cell_value = "new value"
table[row_number, column_name] = new_cell_value

[FEATURE] Nested/multi level progress

This is a handy feature in tqdm and it works well for a row based table UX like progress-table has. I'd like to use it to show both the overall progress of the table (since the user doesn't know how many rows are to come) as well as the progress for the current row.

Add borders between rows?

Would it be possible to add borders between rows? The table becomes hard to read with a lot of data between epochs. I tried looking into the style argument, but that seems to mostly govern coloring

Screen Shot 2023-09-29 at 5 06 40 PM

[FEATURE] Handling progress bars as objects

It would be nice to be able to treat progress bars as objects and update them manually.

This is available in tqdm:

pbar = tqdm(total=100)
for i in range(10):
    sleep(0.1)
    pbar.update(10)
pbar.close()

The suggestion is to have the equivalent in progress-table:

pbar = table.pbar(total=100)
for i in range(10):
    sleep(0.1)
    pbar.update(10)
pbar.close()

[FEATURE] Allow for progress character customization

I'm currently using monkey patching to customize the appearance of the embedded progress bar

SymbolsUnicodeBare.embedded_pbar_filled = "-" 

It looks like there is a dataclass that defines Symbol, which could potentially just be accepted by the table constructor and used as an override for all of the symbols that are used.

There might be a little x-y problem here too. I was content using the default progress bar but I want my current row to be visible and that option is tangled up in the embedded progress bar atm. I would be content with the default embedded progress bar style but it's the same color as my tmux toolbar and it rubs right up against it which makes it barely visible. Having an empty line at the bottom of the table to separate the embedded progress bar wold probably also fix my issue.

Since I'm monkey patching anyway, I was going to use some cool symbols like , but that doesn't really work unless we can also specify separate symbols for the past progress vs the current head of the progress line, which would let you make nice progress bars like this

──────────╼

[BUG] Outputs to wrong sys.stdout when default arguments are used

Problem

If one replaces sys.stdout with a custom stream, progress-table does still output to the old stream (usually standard out), even if the table is created and initialized AFTER the stream has been replaced.

The reason for this is the default argument file=sys.stdout, that gets evaluated when the module is imported for the first time and NOT when an actual table object is created. This can be hard to spot!

Suggested Solution

Replace the default argument with file=None and set it to sys.stdout in the constructor. This delays the evaluation of sys.stdout to the time at which a table object is actually created.

Even better: Officially accept None values for file as part of the interface and, in that case, retrieve sys.stdout on each write/flush instead of on object creation. This would allow one to redirect the output of progress-table even long after a table object has been created. The old behavior, i.e. sticking to a single, specific stream for all eternity, can still be achieved by explicitly passing file=sys.stdout to the constructor.

[FEATURE] Modify existing header

Whenever filling cells when header was not yet printed, they won't be displayed.

This is because the header can be changed (new columns can be added).

This should be overcome by modifying the existing header. New values should be displayed and whenever a new column is added, header should be re-printed.

[FEATURE] Continuous progress bar

For my table, I don't actually know when the items will finish. They shell out to a subprocess where anything can happen. Having a spinner/bouncing option would be nice there so highlight that things are happening but the end isn't known. I think I'd have to manually fake this by just making it fill up slowly and then rush to 100% when the subprocess finishes without this feature.

[FEATURE] Pandas as an optional dependency

It looks like pandas is only being used to export data from the table. It's a rather large dependency for a feature that I don't plan on using. Any opposition to making it an optional dependency and surrounding the import with an exception error message that tells you to install pandas if you want to export the table in pandas format?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.