Skip to content

Split logic from implementation #379

@CasperWA

Description

@CasperWA

In order to not have to reproduce the same logic in a Python-based backend for clients, which is currently done in OTELib, it would be nice to separate out the logic that's happening in the endpoint functions to an importable library/package.

I suggest the following steps to achieve this:

  1. Separate out the logic from the endpoint functions into a separate top-module's/package's functions in this repository.
  2. Move the top-module to OTEAPI Core as a new main sub-module.

The latter should also make it possible to more easily generate testing fixtures and hooks for OTEAPI plugins directly importable from the OTEAPI Core package - a package all the plugins already depend on.

Note, this should not change the perceived functionality of the REST API.

Finally, the Python-backend in OTELib can be updated eventually, also providing no noticeable user differences in functionality here, but for both this repository as well as OTELib, the developer experience should greatly improve.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions