There's no validation on Options.get_option. A validation message would remind the user what the valid options are:
from chainladder import options
options.get_option('asdf')
Traceback (most recent call last):
File "/home/ubuntu/Repos/chainladder-python/.venv/lib/python3.14/site-packages/IPython/core/interactiveshell.py", line 3699, in run_code
exec(code_obj, self.user_global_ns, self.user_ns)
~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<ipython-input-4-e63857fae696>", line 1, in <module>
options.get_option('asdf')
~~~~~~~~~~~~~~~~~~^^^^^^^^
File "/home/ubuntu/Repos/chainladder-python/chainladder/__init__.py", line 45, in get_option
return getattr(self, option)
AttributeError: 'Options' object has no attribute 'asdf'
Alternatively, we could deprecate the function. There's not really much in the function other than extracting the attribute. For example
options.get_option("ARRAY_BACKEND")
is the same as (assuming #857 is approved)
Deprecation would reduce maintenance. However, we'd lose the analogue to pandas.get_option.
There's no validation on
Options.get_option. A validation message would remind the user what the valid options are:Alternatively, we could deprecate the function. There's not really much in the function other than extracting the attribute. For example
is the same as (assuming #857 is approved)
Deprecation would reduce maintenance. However, we'd lose the analogue to
pandas.get_option.