After the last merge related with API refactoring i found some issues with design.
Naming in api_utils module
I think suffix *Helper does not bring much details for the user or developer. In fact, most of the classes help users to do something. In some cases the suffix could be ommited without the loss of meaning: ApiInitialAssumptionsHelper -> InitialAssumptions.
Ofc it's a holy war about naming, but some good points about 'Why Manager/Helper/etc are bad?" can be read here.
Compositions instead of multiple inheritance
It is also related to the previous example: ApiFacade is derived of several interfaces (ApiDataHelper, ApiComposerHelper, ApiMetricsHelper, ApiInitialAssumptionsHelper). However, ApiComposerHelper is also derived from (ApiMetricsHelper, ApiInitialAssumptionsHelper).
The abstract scheme of classes is like:
So it looks like a diamond problem and this could be a mess in a future. I suggest to get rid of multiple inheritance here and implement it via composition.
Minor typos?
Examples:
Maybe it would be useful to add some kind-of pre-commit hooks in order to check PEP issues? Also we could think about our pycharm configuration for formatting and add it to the contribution guide.
After the last merge related with API refactoring i found some issues with design.
I think suffix
*Helper
does not bring much details for the user or developer. In fact, most of the classes help users to do something. In some cases the suffix could be ommited without the loss of meaning: ApiInitialAssumptionsHelper -> InitialAssumptions. Ofc it's a holy war about naming, but some good points about 'Why Manager/Helper/etc are bad?" can be read here.It is also related to the previous example: ApiFacade is derived of several interfaces (ApiDataHelper, ApiComposerHelper, ApiMetricsHelper, ApiInitialAssumptionsHelper). However, ApiComposerHelper is also derived from (ApiMetricsHelper, ApiInitialAssumptionsHelper). The abstract scheme of classes is like:![image](https://user-images.githubusercontent.com/7864250/132678382-f2c1a0aa-4489-4e72-8202-45546ee89779.png)
So it looks like a diamond problem and this could be a mess in a future. I suggest to get rid of multiple inheritance here and implement it via composition.
Examples:
Maybe it would be useful to add some kind-of pre-commit hooks in order to check PEP issues? Also we could think about our pycharm configuration for formatting and add it to the contribution guide.