-
Notifications
You must be signed in to change notification settings - Fork 626
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
Add verbosity flag for MPB #1302
Conversation
…into place with a simple `make`
In addition...
|
…ribute. This will help with transitioning while the feature rolls out.
I think the remaining test failures are all due to using a libmpb that does not have a |
When running interactively from Python, e.g. in Jupyter notebooks, we probably want to set verbosity to 1 by default. |
* Return the prior verbosity level setting. Change the parameter name to `level` * Add verbosity level global variable, and a Python function for setting it * Switch the verbosity value and related code to a class * switch parameter name to `level`, prep for reuse with other cvars * Move verbosity module to meep * Rename module to avoid name conflicts with names of instances * Restore returning the former level from set() * Use the Verbosity class in meep * Add ability to set the initial level * Make sure we use mpb's verbosity flag, and not colliding with meep's * Move the creation of the verbosity obj so it's available when submodules are imported * Add explicit rules for the meep.mpb .py files so they will be copied into place with a simple `make` * Add verbosity checks in solver.py * Add verbosity checks in libpympb/pympb.cpp * Revert a Makefile change * Handle the case where a cvar object does not yet have a verbosity attribute. This will help with transitioning while the feature rolls out. * Python2 doesn't have f-strings * empty commit to trigger build * Support building with an older MPB which doesn't have the mpb_verbosity global * Set the verbosity default to 1 * match MPB Co-authored-by: Steven G. Johnson <[email protected]>
See NanoComp/mpb#116 and NanoComp/mpb#119
Currently all verbosity checks are checking for
>=2
so more fine-tuning will be needed to adjust the levels tested for the specific messages.