MCPcopy Create free account
hub / github.com/Materials-Consortia/optimade-python-tools / OptimadeClientProgress

Class OptimadeClientProgress

optimade/client/utils.py:100–120  ·  view source on GitHub ↗

A wrapper around `Rich.Progress` that defines the OPTIMADE client progressbars.

Source from the content-addressed store, hash-verified

98
99
100class OptimadeClientProgress(Progress):
101 """A wrapper around `Rich.Progress` that defines the OPTIMADE client progressbars."""
102
103 def __init__(self):
104 super().__init__(
105 SpinnerColumn(finished_text="[green]✓"),
106 TextColumn("[progress.description]{task.description}"),
107 BarColumn(),
108 TaskProgressColumn(
109 text_format="[progress.completed]{task.completed}/[progress.total]{task.total}",
110 text_format_no_percentage="[progress.completed]{task.completed}",
111 ),
112 TimeElapsedColumn(),
113 console=Console(stderr=True),
114 auto_refresh=True,
115 refresh_per_second=10,
116 )
117
118 def print(self, *args, **kwargs):
119 if not self.disable:
120 super().print(*args, **kwargs)
121
122
123@contextmanager

Callers 3

__init__Method · 0.90
countMethod · 0.90
list_propertiesMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected