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

replace tqdm, termcolor, tabulate with rich #2374

Merged
merged 22 commits into from
Sep 27, 2024

Conversation

fariss
Copy link
Collaborator

@fariss fariss commented Sep 17, 2024

closes #2100

Checklist

  • No CHANGELOG update needed
  • No new tests needed
  • No documentation update needed

capa/__init__.py Outdated Show resolved Hide resolved
Comment on lines -150 to -152
# Ghidrathon interpreter cannot properly handle
# the TMonitor thread that is created via a monitor_interval
# > 0
Copy link
Collaborator

Choose a reason for hiding this comment

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

before merge we'll have to test and ensure the new implementation also works under Ghidra, which has some weird restrictions.

@mr-tz
Copy link
Collaborator

mr-tz commented Sep 20, 2024

Let's also add a few more rendering tests and test_main_non_ascii_filename_nonexistent needs to be fixed.

Copy link
Collaborator

@williballenthin williballenthin left a comment

Choose a reason for hiding this comment

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

please address the logging configuration comments, and then we're ready to go! thanks @s-ff

capa/main.py Outdated Show resolved Hide resolved
capa/main.py Outdated Show resolved Hide resolved
capa/main.py Outdated Show resolved Hide resolved
capa/render/utils.py Show resolved Hide resolved
Copy link
Collaborator

@williballenthin williballenthin left a comment

Choose a reason for hiding this comment

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

🎉

logging.getLogger().setLevel(logging.DEBUG)
else:
logging.basicConfig(level=logging.INFO)
Copy link
Collaborator

Choose a reason for hiding this comment

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

good fix, thanks for remembering this


# use RichHandler for root logger
logging.getLogger().addHandler(rich_handler)

Copy link
Collaborator

Choose a reason for hiding this comment

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

looks great, thank you!

@williballenthin williballenthin merged commit 51a4eb4 into mandiant:master Sep 27, 2024
25 checks passed
@mr-tz
Copy link
Collaborator

mr-tz commented Sep 27, 2024

Thanks, the new output looks great in my testing so far!

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.

Use rich to replace tqdm, tabulate, termcolor, etc.
3 participants