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

fix rich markup regression in 0.19.7 #4097

Merged
merged 13 commits into from
Aug 16, 2024
Merged

fix rich markup regression in 0.19.7 #4097

merged 13 commits into from
Aug 16, 2024

Conversation

noklam
Copy link
Contributor

@noklam noklam commented Aug 15, 2024

Description

fix #4094

The root cause is the previous test aren't testing the correct thing. The problem is RichHandler is in the root logger but not DataCatalog internal one.

Development notes

  • Moved the test to test_session.py, as DataCatalog does not related to RichHandler. The RichHandler is more for Kedro project. This mean when someone use DataCatalog alone they won't see the markup log, but that's fine since they are not using RichHandler in that case.
  • Remove lru_cache, the internal function is not used anywhere else and is not a user function. I change it to a internal attribute to DataCatalog.

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

lrcouto and others added 8 commits August 14, 2024 12:25
Signed-off-by: Laura Couto <laurarccouto@gmail.com>
Signed-off-by: Laura Couto <laurarccouto@gmail.com>
Signed-off-by: Laura Couto <laurarccouto@gmail.com>
Signed-off-by: Laura Couto <laurarccouto@gmail.com>
Signed-off-by: Laura Couto <laurarccouto@gmail.com>
Signed-off-by: Nok <nok.lam.chan@quantumblack.com>
@noklam noklam requested a review from merelcht as a code owner August 15, 2024 16:02
@noklam noklam self-assigned this Aug 15, 2024
lrcouto and others added 3 commits August 15, 2024 15:11
Signed-off-by: Laura Couto <laurarccouto@gmail.com>
…aCatalog now

Signed-off-by: Nok <nok.lam.chan@quantumblack.com>
…/kedro into noklam/fix-rich-markup

Signed-off-by: Nok <nok.lam.chan@quantumblack.com>
@noklam noklam requested a review from lrcouto August 15, 2024 19:05
Signed-off-by: Nok <nok.lam.chan@quantumblack.com>
Copy link
Contributor

@lrcouto lrcouto left a comment

Choose a reason for hiding this comment

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

LGTM!

Copy link
Member

@merelcht merelcht left a comment

Choose a reason for hiding this comment

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

I've tried this code and compared it to 0.19.7 and can confirm this now correctly shows highlighting again when using rich and also allows to run Kedro without rich installed! 👍

@noklam noklam enabled auto-merge (squash) August 16, 2024 15:18
@noklam noklam merged commit 3639bae into main Aug 16, 2024
41 checks passed
@noklam noklam deleted the noklam/fix-rich-markup branch August 16, 2024 16:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Rich markup regression in 0.19.7
3 participants