Renamed cpl to cpl_core & added config and services as arguments to startup

This commit is contained in:
2021-08-07 11:21:30 +02:00
parent cac80657df
commit 1c6794dc40
24 changed files with 83 additions and 78 deletions

View File

@@ -8,7 +8,7 @@ from cpl_core.dependency_injection.service_provider_abc import ServiceProviderAB
class ServiceCollectionABC(ABC):
r"""ABC for the class :class:`cpl.dependency_injection.service_collection.ServiceCollection`"""
r"""ABC for the class :class:`cpl_core.dependency_injection.service_collection.ServiceCollection`"""
@abstractmethod
def __init__(self):
@@ -20,9 +20,9 @@ class ServiceCollectionABC(ABC):
Parameter
---------
db_context: Type[:class:`cpl.database.context.database_context_abc.DatabaseContextABC`]
db_context: Type[:class:`cpl_core.database.context.database_context_abc.DatabaseContextABC`]
Database context
db_settings: :class:`cpl.database.database_settings.DatabaseSettings`
db_settings: :class:`cpl_core.database.database_settings.DatabaseSettings`
Database settings
"""
pass
@@ -77,6 +77,6 @@ class ServiceCollectionABC(ABC):
Returns
-------
Object of type :class:`cpl.dependency_injection.service_provider_abc.ServiceProviderABC`
Object of type :class:`cpl_core.dependency_injection.service_provider_abc.ServiceProviderABC`
"""
pass

View File

@@ -10,7 +10,7 @@ class ServiceDescriptor:
---------
implementation: Union[:class:`type`, Optional[:class:`object`]]
Object or type of service
lifetime: :class:`cpl.dependency_injection.service_lifetime_enum.ServiceLifetimeEnum`
lifetime: :class:`cpl_core.dependency_injection.service_lifetime_enum.ServiceLifetimeEnum`
Lifetime of the service
"""

View File

@@ -16,11 +16,11 @@ class ServiceProvider(ServiceProviderABC):
Parameter
---------
service_descriptors: list[:class:`cpl.dependency_injection.service_descriptor.ServiceDescriptor`]
service_descriptors: list[:class:`cpl_core.dependency_injection.service_descriptor.ServiceDescriptor`]
Descriptor of the service
config: :class:`cpl.configuration.configuration_abc.ConfigurationABC`
config: :class:`cpl_core.configuration.configuration_abc.ConfigurationABC`
CPL Configuration
db_context: Optional[:class:`cpl.database.context.database_context_abc.DatabaseContextABC`]
db_context: Optional[:class:`cpl_core.database.context.database_context_abc.DatabaseContextABC`]
Database representation
"""

View File

@@ -4,7 +4,7 @@ from typing import Type, Optional
class ServiceProviderABC(ABC):
r"""ABC for the class :class:`cpl.dependency_injection.service_provider.ServiceProvider`"""
r"""ABC for the class :class:`cpl_core.dependency_injection.service_provider.ServiceProvider`"""
@abstractmethod
def __init__(self):