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

[BUG] RAM warning rendering #238

Open
ieivanov opened this issue Oct 19, 2022 · 3 comments
Open

[BUG] RAM warning rendering #238

ieivanov opened this issue Oct 19, 2022 · 3 comments
Labels
enhancement New feature or request
Milestone

Comments

@ieivanov
Copy link
Contributor

recOrder RAM warning renders funny on some machines - see screenshot from NIC

image

@ziw-liu
Copy link
Contributor

ziw-liu commented Oct 20, 2022

It's because the message has hardcoded line breaks:

message = " \n".join(
textwrap.wrap(
f"recOrder reconstructions often require more than the {gb_available:.1f} "
f"GB of RAM that this computer is equipped with. We recommend starting with reconstructions of small "
f"volumes ~1000 x 1000 x 10 and working up to larger volumes while monitoring your RAM usage with "
f"Task Manager or htop.",
)

@ziw-liu
Copy link
Contributor

ziw-liu commented Oct 20, 2022

I think it was wrote in this way to accommodate terminals that do not auto-wrap long lines. But I agree that a nicer look should be implemented when we rework the logging/notification system of recOrder (see related discussion in #172).

@ziw-liu ziw-liu added the enhancement New feature or request label Oct 20, 2022
@ziw-liu ziw-liu added this to the 1.0.0 milestone Oct 20, 2022
@talonchandler
Copy link
Collaborator

Thanks for flagging.

IIRC if I didn't add linebreaks the napari warning window would hide most of the message after an ellipses.

Adding the linebreaks improved the look of the message on the machines I tested, but Qt + napari must be making different choices for different screen resolutions.

I expect a fix will require a better understanding of napari's notification system.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants