Skip to content

Commit

Permalink
Merge pull request #16 from eccenca/feature/workflowReportSameEntitie…
Browse files Browse the repository at this point in the history
…s-CMEM-3664

Added ExecutionReport.sample_entities
  • Loading branch information
seebi authored Sep 12, 2024
2 parents db19ca6 + fe69199 commit c588f2b
Show file tree
Hide file tree
Showing 4 changed files with 99 additions and 50 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](https://semver.org/)

## Unreleased

### Added

- The execution report also contains sample entities now (CMEM-3664):
- For plugins that don't update the execution report by themselves, DataIntegration will automatically add sample entities.
- Plugins that update the execution report can add sample entities to `ExecutionReport.sample_entities`.

## [4.7.0] 2024-06-13

### Added
Expand Down
5 changes: 5 additions & 0 deletions cmem_plugin_base/dataintegration/context.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
from dataclasses import dataclass, field
from typing import Optional, Tuple, Literal

from cmem_plugin_base.dataintegration.entity import Entities


class SystemContext:
"""Passed into methods to request general system information."""
Expand Down Expand Up @@ -72,6 +74,9 @@ class ExecutionReport:
"""Error message in case a fatal error occurred. If an error is set, the workflow
execution will be stopped after the operator has been executed."""

sample_entities: Optional[Entities] = None
"""Sample of entities that were output by this task."""


class ReportContext:
"""Passed into workflow plugins that may generate a report during execution."""
Expand Down
135 changes: 85 additions & 50 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ types-requests = "^2.31.0.1"
wheel = "^0.38.4"
# added in order to have something to discover (>=0.0.0 <1.0.0)
# cmem-plugin-examples = "*"
pytest-dotenv = "^0.5.2"

[build-system]
requires = ["poetry-core>=1.0.0", "poetry-dynamic-versioning"]
Expand Down

0 comments on commit c588f2b

Please sign in to comment.