Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable rich markup if rich handler is not present #3682

Merged
merged 22 commits into from
Jul 5, 2024

Conversation

sbrugman
Copy link
Contributor

@sbrugman sbrugman commented Mar 4, 2024

Description

Fix for #3626

Only used in Data Catalog (2x)

Done in Github UI to start the discussion.
Will add unit tests, and add release notes.

Developer Certificate of Origin

We need all contributions to comply with the Developer Certificate of Origin (DCO). All commits must be signed off by including a Signed-off-by line in the commit message. See our wiki for guidance.

If your PR is blocked due to unsigned commits, then you must follow the instructions under "Rebase the branch" on the GitHub Checks page for your PR. This will retroactively add the sign-off to all unsigned commits and allow the DCO check to pass.

Checklist

  • Read the contributing guidelines
  • Signed off each commit with a Developer Certificate of Origin (DCO)
  • Opened this PR as a 'Draft Pull Request' if it is work-in-progress
  • Updated the documentation to reflect the code changes
  • Added a description of this change in the RELEASE.md file
  • Added tests to cover my changes
  • Checked if this change will affect Kedro-Viz, and if so, communicated that with the Viz team

@sbrugman sbrugman marked this pull request as ready for review March 4, 2024 18:43
@sbrugman sbrugman requested a review from merelcht as a code owner March 4, 2024 18:43
kedro/logging.py Outdated Show resolved Hide resolved
@merelcht merelcht added the Community Issue/PR opened by the open-source community label Mar 27, 2024
@josephfinlayson
Copy link

I would like this to go in please

@noklam noklam enabled auto-merge (squash) April 22, 2024 21:37
@noklam noklam disabled auto-merge April 22, 2024 21:37
noklam and others added 2 commits April 22, 2024 22:37
Signed-off-by: Simon Brugman <sbrugman@users.noreply.github.com>
@sbrugman sbrugman requested a review from noklam May 28, 2024 10:58
@noklam
Copy link
Contributor

noklam commented May 28, 2024

Just leaving a comment here we didn't forget about this PR as we discussed internally.

I will shortly review this PR.

Copy link
Contributor

@noklam noklam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor comments:

  • fmt_rich -> _format_rich, not a big improvement but I don't think we use fmt anywhere in the codebase
  • modify the method to internals _ one, I don't think any of these should be public API at this point.

@sbrugman
Copy link
Contributor Author

Thanks, will do

Signed-off-by: L. R. Couto <57910428+lrcouto@users.noreply.github.com>
@lrcouto
Copy link
Contributor

lrcouto commented Jul 2, 2024

minor comments:

* `fmt_rich` -> `_format_rich`, not a big improvement but I don't think we use `fmt` anywhere in the codebase

* modify the method to internals `_` one, I don't think any of these should be public API at this point.

Seconding this.

Signed-off-by: lrcouto <laurarccouto@gmail.com>
@lrcouto
Copy link
Contributor

lrcouto commented Jul 2, 2024

Reverting the previous merge I did because it broke some tests. Probably gonna need a rebase because of the DCO issue though.

kedro/logging.py Outdated
@@ -54,3 +55,15 @@ def __init__(self, *args: Any, **kwargs: Any):
# fixed on their side at some point, but until then we disable it.
# See https://github.com/Textualize/rich/issues/2455
rich.traceback.install(**traceback_install_kwargs) # type: ignore[arg-type]


# @cache is supported from 3.9 onwards
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: I would just leave out this comment; pyupgrade will take care of it when drop 3.8.

lrcouto and others added 6 commits July 2, 2024 16:13
Signed-off-by: lrcouto <laurarccouto@gmail.com>
Signed-off-by: lrcouto <laurarccouto@gmail.com>
Signed-off-by: lrcouto <laurarccouto@gmail.com>
Signed-off-by: lrcouto <laurarccouto@gmail.com>
Signed-off-by: Nok <nok.lam.chan@quantumblack.com>
@noklam noklam requested review from deepyaman and noklam July 5, 2024 10:43
@noklam noklam requested a review from lrcouto July 5, 2024 10:44
@noklam noklam merged commit a179f87 into kedro-org:main Jul 5, 2024
34 checks passed
@sbrugman sbrugman deleted the patch-4 branch July 9, 2024 09:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Community Issue/PR opened by the open-source community
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants