BETSE 1.3.0
This minor release brings titillating support for configuring wrapper logging and runtime type-checking wrapper parameters.
This minor release resolves 3 issues. Noteworthy changes include:
Features Added
- Wrapper logging configurability. The high-level
betse.science.wrapper.BetseWrapper
class now enables logging to be configured at instantiation time. Specifically, theBetseWrapper.__init__
method now accepts these optional logging-specific parameters:log_filename
, the relative or absolute filename of a file to append logging messages to. When running BETSE on a cluster, users are advised to set this parameter for each process-specificBetseWrapper
instance to a filename isolated to that process. Doing so avoids non-deterministic failures when rotating log files, including a dreaded non-human-readable"OSError: [Errno 116] Stale file handle"
exception emitted when attempting to log to a log file currently being rotated by a competing BETSE process.log_level
, a string-based enumeration configuring the global logging level (e.g.,"ALL"
,"DEBUG"
,"NONE"
). If specified, this global logging level overrides the optionalverbose
parameter accepted by various public methods of theBetseWrapper
class.
- Wrapper parameter runtime type-checking. All parameters passed to all
BetseWrapper
methods are now type-checked at runtime viabeartype
, a performance-friendly third-party pure-Python package.
Dependencies Added
- Beartype ≥ 0.10.0. BETSE now requires a reasonably recent version of
beartype
as a mandatory runtime dependency.
Issues Resolved
- Fast solver
Dm_cells
export. BETSE's fast solver now properly exportsDm_cells
as a function of time.
Deprecations Resolved
-
license_file
->license_files
insetup.cfg
. This release resolves a mostly negligiblesetuptools
deprecation warning concerning the deprecatedlicense_file
setting in the top-levelsetup.cfg
file:/usr/lib/python3.8/site-packages/setuptools/config/setupcfg.py:508: SetuptoolsDeprecationWarning: The license_file parameter is deprecated, use license_files instead.
-
numpy.distutil.__config__
->numpy.__config__
. This release resolves a deprecation warning emitted under NumPy ≥ 1.23.0 when importing anything from thenumpy.distutil
submodule. Specifically, this commit generalizes thebetse.lib.numpy.numpys
submodule to preferably import the actively maintainednumpy.__config__
submodule under NumPy ≥ 1.23.0 before falling back to importing the deprecatednumpy.distutil.__config__
submodule under NumPy < 1.23.0. Doing so improves the likelihood that BETSE will behave as expected under NumPy ≥ 1.24.0, where the deprecatednumpy.distutil
submodule is expected to be removed entirely.
Tests Improved
- Wrapper testing. The high-level
betse.science.wrapper.BetseWrapper
class against a barrage of integration tests, including:test_wrapper_default()
, exercising that class with default parameters running an initialization phase.test_wrapper_logging()
, exercising that class with various non-default logging parameters running an initialization phase.
- Test suite restructured. Our test suite has been restructured so as to ensure that lower-level unit tests are exercised before higher-level integration tests -- improving the readability of test failures when the former fail.
(Planiform plant form!)