Skip to content

Modular printing#358

Draft
MarcMush wants to merge 6 commits intotimholy:masterfrom
MarcMush:newprinting
Draft

Modular printing#358
MarcMush wants to merge 6 commits intotimholy:masterfrom
MarcMush:newprinting

Conversation

@MarcMush
Copy link
Collaborator

@MarcMush MarcMush commented Mar 6, 2026

following #357

this is a draft of what could look like modularity

defining ProgressElements
the default printing (similar to current) is
("Progress: ", ProgressPercentage(), " ", ProgressBar(), " ", ProgressETA(), ", ", ProgressSpeed())

This is absolutely not ready for merging, it only applies to Progress, doesn't have adaptative width, I've removed some code, and didn't test much

I'd like some feedback to see if that's the direction we want to go

@MarcMush
Copy link
Collaborator Author

MarcMush commented Mar 6, 2026

this is how to use it at the moment:

using ProgressMeter
using ProgressMeter: ProgressElements,ProgressPercentage,ProgressBar,ProgressETA,ProgressSpeed

elements = ProgressElements(("Computing...", ProgressPercentage(), " ", ProgressBar(length=30)," ", ProgressETA(), ", ", ProgressSpeed()))

p = Progress(20; elements)

for i in 1:20
    sleep(0.1)
    next!(p)
end

@MarcMush MarcMush changed the title Printing with elements Modular printing Mar 6, 2026
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

Successfully merging this pull request may close these issues.

1 participant