From d35c1612ce620bc1e3b71f518b92e692efe53c05 Mon Sep 17 00:00:00 2001 From: Sven Heidemann Date: Sat, 15 Jan 2022 23:32:39 +0100 Subject: [PATCH] Added files --- .gitignore | 2 + .idea/dbnavigator.xml | 457 ++++++++++++++++++ .../inspectionProfiles/profiles_settings.xml | 6 + .idea/misc.xml | 4 + .idea/modules.xml | 8 + .idea/py_to_uxf.iml | 12 + .idea/vcs.xml | 6 + .idea/workspace.xml | 60 +++ LICENSE | 19 + README.md | 0 cpl-workspace.json | 9 + src/py_to_uxf/__init__.py | 25 + src/py_to_uxf/application.py | 16 + src/py_to_uxf/appsettings.json | 15 + src/py_to_uxf/main.py | 14 + src/py_to_uxf/py_to_uxf.json | 44 ++ src/py_to_uxf/startup.py | 16 + 17 files changed, 713 insertions(+) create mode 100644 .gitignore create mode 100644 .idea/dbnavigator.xml create mode 100644 .idea/inspectionProfiles/profiles_settings.xml create mode 100644 .idea/misc.xml create mode 100644 .idea/modules.xml create mode 100644 .idea/py_to_uxf.iml create mode 100644 .idea/vcs.xml create mode 100644 .idea/workspace.xml create mode 100644 LICENSE create mode 100644 README.md create mode 100644 cpl-workspace.json create mode 100644 src/py_to_uxf/__init__.py create mode 100644 src/py_to_uxf/application.py create mode 100644 src/py_to_uxf/appsettings.json create mode 100644 src/py_to_uxf/main.py create mode 100644 src/py_to_uxf/py_to_uxf.json create mode 100644 src/py_to_uxf/startup.py diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..994eeed --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +dist/ +venv/ \ No newline at end of file diff --git a/.idea/dbnavigator.xml b/.idea/dbnavigator.xml new file mode 100644 index 0000000..a110605 --- /dev/null +++ b/.idea/dbnavigator.xml @@ -0,0 +1,457 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/inspectionProfiles/profiles_settings.xml b/.idea/inspectionProfiles/profiles_settings.xml new file mode 100644 index 0000000..105ce2d --- /dev/null +++ b/.idea/inspectionProfiles/profiles_settings.xml @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..56ef95e --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..460f829 --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/py_to_uxf.iml b/.idea/py_to_uxf.iml new file mode 100644 index 0000000..59a91bf --- /dev/null +++ b/.idea/py_to_uxf.iml @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..94a25f7 --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/.idea/workspace.xml b/.idea/workspace.xml new file mode 100644 index 0000000..102d181 --- /dev/null +++ b/.idea/workspace.xml @@ -0,0 +1,60 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1642279964612 + + + + \ No newline at end of file diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..d6377ca --- /dev/null +++ b/LICENSE @@ -0,0 +1,19 @@ +MIT License Copyright (c) 2022 edraft + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is furnished +to do so, subject to the following conditions: + +The above copyright notice and this permission notice (including the next +paragraph) shall be included in all copies or substantial portions of the +Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS +OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF +OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/README.md b/README.md new file mode 100644 index 0000000..e69de29 diff --git a/cpl-workspace.json b/cpl-workspace.json new file mode 100644 index 0000000..f5ffd4a --- /dev/null +++ b/cpl-workspace.json @@ -0,0 +1,9 @@ +{ + "WorkspaceSettings": { + "DefaultProject": "py_to_uxf", + "Projects": { + "py_to_uxf": "src/py_to_uxf/py_to_uxf.json" + }, + "Scripts": {} + } +} \ No newline at end of file diff --git a/src/py_to_uxf/__init__.py b/src/py_to_uxf/__init__.py new file mode 100644 index 0000000..87560cd --- /dev/null +++ b/src/py_to_uxf/__init__.py @@ -0,0 +1,25 @@ +# -*- coding: utf-8 -*- + +""" +py_to_uxf +~~~~~~~~~~~~~~~~~~~ + + + +:copyright: (c) +:license: + +""" + +__title__ = 'py_to_uxf' +__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') diff --git a/src/py_to_uxf/application.py b/src/py_to_uxf/application.py new file mode 100644 index 0000000..34a68c8 --- /dev/null +++ b/src/py_to_uxf/application.py @@ -0,0 +1,16 @@ +from cpl_core.application import ApplicationABC +from cpl_core.configuration import ConfigurationABC +from cpl_core.console import Console +from cpl_core.dependency_injection import ServiceProviderABC + + +class Application(ApplicationABC): + + def __init__(self, config: ConfigurationABC, services: ServiceProviderABC): + ApplicationABC.__init__(self, config, services) + + def configure(self): + pass + + def main(self): + Console.write_line('Hello World') diff --git a/src/py_to_uxf/appsettings.json b/src/py_to_uxf/appsettings.json new file mode 100644 index 0000000..629e6eb --- /dev/null +++ b/src/py_to_uxf/appsettings.json @@ -0,0 +1,15 @@ +{ + "TimeFormatSettings": { + "DateFormat": "%Y-%m-%d", + "TimeFormat": "%H:%M:%S", + "DateTimeFormat": "%Y-%m-%d %H:%M:%S.%f", + "DateTimeLogFormat": "%Y-%m-%d_%H-%M-%S" + }, + + "LoggingSettings": { + "Path": "logs/", + "Filename": "log_$start_time.log", + "ConsoleLogLevel": "ERROR", + "FileLogLevel": "WARN" + } +} diff --git a/src/py_to_uxf/main.py b/src/py_to_uxf/main.py new file mode 100644 index 0000000..c6be3bf --- /dev/null +++ b/src/py_to_uxf/main.py @@ -0,0 +1,14 @@ +from cpl_core.application import ApplicationBuilder + +from py_to_uxf.application import Application +from py_to_uxf.startup import Startup + + +def main(): + app_builder = ApplicationBuilder(Application) + app_builder.use_startup(Startup) + app_builder.build().run() + + +if __name__ == '__main__': + main() diff --git a/src/py_to_uxf/py_to_uxf.json b/src/py_to_uxf/py_to_uxf.json new file mode 100644 index 0000000..b243208 --- /dev/null +++ b/src/py_to_uxf/py_to_uxf.json @@ -0,0 +1,44 @@ +{ + "ProjectSettings": { + "Name": "py_to_uxf", + "Version": { + "Major": "0", + "Minor": "0", + "Micro": "0" + }, + "Author": "", + "AuthorEmail": "", + "Description": "", + "LongDescription": "", + "URL": "", + "CopyrightDate": "", + "CopyrightName": "", + "LicenseName": "", + "LicenseDescription": "", + "Dependencies": [ + "sh_cpl-core>=2021.11.0.post3", + "sh_cpl-query==2021.11.0.post3" + ], + "PythonVersion": ">=3.9.2", + "PythonPath": { + "linux": "" + }, + "Classifiers": [] + }, + "BuildSettings": { + "ProjectType": "console", + "SourcePath": "", + "OutputPath": "../../dist", + "Main": "py_to_uxf.main", + "EntryPoint": "py_to_uxf", + "IncludePackageData": false, + "Included": [], + "Excluded": [ + "*/__pycache__", + "*/logs", + "*/tests" + ], + "PackageData": {}, + "ProjectReferences": [] + } +} \ No newline at end of file diff --git a/src/py_to_uxf/startup.py b/src/py_to_uxf/startup.py new file mode 100644 index 0000000..359c03d --- /dev/null +++ b/src/py_to_uxf/startup.py @@ -0,0 +1,16 @@ +from cpl_core.application import StartupABC +from cpl_core.configuration import ConfigurationABC +from cpl_core.dependency_injection import ServiceProviderABC, ServiceCollectionABC +from cpl_core.environment import ApplicationEnvironment + + +class Startup(StartupABC): + + def __init__(self): + StartupABC.__init__(self) + + def configure_configuration(self, configuration: ConfigurationABC, environment: ApplicationEnvironment) -> ConfigurationABC: + return configuration + + def configure_services(self, services: ServiceCollectionABC, environment: ApplicationEnvironment) -> ServiceProviderABC: + return services.build_service_provider()