Transport-for-the-North / caf.toolkit

Toolkit of transport planning and appraisal functionalities.
https://caftoolkit.readthedocs.io/en/stable/
Other
0 stars 2 forks source link

pandas_vector_zone_translation should warn when unique index parameters are missing instead of erroring #103

Closed wsp-mbuckley closed 1 week ago

wsp-mbuckley commented 9 months ago

The from_unique_index and to_unique_index parameters can be inferred from the data so the parameters should be optional. However, a warning should be raised as it is preferred to include the parameters for sense checks of the translation process and infilling.

BenTaylor-TfN commented 9 months ago

Please can you link to the functions / code you're referring to here to make it clearer?

wsp-mbuckley commented 9 months ago

The generic translation function (pandas_vector_zone_translation) should contain the inferring / warning for the unique index parameters, as this wraps the other 2 functions. The other 2 functions should have the index parameters be mandatory, as people are more likely to use the wrapper function anyway.

BenTaylor-TfN commented 1 week ago

fixed in #117