Added services
This commit is contained in:
parent
7f1abc54ca
commit
d4d5b0b9cb
@ -2,10 +2,11 @@
|
||||
"WorkspaceSettings": {
|
||||
"DefaultProject": "py_to_uxf",
|
||||
"Projects": {
|
||||
"py_to_uxf": "src/py_to_uxf/py_to_uxf.json"
|
||||
"py_to_uxf": "src/py_to_uxf/py_to_uxf.json",
|
||||
"py_to_uxf_core": "src/py_to_uxf_core/py_to_uxf_core.json"
|
||||
},
|
||||
"Scripts": {
|
||||
"build-start": "cpl build; cd dist/py_to_uxf/build/py_to_uxf; echo \"Starting:\"; bash py_to_uxf --path ./",
|
||||
"build-start": "cpl build; cd dist/py_to_uxf/build/py_to_uxf; echo \"Starting:\"; bash py_to_uxf ./",
|
||||
"bs": "cpl build-start"
|
||||
}
|
||||
}
|
||||
|
@ -39,6 +39,8 @@
|
||||
"*/tests"
|
||||
],
|
||||
"PackageData": {},
|
||||
"ProjectReferences": []
|
||||
"ProjectReferences": [
|
||||
"../py_to_uxf_core/py_to_uxf_core.json"
|
||||
]
|
||||
}
|
||||
}
|
@ -5,6 +5,11 @@ from cpl_core.configuration import ConfigurationABC, ConsoleArgument
|
||||
from cpl_core.dependency_injection import ServiceProviderABC, ServiceCollectionABC
|
||||
from cpl_core.environment import ApplicationEnvironment
|
||||
|
||||
from py_to_uxf_core.abc.python_parser_abc import PythonParserABC
|
||||
from py_to_uxf_core.abc.umlet_creator_abc import UmletCreatorABC
|
||||
from py_to_uxf_core.service.python_parser_service import PythonParserService
|
||||
from py_to_uxf_core.service.umlet_creator_service import UmletCreatorService
|
||||
|
||||
|
||||
class Startup(StartupABC):
|
||||
|
||||
@ -18,4 +23,7 @@ class Startup(StartupABC):
|
||||
return configuration
|
||||
|
||||
def configure_services(self, services: ServiceCollectionABC, environment: ApplicationEnvironment) -> ServiceProviderABC:
|
||||
services.add_singleton(PythonParserABC, PythonParserService)
|
||||
services.add_singleton(UmletCreatorABC, UmletCreatorService)
|
||||
|
||||
return services.build_service_provider()
|
||||
|
25
src/py_to_uxf_core/__init__.py
Normal file
25
src/py_to_uxf_core/__init__.py
Normal file
@ -0,0 +1,25 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
"""
|
||||
py_to_uxf
|
||||
~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
|
||||
|
||||
:copyright: (c)
|
||||
:license:
|
||||
|
||||
"""
|
||||
|
||||
__title__ = 'py_to_uxf_core'
|
||||
__author__ = ''
|
||||
__license__ = ''
|
||||
__copyright__ = 'Copyright (c) '
|
||||
__version__ = '0.0.0'
|
||||
|
||||
from collections import namedtuple
|
||||
|
||||
# imports
|
||||
|
||||
VersionInfo = namedtuple('VersionInfo', 'major minor micro')
|
||||
version_info = VersionInfo(major='0', minor='0', micro='0')
|
25
src/py_to_uxf_core/abc/__init__.py
Normal file
25
src/py_to_uxf_core/abc/__init__.py
Normal file
@ -0,0 +1,25 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
"""
|
||||
py_to_uxf
|
||||
~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
|
||||
|
||||
:copyright: (c)
|
||||
:license:
|
||||
|
||||
"""
|
||||
|
||||
__title__ = 'py_to_uxf_core.abc'
|
||||
__author__ = ''
|
||||
__license__ = ''
|
||||
__copyright__ = 'Copyright (c) '
|
||||
__version__ = '0.0.0'
|
||||
|
||||
from collections import namedtuple
|
||||
|
||||
# imports
|
||||
|
||||
VersionInfo = namedtuple('VersionInfo', 'major minor micro')
|
||||
version_info = VersionInfo(major='0', minor='0', micro='0')
|
7
src/py_to_uxf_core/abc/python_parser_abc.py
Normal file
7
src/py_to_uxf_core/abc/python_parser_abc.py
Normal file
@ -0,0 +1,7 @@
|
||||
from abc import ABC, abstractmethod
|
||||
|
||||
|
||||
class PythonParserABC(ABC):
|
||||
|
||||
@abstractmethod
|
||||
def __init__(self): pass
|
7
src/py_to_uxf_core/abc/umlet_creator_abc.py
Normal file
7
src/py_to_uxf_core/abc/umlet_creator_abc.py
Normal file
@ -0,0 +1,7 @@
|
||||
from abc import ABC, abstractmethod
|
||||
|
||||
|
||||
class UmletCreatorABC(ABC):
|
||||
|
||||
@abstractmethod
|
||||
def __init__(self): pass
|
43
src/py_to_uxf_core/py_to_uxf_core.json
Normal file
43
src/py_to_uxf_core/py_to_uxf_core.json
Normal file
@ -0,0 +1,43 @@
|
||||
{
|
||||
"ProjectSettings": {
|
||||
"Name": "py_to_uxf_core",
|
||||
"Version": {
|
||||
"Major": "0",
|
||||
"Minor": "0",
|
||||
"Micro": "0"
|
||||
},
|
||||
"Author": "",
|
||||
"AuthorEmail": "",
|
||||
"Description": "",
|
||||
"LongDescription": "",
|
||||
"URL": "",
|
||||
"CopyrightDate": "",
|
||||
"CopyrightName": "",
|
||||
"LicenseName": "",
|
||||
"LicenseDescription": "",
|
||||
"Dependencies": [
|
||||
"sh_cpl-core>=2021.11.0.post3"
|
||||
],
|
||||
"PythonVersion": ">=3.9.2",
|
||||
"PythonPath": {
|
||||
"linux": ""
|
||||
},
|
||||
"Classifiers": []
|
||||
},
|
||||
"BuildSettings": {
|
||||
"ProjectType": "library",
|
||||
"SourcePath": "",
|
||||
"OutputPath": "../../dist",
|
||||
"Main": "py_to_uxf_core.main",
|
||||
"EntryPoint": "py_to_uxf_core",
|
||||
"IncludePackageData": false,
|
||||
"Included": [],
|
||||
"Excluded": [
|
||||
"*/__pycache__",
|
||||
"*/logs",
|
||||
"*/tests"
|
||||
],
|
||||
"PackageData": {},
|
||||
"ProjectReferences": []
|
||||
}
|
||||
}
|
25
src/py_to_uxf_core/service/__init__.py
Normal file
25
src/py_to_uxf_core/service/__init__.py
Normal file
@ -0,0 +1,25 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
"""
|
||||
py_to_uxf
|
||||
~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
|
||||
|
||||
:copyright: (c)
|
||||
:license:
|
||||
|
||||
"""
|
||||
|
||||
__title__ = 'py_to_uxf_core.service'
|
||||
__author__ = ''
|
||||
__license__ = ''
|
||||
__copyright__ = 'Copyright (c) '
|
||||
__version__ = '0.0.0'
|
||||
|
||||
from collections import namedtuple
|
||||
|
||||
# imports
|
||||
|
||||
VersionInfo = namedtuple('VersionInfo', 'major minor micro')
|
||||
version_info = VersionInfo(major='0', minor='0', micro='0')
|
7
src/py_to_uxf_core/service/python_parser_service.py
Normal file
7
src/py_to_uxf_core/service/python_parser_service.py
Normal file
@ -0,0 +1,7 @@
|
||||
from py_to_uxf_core.abc.python_parser_abc import PythonParserABC
|
||||
|
||||
|
||||
class PythonParserService(PythonParserABC):
|
||||
|
||||
def __init__(self):
|
||||
PythonParserABC.__init__(self)
|
7
src/py_to_uxf_core/service/umlet_creator_service.py
Normal file
7
src/py_to_uxf_core/service/umlet_creator_service.py
Normal file
@ -0,0 +1,7 @@
|
||||
from py_to_uxf_core.abc.umlet_creator_abc import UmletCreatorABC
|
||||
|
||||
|
||||
class UmletCreatorService(UmletCreatorABC):
|
||||
|
||||
def __init__(self):
|
||||
UmletCreatorABC.__init__(self)
|
Loading…
Reference in New Issue
Block a user