Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions docs/source/changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ chronological order. Releases follow [semantic versioning](https://semver.org/)
releases are available on [PyPI](https://pypi.org/project/pytask) and
[Anaconda.org](https://anaconda.org/conda-forge/pytask).

## 0.5.2 - 2024-09-15

- {pull}`640` stops the live display when an exception happened during the execution.

## 0.5.1 - 2024-07-20

- {pull}`616` and {pull}`632` redesign the guide on "Scaling Tasks".
Expand Down
17 changes: 9 additions & 8 deletions src/_pytask/live.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,14 +174,15 @@ class LiveExecution:
def pytask_execute_build(self) -> Generator[None, None, None]:
"""Wrap the execution with the live manager and yield a table at the end."""
self.live_manager.start()
result = yield
self.live_manager.stop(transient=True)
table = self._generate_table(
reduce_table=False, sort_table=self.sort_final_table, add_caption=False
)
if table is not None:
console.print(table)
return result
try:
return (yield)
finally:
self.live_manager.stop(transient=True)
table = self._generate_table(
reduce_table=False, sort_table=self.sort_final_table, add_caption=False
)
if table is not None:
console.print(table)

@hookimpl(tryfirst=True)
def pytask_execute_task_log_start(self, task: PTask) -> bool:
Expand Down