Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
  • F FEDOT
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 87
    • Issues 87
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 1
    • Merge requests 1
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • ITMO-NSS-team
  • FEDOT
  • Issues
  • #422

Closed
Open
Created Sep 09, 2021 by Elizaveta Lutsenko@LizLutsenkoOwner

Options to improve design in fedot.api module

Created by: J3FALL

After the last merge related with API refactoring i found some issues with design.

  • Naming in api_utils module image

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: image

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:

image image

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.

Assignee
Assign to
Time tracking