Skip to content

Commit

Permalink
Release: 0.7.3 (#57)
Browse files Browse the repository at this point in the history
  • Loading branch information
adrien-berchet authored Dec 22, 2023
1 parent 995d9b4 commit cb5d063
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## [0.7.3](https://github.com/BlueBrain/data-validation-framework/compare/0.7.2..0.7.3)

> 22 December 2023
### Fixes

- Attach event hooks to proper classes (Adrien Berchet - [#56](https://github.com/BlueBrain/data-validation-framework/pull/56))

## [0.7.2](https://github.com/BlueBrain/data-validation-framework/compare/0.7.1..0.7.2)

> 22 December 2023
Expand Down
12 changes: 6 additions & 6 deletions data_validation_framework/task.py
Original file line number Diff line number Diff line change
Expand Up @@ -637,10 +637,10 @@ def __specifications__(self):


@BaseValidationTask.event_handler(luigi.Event.SUCCESS)
def success_summary(self):
def success_summary(task):
"""Hook to log a summary report of the task."""
L.info("==========================================")
task_summary = f"SUMMARY {self.task_name}: {self.nb_valid} / {self.nb_total} passed"
task_summary = f"SUMMARY {task.task_name}: {task.nb_valid} / {task.nb_total} passed"
L.info(task_summary)
L.info("==========================================")

Expand Down Expand Up @@ -751,12 +751,12 @@ def validation_function(*args, **kwargs):


@ValidationWorkflow.event_handler(luigi.Event.SUCCESS)
def spec_report(current_task):
def spec_report(task):
"""Hook to create a specification report."""
L.debug("Generating report of %s", current_task)
if current_task.generate_report:
L.debug("Generating report of %s", task)
if task.generate_report:
try:
make_report(current_task, config=current_task.report_config)
make_report(task, config=task.report_config)
# pylint: disable=broad-except
except Exception as e: # pragma: no cover
L.error(
Expand Down

0 comments on commit cb5d063

Please sign in to comment.