frequenz-floss / frequenz-sdk-python

Frequenz Python Software Development Kit (SDK)
https://frequenz-floss.github.io/frequenz-sdk-python/
MIT License
13 stars 17 forks source link

Split the `frequenz.sdk.actor` package to its own repository #851

Open llucax opened 5 months ago

llucax commented 5 months ago

What's needed?

We need to allow cloud applications to be able to write actors without depending on the microgrid.

Proposed solution

Split the frequenz.sdk.actor package to its own repository:

Use cases

All the cloud apps.

Alternatives and workarounds

For now we've been copying protobuf files from the common API repo to the API repos that should depend on common to break the dependency, but this is clearly not sustainable.

Additional context

This is a very complicated, multi-dimensional, problem, involving many parts. Is part (and one way) to solve the dependency conflict of the SDK depending on the microgrid API v0.15 (and common v0.4) and the new API clients depending on common v0.5.

shsms commented 5 months ago

I like frequenz.actor.base, because it is the base class for all actors. but works badly for namespaced imports from frequenz.actor import base.

Maybe frequenz.actor.actor_base?

llucax commented 5 months ago

Maybe, what about frequenz.actor.actor? It is a bit redundant but it should work more naturally with the imports.

I will try if there is any way to still use the frequenz.actor module, that is definitely the ideal, but I don´t have very high expectations to succeed.

shsms commented 5 months ago

it would be actor inception 3 levels deep:

from frequenz.actor import actor

class A(actor.Actor):
llucax commented 5 months ago

Malkovich

llucax commented 5 months ago

image

I just did a test and we can use frequenz.actor :tada:

As long as only one wheel is defining frequenz/actor/__init__.py it seems to be fine.

llucax commented 2 weeks ago

This will actually be moved to the new core repository, as having a repo just for one class doesn't seem to have a lot of sense... Updating the issue title and description.