Skip to content

Commit

Permalink
Merge pull request #86 from Materials-Data-Science-and-Informatics/fi…
Browse files Browse the repository at this point in the history
…x/log_format

Fix/log format
  • Loading branch information
mustafasoylu authored Apr 30, 2024
2 parents 77c9345 + 0972820 commit 6257f3a
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 8 deletions.
3 changes: 2 additions & 1 deletion .somesy.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "somesy"
version = "0.4.1"
version = "0.4.2"
description = "A CLI tool for synchronizing software project metadata."
keywords = ["metadata", "FAIR"]
license = "MIT"
Expand Down Expand Up @@ -29,6 +29,7 @@ orcid = "https://orcid.org/0000-0002-5077-7497"

contribution = "Concepts, tool development and enhancement, documentation."
contribution_begin = "2023-03-01"
contribution_end = "2023-04-30"
contribution_types = ["ideas", "code", "test", "review", "doc"]

author = true
Expand Down
8 changes: 6 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,15 @@ Here we provide notes that summarize the most important changes in each released

Please consult the changelog to inform yourself about breaking changes and security issues.

## [v0.4.1](https://github.com/Materials-Data-Science-and-Informatics/somesy/tree/v0.4.1) <small>(2024-02-??)</small> { id="0.4.1" }
## [v0.4.2](https://github.com/Materials-Data-Science-and-Informatics/somesy/tree/v0.4.2) <small>(2024-04-30)</small> { id="0.4.2" }

* fix rich logging bug for error messages and tracebacks

## [v0.4.1](https://github.com/Materials-Data-Science-and-Informatics/somesy/tree/v0.4.1) <small>(2024-04-08)</small> { id="0.4.1" }

* fix package.json and mkdocs.yml validation bug about optional fields

## [v0.4.0](https://github.com/Materials-Data-Science-and-Informatics/somesy/tree/v0.4.0) <small>(2024-02-??)</small> { id="0.4.0" }
## [v0.4.0](https://github.com/Materials-Data-Science-and-Informatics/somesy/tree/v0.4.0) <small>(2024-03-08)</small> { id="0.4.0" }

* added separate `documentation` URL to Project metadata model
* added support for Julia `Project.toml` file
Expand Down
2 changes: 1 addition & 1 deletion CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ type: software
message: If you use this software, please cite it using this metadata.

title: somesy
version: 0.4.1
version: 0.4.2
abstract: A CLI tool for synchronizing software project metadata.
url: https://materials-data-science-and-informatics.github.io/somesy
repository-code: https://github.com/Materials-Data-Science-and-Informatics/somesy
Expand Down
2 changes: 1 addition & 1 deletion codemeta.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
],
"name": "somesy",
"description": "A CLI tool for synchronizing software project metadata.",
"version": "0.4.1",
"version": "0.4.2",
"keywords": [
"metadata",
"FAIR"
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "somesy"
version = "0.4.1"
version = "0.4.2"
description = "A CLI tool for synchronizing software project metadata."
authors = ["Mustafa Soylu <m.soylu@fz-juelich.de>", "Anton Pirogov <a.pirogov@fz-juelich.de>"]
maintainers = ["Mustafa Soylu <m.soylu@fz-juelich.de>"]
Expand Down
9 changes: 7 additions & 2 deletions src/somesy/cli/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

import typer
import wrapt
from rich.markup import escape
from rich.pretty import pretty_repr

from somesy.core.core import discover_input
Expand Down Expand Up @@ -33,8 +34,12 @@ def wrap_exceptions(wrapped, instance, args, kwargs):
return wrapped(*args, **kwargs)

except Exception as e:
logger.error(f"[bold red]Error: {e}[/bold red]")
logger.debug(f"[red]{traceback.format_exc()}[/red]")
# Escape the error message to prevent Rich from misinterpreting it
escaped_error_message = escape(str(e))
escaped_traceback = escape(traceback.format_exc())

logger.error(f"[bold red]Error: {escaped_error_message}[/bold red]")
logger.debug(f"[red]{escaped_traceback}[/red]")
raise typer.Exit(code=1) from e


Expand Down

0 comments on commit 6257f3a

Please sign in to comment.