Skip to content

Commit

Permalink
add details_formatted to LogEntry
Browse files Browse the repository at this point in the history
  • Loading branch information
FynnBe committed Oct 14, 2024
1 parent c282ce7 commit f43d964
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions bioimageio_collection_backoffice/db_structure/log.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ class LogEntry(Node, frozen=True, extra="ignore"):
details: Any = None
"""log details"""

details_formatted: Optional[str] = None
"""log details formatted as markdown"""

timestamp: datetime = Field(default_factory=datetime.now)
"""creation of log entry"""

Expand Down
1 change: 1 addition & 0 deletions bioimageio_collection_backoffice/run_dynamic_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ def run_dynamic_tests(
LogEntry(
message=f"bioimageio.core {bioimageio.core.__version__} test {summary.status}",
details=summary,
details_formatted=summary.format(),
)
)
report = CompatiblityReport(
Expand Down
1 change: 1 addition & 0 deletions bioimageio_collection_backoffice/validate_format.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ def validate_format(rv: Union[RecordDraft, Record]):
LogEntry(
message=rd.validation_summary.name,
details=rd.validation_summary,
details_formatted=rd.validation_summary.format(),
)
)
return dynamic_test_cases, conda_envs
Expand Down

0 comments on commit f43d964

Please sign in to comment.