Open drewejohnson opened 5 years ago
When the settings interface is removed and/or deprecated, the command line interface subcommand list
should be adjusted and/or removed
https://github.com/CORE-GATECH-GROUP/serpent-tools/blob/d6b65c8d5dc605fe5ca429e75047eb2b7e56530c/serpentTools/__main__.py#L159-L171
Tentative plan from #516
rc
objectrc[x] = y
raises a deprecation warning encouraging users to configure the readers at construction. Tests are updated to avoid using the rc
objectrc
object and all settings infrastructure is removed from the codebase.For a deprecation, it's technically API compatible. But the full removal will be not compatible
I've been mulling something over for the past few months, and I think we can and should completely remove the settings interface. Instead, all of the functionality can be passed to the readers at construction.
Most of readers just pull from the
rc
global to create attributes during the construction. Instead ofone would instead use
The benefits are
rc
as a context manager]The
rc
object and the capabilities allowed are a powerful feature ofserpentTools
IMHO. So naturally we will want to preserve this control, but try and reduce the pain of this switch.Impact
Anyone who uses the
rc
object will be impacted. I frequently use these settings to control what data is read from depletion and result files.Roll out
Version 0.9.0
rc.__setitem__
raiseFutureWarnings
indicating deprecation and swift removal__init__
methods for various readers that rely on these settings. If values are not explicitly provided, e.g. areNone
, pull the defaults fromrc
Version 0.9.1 or later
serpentTools.settings
interfacerc