From 4c8d7a80312740a414e740b10b46cd0ac011d424 Mon Sep 17 00:00:00 2001 From: Sven Heidemann Date: Wed, 29 Jun 2022 19:04:01 +0200 Subject: [PATCH 1/7] Added translation project --- cpl-workspace.json | 14 ++------ src/cpl_translation/__init__.py | 1 + src/cpl_translation/cpl-translation.json | 46 ++++++++++++++++++++++++ 3 files changed, 49 insertions(+), 12 deletions(-) create mode 100644 src/cpl_translation/__init__.py create mode 100644 src/cpl_translation/cpl-translation.json diff --git a/cpl-workspace.json b/cpl-workspace.json index 73d9a367..55f564a3 100644 --- a/cpl-workspace.json +++ b/cpl-workspace.json @@ -11,24 +11,20 @@ "unittests_cli": "unittests/unittests_cli/unittests_cli.json", "unittests_core": "unittests/unittests_core/unittests_core.json", "unittests_query": "unittests/unittests_query/unittests_query.json", - "unittests_shared": "unittests/unittests_shared/unittests_shared.json" + "unittests_shared": "unittests/unittests_shared/unittests_shared.json", + "cpl-translation": "src/cpl_translation/cpl-translation.json" }, "Scripts": { "hello-world": "echo 'Hello World'", - "sv": "cpl set-version", "set-version": "cpl run set-version $ARGS; echo '';", - "spu": "cpl set-pip-urls", "set-pip-urls": "cpl run set-pip-urls $ARGS; echo '';", - "docs-build": "echo 'Build Documentation'; cd docs/; sphinx-apidoc -o source/ ../src/cpl_core; sphinx-apidoc -o source/ ../src/cpl_query; make clean; make html; rm source/cpl_query.tests.rst;", "db": "cpl docs-build", "docs-open": "xdg-open $PWD/docs/build/html/index.html &", "do": "cpl docs-open", - "test": "cpl run unittests", - "pre-build-all": "cpl sv $ARGS; cpl spu $ARGS;", "build-all": "cpl build-cli; cpl build-core; cpl build-query; cpl build-set-pip-urls; cpl build-set-version", "ba": "cpl build-all $ARGS", @@ -37,14 +33,12 @@ "build-query": "echo 'Build cpl-query'; cd ./src/cpl_query; cpl build; cd ../../;", "build-set-pip-urls": "echo 'Build set-pip-urls'; cd ./tools/set_pip_urls; cpl build; cd ../../;", "build-set-version": "echo 'Build set-version'; cd ./tools/set_version; cpl build; cd ../../;", - "pre-publish-all": "cpl sv $ARGS; cpl spu $ARGS;", "publish-all": "cpl publish-cli; cpl publish-core; cpl publish-query;", "pa": "cpl build-all $ARGS", "publish-cli": "echo 'Publish cpl-cli'; cd ./src/cpl_cli; cpl publish; cd ../../;", "publish-core": "echo 'Publish cpl-core'; cd ./src/cpl_core; cpl publish; cd ../../;", "publish-query": "echo 'Publish cpl_query'; cd ./src/cpl_query; cpl publish; cd ../../;", - "upload-prod-cli": "echo 'PROD Upload cpl-cli'; cpl upl-prod-cli;", "upl-prod-cli": "twine upload -r pip.sh-edraft.de dist/cpl-cli/publish/setup/*", "upload-prod-core": "echo 'PROD Upload cpl-core'; cpl upl-prod-core;", @@ -63,28 +57,24 @@ "upl-dev-core": "twine upload -r pip-dev.sh-edraft.de dist/cpl-core/publish/setup/*", "upload-dev-query": "echo 'DEV Upload cpl_query'; cpl upl-dev-query;", "upl-dev-query": "twine upload -r pip-dev.sh-edraft.de dist/cpl-query/publish/setup/*", - "pre-deploy-prod": "cpl sv $ARGS; cpl spu --environment=production;", "deploy-prod": "cpl deploy-prod-cli; cpl deploy-prod-core; cpl deploy-prod-query;", "dp": "cpl deploy-prod $ARGS", "deploy-prod-cli": "cpl publish-cli; cpl upload-prod-cli", "deploy-prod-core": "cpl publish-core; cpl upload-prod-core", "deploy-prod-query": "cpl publish-query; cpl upload-prod-query", - "pre-deploy-exp": "cpl sv $ARGS; cpl spu --environment=staging;", "deploy-exp": "cpl deploy-exp-cli; cpl deploy-exp-core; cpl deploy-exp-query;", "de": "cpl deploy-exp $ARGS", "deploy-exp-cli": "cpl publish-cli; cpl upload-exp-cli", "deploy-exp-core": "cpl publish-core; cpl upload-exp-core", "deploy-exp-query": "cpl publish-query; cpl upload-exp-query", - "pre-deploy-dev": "cpl sv $ARGS; cpl spu --environment=development;", "deploy-dev": "cpl deploy-dev-cli; cpl deploy-dev-core; cpl deploy-dev-query;", "dd": "cpl deploy-dev $ARGS", "deploy-dev-cli": "cpl publish-cli; cpl upload-dev-cli", "deploy-dev-core": "cpl publish-core; cpl upload-dev-core", "deploy-dev-query": "cpl publish-query; cpl upload-dev-query", - "dev-install": "cpl di-core; cpl di-cli; cpl di-query;", "di": "cpl dev-install", "di-core": "pip install cpl-core --pre --upgrade --extra-index-url https://pip-dev.sh-edraft.de", diff --git a/src/cpl_translation/__init__.py b/src/cpl_translation/__init__.py new file mode 100644 index 00000000..ad5eca30 --- /dev/null +++ b/src/cpl_translation/__init__.py @@ -0,0 +1 @@ +# imports: diff --git a/src/cpl_translation/cpl-translation.json b/src/cpl_translation/cpl-translation.json new file mode 100644 index 00000000..36af97c8 --- /dev/null +++ b/src/cpl_translation/cpl-translation.json @@ -0,0 +1,46 @@ +{ + "ProjectSettings": { + "Name": "cpl-translation", + "Version": { + "Major": "2022", + "Minor": "8", + "Micro": "1" + }, + "Author": "Sven Heidemann", + "AuthorEmail": "sven.heidemann@sh-edraft.de", + "Description": "sh-edraft Common Python library Translation", + "LongDescription": "sh-edraft Common Python library Python i18n based Translation implementation", + "URL": "https://www.sh-edraft.de", + "CopyrightDate": "2022", + "CopyrightName": "sh-edraft.de", + "LicenseName": "MIT", + "LicenseDescription": "MIT, see LICENSE for more details.", + "Dependencies": [ + "cpl-core>=2022.6.0" + ], + "DevDependencies": [ + "cpl-cli>=2022.6.0" + ], + "PythonVersion": ">=3.10.4", + "PythonPath": { + "linux": "../../venv/bin/python" + }, + "Classifiers": [] + }, + "BuildSettings": { + "ProjectType": "library", + "SourcePath": "", + "OutputPath": "../../dist", + "Main": "cpl_translation.main", + "EntryPoint": "cpl-translation", + "IncludePackageData": false, + "Included": [], + "Excluded": [ + "*/__pycache__", + "*/logs", + "*/tests" + ], + "PackageData": {}, + "ProjectReferences": [] + } +} \ No newline at end of file From 39b6ca790caafb2b0d69cf3ccdad0699aec475f8 Mon Sep 17 00:00:00 2001 From: Sven Heidemann Date: Wed, 29 Jun 2022 19:05:12 +0200 Subject: [PATCH 2/7] Added test project --- src/tests/custom/translation/LICENSE | 0 src/tests/custom/translation/README.md | 0 src/tests/custom/translation/appsettings.json | 15 ++++++ .../custom/translation/cpl-workspace.json | 9 ++++ .../custom/translation/src/tests/__init__.py | 1 + .../translation/src/translation/__init__.py | 1 + .../src/translation/application.py | 16 +++++++ .../translation/src/translation/main.py | 14 ++++++ .../translation/src/translation/startup.py | 16 +++++++ .../src/translation/translation.json | 46 +++++++++++++++++++ 10 files changed, 118 insertions(+) create mode 100644 src/tests/custom/translation/LICENSE create mode 100644 src/tests/custom/translation/README.md create mode 100644 src/tests/custom/translation/appsettings.json create mode 100644 src/tests/custom/translation/cpl-workspace.json create mode 100644 src/tests/custom/translation/src/tests/__init__.py create mode 100644 src/tests/custom/translation/src/translation/__init__.py create mode 100644 src/tests/custom/translation/src/translation/application.py create mode 100644 src/tests/custom/translation/src/translation/main.py create mode 100644 src/tests/custom/translation/src/translation/startup.py create mode 100644 src/tests/custom/translation/src/translation/translation.json diff --git a/src/tests/custom/translation/LICENSE b/src/tests/custom/translation/LICENSE new file mode 100644 index 00000000..e69de29b diff --git a/src/tests/custom/translation/README.md b/src/tests/custom/translation/README.md new file mode 100644 index 00000000..e69de29b diff --git a/src/tests/custom/translation/appsettings.json b/src/tests/custom/translation/appsettings.json new file mode 100644 index 00000000..629e6ebd --- /dev/null +++ b/src/tests/custom/translation/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/tests/custom/translation/cpl-workspace.json b/src/tests/custom/translation/cpl-workspace.json new file mode 100644 index 00000000..e75a5784 --- /dev/null +++ b/src/tests/custom/translation/cpl-workspace.json @@ -0,0 +1,9 @@ +{ + "WorkspaceSettings": { + "DefaultProject": "translation", + "Projects": { + "translation": "src/translation/translation.json" + }, + "Scripts": {} + } +} \ No newline at end of file diff --git a/src/tests/custom/translation/src/tests/__init__.py b/src/tests/custom/translation/src/tests/__init__.py new file mode 100644 index 00000000..ad5eca30 --- /dev/null +++ b/src/tests/custom/translation/src/tests/__init__.py @@ -0,0 +1 @@ +# imports: diff --git a/src/tests/custom/translation/src/translation/__init__.py b/src/tests/custom/translation/src/translation/__init__.py new file mode 100644 index 00000000..ad5eca30 --- /dev/null +++ b/src/tests/custom/translation/src/translation/__init__.py @@ -0,0 +1 @@ +# imports: diff --git a/src/tests/custom/translation/src/translation/application.py b/src/tests/custom/translation/src/translation/application.py new file mode 100644 index 00000000..34a68c80 --- /dev/null +++ b/src/tests/custom/translation/src/translation/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/tests/custom/translation/src/translation/main.py b/src/tests/custom/translation/src/translation/main.py new file mode 100644 index 00000000..030d5485 --- /dev/null +++ b/src/tests/custom/translation/src/translation/main.py @@ -0,0 +1,14 @@ +from cpl_core.application import ApplicationBuilder + +from translation.application import Application +from translation.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/tests/custom/translation/src/translation/startup.py b/src/tests/custom/translation/src/translation/startup.py new file mode 100644 index 00000000..359c03d2 --- /dev/null +++ b/src/tests/custom/translation/src/translation/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() diff --git a/src/tests/custom/translation/src/translation/translation.json b/src/tests/custom/translation/src/translation/translation.json new file mode 100644 index 00000000..f857761d --- /dev/null +++ b/src/tests/custom/translation/src/translation/translation.json @@ -0,0 +1,46 @@ +{ + "ProjectSettings": { + "Name": "translation", + "Version": { + "Major": "0", + "Minor": "0", + "Micro": "0" + }, + "Author": "", + "AuthorEmail": "", + "Description": "", + "LongDescription": "", + "URL": "", + "CopyrightDate": "", + "CopyrightName": "", + "LicenseName": "", + "LicenseDescription": "", + "Dependencies": [ + "cpl-core>=2022.6.0" + ], + "DevDependencies": [ + "cpl-cli>=2022.6.0" + ], + "PythonVersion": ">=3.10.4", + "PythonPath": { + "linux": "" + }, + "Classifiers": [] + }, + "BuildSettings": { + "ProjectType": "console", + "SourcePath": "", + "OutputPath": "../../dist", + "Main": "translation.main", + "EntryPoint": "translation", + "IncludePackageData": false, + "Included": [], + "Excluded": [ + "*/__pycache__", + "*/logs", + "*/tests" + ], + "PackageData": {}, + "ProjectReferences": [] + } +} \ No newline at end of file From e4f843829f56265e4ef9aaee7b1a2246683881a9 Mon Sep 17 00:00:00 2001 From: Sven Heidemann Date: Wed, 29 Jun 2022 20:03:13 +0200 Subject: [PATCH 3/7] Added logic to load translations and to translate texts --- src/cpl_cli/cpl-cli.json | 6 +-- src/cpl_core/cpl-core.json | 4 +- .../service_collection.py | 11 ++++ .../service_collection_abc.py | 5 ++ src/cpl_query/cpl-query.json | 4 +- src/cpl_translation/cpl-translation.json | 6 +-- src/cpl_translation/translate_pipe.py | 16 ++++++ src/cpl_translation/translation_service.py | 54 +++++++++++++++++++ .../translation_service_abc.py | 22 ++++++++ src/cpl_translation/translation_settings.py | 29 ++++++++++ .../src/translation/application.py | 15 +++++- .../{ => src/translation}/appsettings.json | 8 +++ .../translation/src/translation/startup.py | 2 + .../src/translation/translation/de.json | 7 +++ .../src/translation/translation/en.json | 7 +++ tools/set_pip_urls/set-pip-urls.json | 2 +- tools/set_version/set-version.json | 2 +- unittests/unittests/unittests.json | 6 +-- unittests/unittests_cli/unittests_cli.json | 8 +-- unittests/unittests_core/unittests_core.json | 6 +-- .../unittests_query/unittests_query.json | 8 +-- .../unittests_shared/unittests_shared.json | 6 +-- 22 files changed, 204 insertions(+), 30 deletions(-) create mode 100644 src/cpl_translation/translate_pipe.py create mode 100644 src/cpl_translation/translation_service.py create mode 100644 src/cpl_translation/translation_service_abc.py create mode 100644 src/cpl_translation/translation_settings.py rename src/tests/custom/translation/{ => src/translation}/appsettings.json (76%) create mode 100644 src/tests/custom/translation/src/translation/translation/de.json create mode 100644 src/tests/custom/translation/src/translation/translation/en.json diff --git a/src/cpl_cli/cpl-cli.json b/src/cpl_cli/cpl-cli.json index 5f88acaa..a5cebd15 100644 --- a/src/cpl_cli/cpl-cli.json +++ b/src/cpl_cli/cpl-cli.json @@ -3,8 +3,8 @@ "Name": "cpl-cli", "Version": { "Major": "2022", - "Minor": "6", - "Micro": "0" + "Minor": "8", + "Micro": "1.dev7" }, "Author": "Sven Heidemann", "AuthorEmail": "sven.heidemann@sh-edraft.de", @@ -16,7 +16,7 @@ "LicenseName": "MIT", "LicenseDescription": "MIT, see LICENSE for more details.", "Dependencies": [ - "cpl-core>=2022.6.0" + "cpl-core>=2022.8.1.dev7" ], "DevDependencies": [], "PythonVersion": ">=3.10", diff --git a/src/cpl_core/cpl-core.json b/src/cpl_core/cpl-core.json index 64006aa7..7f5ba5eb 100644 --- a/src/cpl_core/cpl-core.json +++ b/src/cpl_core/cpl-core.json @@ -3,8 +3,8 @@ "Name": "cpl-core", "Version": { "Major": "2022", - "Minor": "6", - "Micro": "0" + "Minor": "8", + "Micro": "1.dev7" }, "Author": "Sven Heidemann", "AuthorEmail": "sven.heidemann@sh-edraft.de", diff --git a/src/cpl_core/dependency_injection/service_collection.py b/src/cpl_core/dependency_injection/service_collection.py index 110c8c43..24d4699d 100644 --- a/src/cpl_core/dependency_injection/service_collection.py +++ b/src/cpl_core/dependency_injection/service_collection.py @@ -59,6 +59,17 @@ class ServiceCollection(ServiceCollectionABC): for pipe in PipeABC.__subclasses__(): self.add_transient(PipeABC, pipe) + def add_translation(self): + try: + from cpl_translation.translation_service_abc import TranslationServiceABC + from cpl_translation.translation_service import TranslationService + from cpl_translation.translate_pipe import TranslatePipe + from cpl_translation.translation_settings import TranslationSettings + self.add_singleton(TranslationServiceABC, TranslationService) + self.add_transient(PipeABC, TranslatePipe) + except ImportError as e: + Console.error('cpl-translation is not installed', str(e)) + def add_singleton(self, service_type: Union[type, object], service: Union[type, object] = None): self._add_descriptor_by_lifetime(service_type, ServiceLifetimeEnum.singleton, service) return self diff --git a/src/cpl_core/dependency_injection/service_collection_abc.py b/src/cpl_core/dependency_injection/service_collection_abc.py index 5c828388..d55390ef 100644 --- a/src/cpl_core/dependency_injection/service_collection_abc.py +++ b/src/cpl_core/dependency_injection/service_collection_abc.py @@ -35,6 +35,11 @@ class ServiceCollectionABC(ABC): r"""Adds the CPL internal pipes as transient""" pass + @abstractmethod + def add_translation(self): + r"""Adds the CPL translation""" + pass + @abstractmethod def add_transient(self, service_type: Type, service: Callable = None) -> 'ServiceCollectionABC': r"""Adds a service with transient lifetime diff --git a/src/cpl_query/cpl-query.json b/src/cpl_query/cpl-query.json index c0cbee2a..6f64f983 100644 --- a/src/cpl_query/cpl-query.json +++ b/src/cpl_query/cpl-query.json @@ -3,8 +3,8 @@ "Name": "cpl-query", "Version": { "Major": "2022", - "Minor": "6", - "Micro": "0" + "Minor": "8", + "Micro": "1.dev7" }, "Author": "Sven Heidemann", "AuthorEmail": "sven.heidemann@sh-edraft.de", diff --git a/src/cpl_translation/cpl-translation.json b/src/cpl_translation/cpl-translation.json index 36af97c8..239a0b85 100644 --- a/src/cpl_translation/cpl-translation.json +++ b/src/cpl_translation/cpl-translation.json @@ -4,19 +4,19 @@ "Version": { "Major": "2022", "Minor": "8", - "Micro": "1" + "Micro": "1.dev7" }, "Author": "Sven Heidemann", "AuthorEmail": "sven.heidemann@sh-edraft.de", "Description": "sh-edraft Common Python library Translation", - "LongDescription": "sh-edraft Common Python library Python i18n based Translation implementation", + "LongDescription": "sh-edraft Common Python library Python Translation", "URL": "https://www.sh-edraft.de", "CopyrightDate": "2022", "CopyrightName": "sh-edraft.de", "LicenseName": "MIT", "LicenseDescription": "MIT, see LICENSE for more details.", "Dependencies": [ - "cpl-core>=2022.6.0" + "cpl-core>=2022.8.1.dev7" ], "DevDependencies": [ "cpl-cli>=2022.6.0" diff --git a/src/cpl_translation/translate_pipe.py b/src/cpl_translation/translate_pipe.py new file mode 100644 index 00000000..d520600f --- /dev/null +++ b/src/cpl_translation/translate_pipe.py @@ -0,0 +1,16 @@ +from cpl_core.console import Console +from cpl_core.pipes.pipe_abc import PipeABC +from cpl_translation.translation_service_abc import TranslationServiceABC + + +class TranslatePipe(PipeABC): + + def __init__(self, translation: TranslationServiceABC): + self._translation = translation + + def transform(self, value: any, *args): + try: + return self._translation.translate(value) + except KeyError as e: + Console.error(f'Translation {value} not found') + return '' diff --git a/src/cpl_translation/translation_service.py b/src/cpl_translation/translation_service.py new file mode 100644 index 00000000..3fd83b7c --- /dev/null +++ b/src/cpl_translation/translation_service.py @@ -0,0 +1,54 @@ +import json +import os.path +from functools import reduce + +from cpl_core.console import Console +from cpl_translation.translation_service_abc import TranslationServiceABC +from cpl_translation.translation_settings import TranslationSettings + + +class TranslationService(TranslationServiceABC): + + def __init__(self): + self._translation = {} + + self._language = '' + self._default_language = '' + + TranslationServiceABC.__init__(self) + + def set_default_lang(self, lang: str): + self._default_language = lang + self.set_lang(lang) + + def set_lang(self, lang: str): + self._language = lang + + def load(self, lang: str): + if not os.path.exists(f'translation/{lang}.json'): + raise FileNotFoundError() + + file_dict = {} + with open(f'translation/{lang}.json', 'r') as file: + file_dict = json.load(file) + file.close() + + self._translation[lang] = file_dict + + def load_by_settings(self, settings: TranslationSettings): + if settings is None: + raise Exception(f'{TranslationSettings.__name__} not loaded') + + self._language = settings.default_language + self._default_language = settings.default_language + + for lang in settings.languages: + self.load(lang) + + def translate(self, key: str) -> str: + value = reduce(lambda d, key: d.get(key) if isinstance(d, dict) else None, key.split("."), self._translation[self._language]) + + if value is None: + raise KeyError(f'Translation {key} not found') + + return value diff --git a/src/cpl_translation/translation_service_abc.py b/src/cpl_translation/translation_service_abc.py new file mode 100644 index 00000000..aeef3776 --- /dev/null +++ b/src/cpl_translation/translation_service_abc.py @@ -0,0 +1,22 @@ +from abc import ABC, abstractmethod + + +class TranslationServiceABC(ABC): + + @abstractmethod + def __init__(self): pass + + @abstractmethod + def set_default_lang(self, lang: str): pass + + @abstractmethod + def set_lang(self, lang: str): pass + + @abstractmethod + def load(self, lang: str): pass + + @abstractmethod + def load_by_settings(self): pass + + @abstractmethod + def translate(self, key: str) -> str: pass diff --git a/src/cpl_translation/translation_settings.py b/src/cpl_translation/translation_settings.py new file mode 100644 index 00000000..bc393a95 --- /dev/null +++ b/src/cpl_translation/translation_settings.py @@ -0,0 +1,29 @@ +import traceback + +from cpl_core.configuration.configuration_model_abc import ConfigurationModelABC +from cpl_core.console import Console + + +class TranslationSettings(ConfigurationModelABC): + + def __init__(self): + ConfigurationModelABC.__init__(self) + + self._languages = [] + self._default_lang = '' + + @property + def languages(self) -> list[str]: + return self._languages + + @property + def default_language(self) -> str: + return self._default_lang + + def from_dict(self, settings: dict): + try: + self._languages = settings['Languages'] + self._default_lang = settings['DefaultLanguage'] + except Exception as e: + Console.error(f'[ ERROR ] [ {__name__} ]: Reading error in {self.__name__} settings') + Console.error(f'[ EXCEPTION ] [ {__name__} ]: {e} -> {traceback.format_exc()}') diff --git a/src/tests/custom/translation/src/translation/application.py b/src/tests/custom/translation/src/translation/application.py index 34a68c80..6a5b699b 100644 --- a/src/tests/custom/translation/src/translation/application.py +++ b/src/tests/custom/translation/src/translation/application.py @@ -2,6 +2,9 @@ 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 +from cpl_translation.translate_pipe import TranslatePipe +from cpl_translation.translation_service_abc import TranslationServiceABC +from cpl_translation.translation_settings import TranslationSettings class Application(ApplicationABC): @@ -9,8 +12,18 @@ class Application(ApplicationABC): def __init__(self, config: ConfigurationABC, services: ServiceProviderABC): ApplicationABC.__init__(self, config, services) + self._translate: TranslatePipe = services.get_service(TranslatePipe) + self._translation: TranslationServiceABC = services.get_service(TranslationServiceABC) + self._translation_settings: TranslationSettings = config.get_configuration(TranslationSettings) + + self._translation.load_by_settings(config.get_configuration(TranslationSettings)) + self._translation.set_default_lang('de') + def configure(self): pass def main(self): - Console.write_line('Hello World') + Console.write_line(self._translate.transform('main.text.hello_world')) + self._translation.set_lang('en') + Console.write_line(self._translate.transform('main.text.hello_world')) + Console.write_line(self._translate.transform('main.text.hello')) diff --git a/src/tests/custom/translation/appsettings.json b/src/tests/custom/translation/src/translation/appsettings.json similarity index 76% rename from src/tests/custom/translation/appsettings.json rename to src/tests/custom/translation/src/translation/appsettings.json index 629e6ebd..e307f59c 100644 --- a/src/tests/custom/translation/appsettings.json +++ b/src/tests/custom/translation/src/translation/appsettings.json @@ -11,5 +11,13 @@ "Filename": "log_$start_time.log", "ConsoleLogLevel": "ERROR", "FileLogLevel": "WARN" + }, + + "Translation": { + "Languages":[ + "de", + "en" + ], + "DefaultLanguage": "en" } } diff --git a/src/tests/custom/translation/src/translation/startup.py b/src/tests/custom/translation/src/translation/startup.py index 359c03d2..e5483338 100644 --- a/src/tests/custom/translation/src/translation/startup.py +++ b/src/tests/custom/translation/src/translation/startup.py @@ -10,7 +10,9 @@ class Startup(StartupABC): StartupABC.__init__(self) def configure_configuration(self, configuration: ConfigurationABC, environment: ApplicationEnvironment) -> ConfigurationABC: + configuration.add_json_file('appsettings.json') return configuration def configure_services(self, services: ServiceCollectionABC, environment: ApplicationEnvironment) -> ServiceProviderABC: + services.add_translation() return services.build_service_provider() diff --git a/src/tests/custom/translation/src/translation/translation/de.json b/src/tests/custom/translation/src/translation/translation/de.json new file mode 100644 index 00000000..afd34db5 --- /dev/null +++ b/src/tests/custom/translation/src/translation/translation/de.json @@ -0,0 +1,7 @@ +{ + "main": { + "text": { + "hello_world": "Hallo Welt" + } + } +} \ No newline at end of file diff --git a/src/tests/custom/translation/src/translation/translation/en.json b/src/tests/custom/translation/src/translation/translation/en.json new file mode 100644 index 00000000..77c63c59 --- /dev/null +++ b/src/tests/custom/translation/src/translation/translation/en.json @@ -0,0 +1,7 @@ +{ + "main": { + "text": { + "hello_world": "Hello World" + } + } +} \ No newline at end of file diff --git a/tools/set_pip_urls/set-pip-urls.json b/tools/set_pip_urls/set-pip-urls.json index efbe393a..1e8ec912 100644 --- a/tools/set_pip_urls/set-pip-urls.json +++ b/tools/set_pip_urls/set-pip-urls.json @@ -16,7 +16,7 @@ "LicenseName": "MIT", "LicenseDescription": "MIT, see LICENSE for more details.", "Dependencies": [ - "cpl-core>=2022.6.0.rc1" + "cpl-core>=2022.8.1.dev7" ], "PythonVersion": ">=3.10.4", "PythonPath": {}, diff --git a/tools/set_version/set-version.json b/tools/set_version/set-version.json index 51339ee5..db8269c7 100644 --- a/tools/set_version/set-version.json +++ b/tools/set_version/set-version.json @@ -16,7 +16,7 @@ "LicenseName": "MIT", "LicenseDescription": "MIT, see LICENSE for more details.", "Dependencies": [ - "cpl-core>=2022.6.0.rc1", + "cpl-core>=2022.8.1.dev7", "gitpython==3.1.27" ], "PythonVersion": ">=3.10.4", diff --git a/unittests/unittests/unittests.json b/unittests/unittests/unittests.json index 988e6bb8..3504c2a8 100644 --- a/unittests/unittests/unittests.json +++ b/unittests/unittests/unittests.json @@ -3,8 +3,8 @@ "Name": "unittests", "Version": { "Major": "2022", - "Minor": "6", - "Micro": "0.rc1" + "Minor": "8", + "Micro": "1.dev7" }, "Author": "", "AuthorEmail": "", @@ -16,7 +16,7 @@ "LicenseName": "", "LicenseDescription": "", "Dependencies": [ - "cpl-core>=2022.6.0.rc1" + "cpl-core>=2022.8.1.dev7" ], "PythonVersion": ">=3.10.4", "PythonPath": { diff --git a/unittests/unittests_cli/unittests_cli.json b/unittests/unittests_cli/unittests_cli.json index 24939e77..cd728928 100644 --- a/unittests/unittests_cli/unittests_cli.json +++ b/unittests/unittests_cli/unittests_cli.json @@ -3,8 +3,8 @@ "Name": "unittest_cli", "Version": { "Major": "2022", - "Minor": "6", - "Micro": "0.rc1" + "Minor": "8", + "Micro": "1.dev7" }, "Author": "", "AuthorEmail": "", @@ -16,8 +16,8 @@ "LicenseName": "", "LicenseDescription": "", "Dependencies": [ - "cpl-core>=2022.6.0.rc1", - "cpl-cli>=2022.6.0.rc1" + "cpl-core>=2022.8.1.dev7", + "cpl-cli>=2022.8.1.dev7" ], "PythonVersion": ">=3.10.4", "PythonPath": { diff --git a/unittests/unittests_core/unittests_core.json b/unittests/unittests_core/unittests_core.json index 983ce9fe..1097e840 100644 --- a/unittests/unittests_core/unittests_core.json +++ b/unittests/unittests_core/unittests_core.json @@ -3,8 +3,8 @@ "Name": "unittest_core", "Version": { "Major": "2022", - "Minor": "6", - "Micro": "0.rc1" + "Minor": "8", + "Micro": "1.dev7" }, "Author": "", "AuthorEmail": "", @@ -16,7 +16,7 @@ "LicenseName": "", "LicenseDescription": "", "Dependencies": [ - "cpl-core>=2022.6.0.rc1" + "cpl-core>=2022.8.1.dev7" ], "PythonVersion": ">=3.10.4", "PythonPath": { diff --git a/unittests/unittests_query/unittests_query.json b/unittests/unittests_query/unittests_query.json index 5b7d1718..5980b5b0 100644 --- a/unittests/unittests_query/unittests_query.json +++ b/unittests/unittests_query/unittests_query.json @@ -3,8 +3,8 @@ "Name": "unittest_query", "Version": { "Major": "2022", - "Minor": "6", - "Micro": "0.rc1" + "Minor": "8", + "Micro": "1.dev7" }, "Author": "", "AuthorEmail": "", @@ -16,8 +16,8 @@ "LicenseName": "", "LicenseDescription": "", "Dependencies": [ - "cpl-core>=2022.6.0.rc1", - "cpl-query>=2022.6.0.rc1" + "cpl-core>=2022.8.1.dev7", + "cpl-query>=2022.8.1.dev7" ], "PythonVersion": ">=3.10.4", "PythonPath": { diff --git a/unittests/unittests_shared/unittests_shared.json b/unittests/unittests_shared/unittests_shared.json index 7d6c385d..e414e3bd 100644 --- a/unittests/unittests_shared/unittests_shared.json +++ b/unittests/unittests_shared/unittests_shared.json @@ -3,8 +3,8 @@ "Name": "unittest_shared", "Version": { "Major": "2022", - "Minor": "6", - "Micro": "0.rc1" + "Minor": "8", + "Micro": "1.dev7" }, "Author": "", "AuthorEmail": "", @@ -16,7 +16,7 @@ "LicenseName": "", "LicenseDescription": "", "Dependencies": [ - "cpl-core>=2022.6.0.rc1" + "cpl-core>=2022.8.1.dev7" ], "PythonVersion": ">=3.10.4", "PythonPath": { From 6995b255184bed2bb028f20ed6ec14369082bef9 Mon Sep 17 00:00:00 2001 From: Sven Heidemann Date: Sun, 10 Jul 2022 17:17:45 +0200 Subject: [PATCH 4/7] Injected add_translation function from translation package --- src/cpl_cli/_templates/build/init_template.py | 1 + src/cpl_cli/publish/publisher_service.py | 10 +++- .../service_collection.py | 12 ----- .../service_collection_abc.py | 2 +- src/cpl_translation/__init__.py | 50 ++++++++++++++++++- 5 files changed, 60 insertions(+), 15 deletions(-) diff --git a/src/cpl_cli/_templates/build/init_template.py b/src/cpl_cli/_templates/build/init_template.py index b6947e22..2e3911bc 100644 --- a/src/cpl_cli/_templates/build/init_template.py +++ b/src/cpl_cli/_templates/build/init_template.py @@ -27,6 +27,7 @@ class InitTemplate: from collections import namedtuple + $Imports VersionInfo = namedtuple('VersionInfo', 'major minor micro') diff --git a/src/cpl_cli/publish/publisher_service.py b/src/cpl_cli/publish/publisher_service.py index 64988545..f08881d9 100644 --- a/src/cpl_cli/publish/publisher_service.py +++ b/src/cpl_cli/publish/publisher_service.py @@ -227,11 +227,19 @@ class PublisherService(PublisherABC): imports = '# imports:' else: is_started = False + build_ignore = False for line in module_file_lines: if line.__contains__('# imports'): is_started = True - if ((line.__contains__('from') or line.__contains__('import')) and is_started) or line.startswith('__cli_startup_extension__'): + if line.__contains__('# build-ignore'): + build_ignore = True + + if line.__contains__('# build-ignore-end') and is_started: + module_py_lines.append('# build-ignore-end'.replace('\n', '')) + build_ignore = False + + if ((line.__contains__('from') or line.__contains__('import')) and is_started) or line.startswith('__cli_startup_extension__') or build_ignore: module_py_lines.append(line.replace('\n', '')) if len(module_py_lines) > 0: diff --git a/src/cpl_core/dependency_injection/service_collection.py b/src/cpl_core/dependency_injection/service_collection.py index 24d4699d..8be84578 100644 --- a/src/cpl_core/dependency_injection/service_collection.py +++ b/src/cpl_core/dependency_injection/service_collection.py @@ -1,7 +1,6 @@ from typing import Union, Type, Callable, Optional from cpl_core.configuration.configuration_abc import ConfigurationABC -from cpl_core.console import Console from cpl_core.database.context.database_context_abc import DatabaseContextABC from cpl_core.database.database_settings import DatabaseSettings from cpl_core.dependency_injection.service_collection_abc import ServiceCollectionABC @@ -59,17 +58,6 @@ class ServiceCollection(ServiceCollectionABC): for pipe in PipeABC.__subclasses__(): self.add_transient(PipeABC, pipe) - def add_translation(self): - try: - from cpl_translation.translation_service_abc import TranslationServiceABC - from cpl_translation.translation_service import TranslationService - from cpl_translation.translate_pipe import TranslatePipe - from cpl_translation.translation_settings import TranslationSettings - self.add_singleton(TranslationServiceABC, TranslationService) - self.add_transient(PipeABC, TranslatePipe) - except ImportError as e: - Console.error('cpl-translation is not installed', str(e)) - def add_singleton(self, service_type: Union[type, object], service: Union[type, object] = None): self._add_descriptor_by_lifetime(service_type, ServiceLifetimeEnum.singleton, service) return self diff --git a/src/cpl_core/dependency_injection/service_collection_abc.py b/src/cpl_core/dependency_injection/service_collection_abc.py index d55390ef..604b6ac3 100644 --- a/src/cpl_core/dependency_injection/service_collection_abc.py +++ b/src/cpl_core/dependency_injection/service_collection_abc.py @@ -35,9 +35,9 @@ class ServiceCollectionABC(ABC): r"""Adds the CPL internal pipes as transient""" pass - @abstractmethod def add_translation(self): r"""Adds the CPL translation""" + raise NotImplementedError('You should install and use the cpl-translation package') pass @abstractmethod diff --git a/src/cpl_translation/__init__.py b/src/cpl_translation/__init__.py index ad5eca30..bcc2c35b 100644 --- a/src/cpl_translation/__init__.py +++ b/src/cpl_translation/__init__.py @@ -1 +1,49 @@ -# imports: +# -*- coding: utf-8 -*- + +""" +cpl-translation sh-edraft Common Python library Translation +~~~~~~~~~~~~~~~~~~~ + +sh-edraft Common Python library Python Translation + +:copyright: (c) 2022 sh-edraft.de +:license: MIT, see LICENSE for more details. + +""" + +__title__ = 'cpl_translation' +__author__ = 'Sven Heidemann' +__license__ = 'MIT' +__copyright__ = 'Copyright (c) 2022 sh-edraft.de' +__version__ = '2022.8.1.dev7' + +from collections import namedtuple + +# imports: +# build-ignore + + +def add_translation(self): + from cpl_core.console import Console + from cpl_core.pipes import PipeABC + from cpl_translation.translate_pipe import TranslatePipe + from cpl_translation.translation_service import TranslationService + from cpl_translation.translation_service_abc import TranslationServiceABC + + try: + self.add_singleton(TranslationServiceABC, TranslationService) + self.add_transient(PipeABC, TranslatePipe) + except ImportError as e: + Console.error('cpl-translation is not installed', str(e)) + + +def init(): + from cpl_core.dependency_injection import ServiceCollection + ServiceCollection.add_translation = add_translation + + +init() +# build-ignore-end + +VersionInfo = namedtuple('VersionInfo', 'major minor micro') +version_info = VersionInfo(major='2022', minor='8', micro='1.dev7') From a604f0e821e100133a4a46243c9c5543c2253236 Mon Sep 17 00:00:00 2001 From: Sven Heidemann Date: Sun, 10 Jul 2022 17:23:50 +0200 Subject: [PATCH 5/7] Build package --- src/cpl_cli/__init__.py | 4 ++-- src/cpl_cli/_templates/__init__.py | 4 ++-- src/cpl_cli/_templates/build/__init__.py | 4 ++-- src/cpl_cli/_templates/generate/__init__.py | 4 ++-- src/cpl_cli/_templates/new/__init__.py | 4 ++-- src/cpl_cli/_templates/new/console/__init__.py | 4 ++-- src/cpl_cli/_templates/new/console/source/__init__.py | 4 ++-- .../_templates/new/console/source/name/__init__.py | 4 ++-- .../_templates/new/console/source/tests/__init__.py | 4 ++-- src/cpl_cli/_templates/new/library/__init__.py | 4 ++-- src/cpl_cli/_templates/new/library/source/__init__.py | 4 ++-- .../_templates/new/library/source/name/__init__.py | 4 ++-- .../_templates/new/library/source/tests/__init__.py | 4 ++-- src/cpl_cli/_templates/new/unittest/__init__.py | 4 ++-- src/cpl_cli/_templates/new/unittest/source/__init__.py | 4 ++-- .../_templates/new/unittest/source/name/__init__.py | 4 ++-- src/cpl_cli/_templates/publish/__init__.py | 4 ++-- src/cpl_cli/command/__init__.py | 4 ++-- src/cpl_cli/configuration/__init__.py | 4 ++-- src/cpl_cli/cpl-cli.json | 6 +++--- src/cpl_cli/live_server/__init__.py | 4 ++-- src/cpl_cli/publish/__init__.py | 4 ++-- src/cpl_cli/source_creator/__init__.py | 4 ++-- src/cpl_cli/validators/__init__.py | 4 ++-- src/cpl_core/__init__.py | 4 ++-- src/cpl_core/application/__init__.py | 4 ++-- src/cpl_core/configuration/__init__.py | 4 ++-- src/cpl_core/console/__init__.py | 4 ++-- src/cpl_core/cpl-core.json | 4 ++-- src/cpl_core/database/__init__.py | 4 ++-- src/cpl_core/database/connection/__init__.py | 4 ++-- src/cpl_core/database/context/__init__.py | 4 ++-- src/cpl_core/dependency_injection/__init__.py | 4 ++-- src/cpl_core/environment/__init__.py | 4 ++-- src/cpl_core/logging/__init__.py | 4 ++-- src/cpl_core/mailing/__init__.py | 4 ++-- src/cpl_core/pipes/__init__.py | 4 ++-- src/cpl_core/time/__init__.py | 4 ++-- src/cpl_core/utils/__init__.py | 4 ++-- src/cpl_query/__init__.py | 4 ++-- src/cpl_query/_query/__init__.py | 4 ++-- src/cpl_query/cpl-query.json | 4 ++-- src/cpl_query/extension/__init__.py | 4 ++-- src/cpl_translation/cpl-translation.json | 8 ++++---- tools/set_version/application.py | 3 ++- tools/set_version/set-version.json | 5 +++-- tools/set_version/version_setter_service.py | 9 ++++++--- 47 files changed, 102 insertions(+), 97 deletions(-) diff --git a/src/cpl_cli/__init__.py b/src/cpl_cli/__init__.py index 3e98ff05..921db544 100644 --- a/src/cpl_cli/__init__.py +++ b/src/cpl_cli/__init__.py @@ -15,7 +15,7 @@ __title__ = 'cpl_cli' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' -__version__ = '2022.6.0' +__version__ = '2022.7.0' from collections import namedtuple @@ -27,4 +27,4 @@ from .main import main from .startup import Startup VersionInfo = namedtuple('VersionInfo', 'major minor micro') -version_info = VersionInfo(major='2022', minor='6', micro='0') +version_info = VersionInfo(major='2022', minor='7', micro='0') diff --git a/src/cpl_cli/_templates/__init__.py b/src/cpl_cli/_templates/__init__.py index 581581dd..2179e037 100644 --- a/src/cpl_cli/_templates/__init__.py +++ b/src/cpl_cli/_templates/__init__.py @@ -15,11 +15,11 @@ __title__ = 'cpl_cli._templates' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' -__version__ = '2022.6.0' +__version__ = '2022.7.0' from collections import namedtuple # imports: VersionInfo = namedtuple('VersionInfo', 'major minor micro') -version_info = VersionInfo(major='2022', minor='6', micro='0') +version_info = VersionInfo(major='2022', minor='7', micro='0') diff --git a/src/cpl_cli/_templates/build/__init__.py b/src/cpl_cli/_templates/build/__init__.py index 2ecbaa53..1a1fd9e3 100644 --- a/src/cpl_cli/_templates/build/__init__.py +++ b/src/cpl_cli/_templates/build/__init__.py @@ -15,11 +15,11 @@ __title__ = 'cpl_cli._templates.build' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' -__version__ = '2022.6.0' +__version__ = '2022.7.0' from collections import namedtuple # imports: VersionInfo = namedtuple('VersionInfo', 'major minor micro') -version_info = VersionInfo(major='2022', minor='6', micro='0') +version_info = VersionInfo(major='2022', minor='7', micro='0') diff --git a/src/cpl_cli/_templates/generate/__init__.py b/src/cpl_cli/_templates/generate/__init__.py index 28893be5..4dca807d 100644 --- a/src/cpl_cli/_templates/generate/__init__.py +++ b/src/cpl_cli/_templates/generate/__init__.py @@ -15,11 +15,11 @@ __title__ = 'cpl_cli._templates.generate' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' -__version__ = '2022.6.0' +__version__ = '2022.7.0' from collections import namedtuple # imports: VersionInfo = namedtuple('VersionInfo', 'major minor micro') -version_info = VersionInfo(major='2022', minor='6', micro='0') +version_info = VersionInfo(major='2022', minor='7', micro='0') diff --git a/src/cpl_cli/_templates/new/__init__.py b/src/cpl_cli/_templates/new/__init__.py index df587223..21ce3b9f 100644 --- a/src/cpl_cli/_templates/new/__init__.py +++ b/src/cpl_cli/_templates/new/__init__.py @@ -15,11 +15,11 @@ __title__ = 'cpl_cli._templates.new' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' -__version__ = '2022.6.0' +__version__ = '2022.7.0' from collections import namedtuple # imports: VersionInfo = namedtuple('VersionInfo', 'major minor micro') -version_info = VersionInfo(major='2022', minor='6', micro='0') +version_info = VersionInfo(major='2022', minor='7', micro='0') diff --git a/src/cpl_cli/_templates/new/console/__init__.py b/src/cpl_cli/_templates/new/console/__init__.py index c1ae6e9c..304836c9 100644 --- a/src/cpl_cli/_templates/new/console/__init__.py +++ b/src/cpl_cli/_templates/new/console/__init__.py @@ -15,11 +15,11 @@ __title__ = 'cpl_cli._templates.new.console' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' -__version__ = '2022.6.0' +__version__ = '2022.7.0' from collections import namedtuple # imports: VersionInfo = namedtuple('VersionInfo', 'major minor micro') -version_info = VersionInfo(major='2022', minor='6', micro='0') +version_info = VersionInfo(major='2022', minor='7', micro='0') diff --git a/src/cpl_cli/_templates/new/console/source/__init__.py b/src/cpl_cli/_templates/new/console/source/__init__.py index 4b04d13e..3fb2e55c 100644 --- a/src/cpl_cli/_templates/new/console/source/__init__.py +++ b/src/cpl_cli/_templates/new/console/source/__init__.py @@ -15,11 +15,11 @@ __title__ = 'cpl_cli._templates.new.console.source' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' -__version__ = '2022.6.0' +__version__ = '2022.7.0' from collections import namedtuple # imports: VersionInfo = namedtuple('VersionInfo', 'major minor micro') -version_info = VersionInfo(major='2022', minor='6', micro='0') +version_info = VersionInfo(major='2022', minor='7', micro='0') diff --git a/src/cpl_cli/_templates/new/console/source/name/__init__.py b/src/cpl_cli/_templates/new/console/source/name/__init__.py index 6c73182f..5be8124f 100644 --- a/src/cpl_cli/_templates/new/console/source/name/__init__.py +++ b/src/cpl_cli/_templates/new/console/source/name/__init__.py @@ -15,11 +15,11 @@ __title__ = 'cpl_cli._templates.new.console.source.name' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' -__version__ = '2022.6.0' +__version__ = '2022.7.0' from collections import namedtuple # imports: VersionInfo = namedtuple('VersionInfo', 'major minor micro') -version_info = VersionInfo(major='2022', minor='6', micro='0') +version_info = VersionInfo(major='2022', minor='7', micro='0') diff --git a/src/cpl_cli/_templates/new/console/source/tests/__init__.py b/src/cpl_cli/_templates/new/console/source/tests/__init__.py index fcd76f9b..8002e7fa 100644 --- a/src/cpl_cli/_templates/new/console/source/tests/__init__.py +++ b/src/cpl_cli/_templates/new/console/source/tests/__init__.py @@ -15,11 +15,11 @@ __title__ = 'cpl_cli._templates.new.console.source.tests' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' -__version__ = '2022.6.0' +__version__ = '2022.7.0' from collections import namedtuple # imports: VersionInfo = namedtuple('VersionInfo', 'major minor micro') -version_info = VersionInfo(major='2022', minor='6', micro='0') +version_info = VersionInfo(major='2022', minor='7', micro='0') diff --git a/src/cpl_cli/_templates/new/library/__init__.py b/src/cpl_cli/_templates/new/library/__init__.py index 839ebccd..1b9c9e1c 100644 --- a/src/cpl_cli/_templates/new/library/__init__.py +++ b/src/cpl_cli/_templates/new/library/__init__.py @@ -15,11 +15,11 @@ __title__ = 'cpl_cli._templates.new.library' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' -__version__ = '2022.6.0' +__version__ = '2022.7.0' from collections import namedtuple # imports: VersionInfo = namedtuple('VersionInfo', 'major minor micro') -version_info = VersionInfo(major='2022', minor='6', micro='0') +version_info = VersionInfo(major='2022', minor='7', micro='0') diff --git a/src/cpl_cli/_templates/new/library/source/__init__.py b/src/cpl_cli/_templates/new/library/source/__init__.py index c40d340b..7ea7ef05 100644 --- a/src/cpl_cli/_templates/new/library/source/__init__.py +++ b/src/cpl_cli/_templates/new/library/source/__init__.py @@ -15,11 +15,11 @@ __title__ = 'cpl_cli._templates.new.library.source' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' -__version__ = '2022.6.0' +__version__ = '2022.7.0' from collections import namedtuple # imports: VersionInfo = namedtuple('VersionInfo', 'major minor micro') -version_info = VersionInfo(major='2022', minor='6', micro='0') +version_info = VersionInfo(major='2022', minor='7', micro='0') diff --git a/src/cpl_cli/_templates/new/library/source/name/__init__.py b/src/cpl_cli/_templates/new/library/source/name/__init__.py index 286e0a19..60f040a2 100644 --- a/src/cpl_cli/_templates/new/library/source/name/__init__.py +++ b/src/cpl_cli/_templates/new/library/source/name/__init__.py @@ -15,11 +15,11 @@ __title__ = 'cpl_cli._templates.new.library.source.name' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' -__version__ = '2022.6.0' +__version__ = '2022.7.0' from collections import namedtuple # imports: VersionInfo = namedtuple('VersionInfo', 'major minor micro') -version_info = VersionInfo(major='2022', minor='6', micro='0') +version_info = VersionInfo(major='2022', minor='7', micro='0') diff --git a/src/cpl_cli/_templates/new/library/source/tests/__init__.py b/src/cpl_cli/_templates/new/library/source/tests/__init__.py index 2d072a37..ff01af13 100644 --- a/src/cpl_cli/_templates/new/library/source/tests/__init__.py +++ b/src/cpl_cli/_templates/new/library/source/tests/__init__.py @@ -15,11 +15,11 @@ __title__ = 'cpl_cli._templates.new.library.source.tests' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' -__version__ = '2022.6.0' +__version__ = '2022.7.0' from collections import namedtuple # imports: VersionInfo = namedtuple('VersionInfo', 'major minor micro') -version_info = VersionInfo(major='2022', minor='6', micro='0') +version_info = VersionInfo(major='2022', minor='7', micro='0') diff --git a/src/cpl_cli/_templates/new/unittest/__init__.py b/src/cpl_cli/_templates/new/unittest/__init__.py index 27cdcd67..6bf51182 100644 --- a/src/cpl_cli/_templates/new/unittest/__init__.py +++ b/src/cpl_cli/_templates/new/unittest/__init__.py @@ -15,11 +15,11 @@ __title__ = 'cpl_cli._templates.new.unittest' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' -__version__ = '2022.6.0' +__version__ = '2022.7.0' from collections import namedtuple # imports: VersionInfo = namedtuple('VersionInfo', 'major minor micro') -version_info = VersionInfo(major='2022', minor='6', micro='0') +version_info = VersionInfo(major='2022', minor='7', micro='0') diff --git a/src/cpl_cli/_templates/new/unittest/source/__init__.py b/src/cpl_cli/_templates/new/unittest/source/__init__.py index f8e14e10..d293cc89 100644 --- a/src/cpl_cli/_templates/new/unittest/source/__init__.py +++ b/src/cpl_cli/_templates/new/unittest/source/__init__.py @@ -15,11 +15,11 @@ __title__ = 'cpl_cli._templates.new.unittest.source' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' -__version__ = '2022.6.0' +__version__ = '2022.7.0' from collections import namedtuple # imports: VersionInfo = namedtuple('VersionInfo', 'major minor micro') -version_info = VersionInfo(major='2022', minor='6', micro='0') +version_info = VersionInfo(major='2022', minor='7', micro='0') diff --git a/src/cpl_cli/_templates/new/unittest/source/name/__init__.py b/src/cpl_cli/_templates/new/unittest/source/name/__init__.py index 7ff708ab..9c85c5ae 100644 --- a/src/cpl_cli/_templates/new/unittest/source/name/__init__.py +++ b/src/cpl_cli/_templates/new/unittest/source/name/__init__.py @@ -15,11 +15,11 @@ __title__ = 'cpl_cli._templates.new.unittest.source.name' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' -__version__ = '2022.6.0' +__version__ = '2022.7.0' from collections import namedtuple # imports: VersionInfo = namedtuple('VersionInfo', 'major minor micro') -version_info = VersionInfo(major='2022', minor='6', micro='0') +version_info = VersionInfo(major='2022', minor='7', micro='0') diff --git a/src/cpl_cli/_templates/publish/__init__.py b/src/cpl_cli/_templates/publish/__init__.py index 286f7110..38ba30db 100644 --- a/src/cpl_cli/_templates/publish/__init__.py +++ b/src/cpl_cli/_templates/publish/__init__.py @@ -15,11 +15,11 @@ __title__ = 'cpl_cli._templates.publish' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' -__version__ = '2022.6.0' +__version__ = '2022.7.0' from collections import namedtuple # imports: VersionInfo = namedtuple('VersionInfo', 'major minor micro') -version_info = VersionInfo(major='2022', minor='6', micro='0') +version_info = VersionInfo(major='2022', minor='7', micro='0') diff --git a/src/cpl_cli/command/__init__.py b/src/cpl_cli/command/__init__.py index 68798b7b..22e082fd 100644 --- a/src/cpl_cli/command/__init__.py +++ b/src/cpl_cli/command/__init__.py @@ -15,7 +15,7 @@ __title__ = 'cpl_cli.command' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' -__version__ = '2022.6.0' +__version__ = '2022.7.0' from collections import namedtuple @@ -28,4 +28,4 @@ from .publish_service import PublishService from .version_service import VersionService VersionInfo = namedtuple('VersionInfo', 'major minor micro') -version_info = VersionInfo(major='2022', minor='6', micro='0') +version_info = VersionInfo(major='2022', minor='7', micro='0') diff --git a/src/cpl_cli/configuration/__init__.py b/src/cpl_cli/configuration/__init__.py index ca1022aa..dab154b5 100644 --- a/src/cpl_cli/configuration/__init__.py +++ b/src/cpl_cli/configuration/__init__.py @@ -15,7 +15,7 @@ __title__ = 'cpl_cli.configuration' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' -__version__ = '2022.6.0' +__version__ = '2022.7.0' from collections import namedtuple @@ -30,4 +30,4 @@ from .workspace_settings import WorkspaceSettings from .workspace_settings_name_enum import WorkspaceSettingsNameEnum VersionInfo = namedtuple('VersionInfo', 'major minor micro') -version_info = VersionInfo(major='2022', minor='6', micro='0') +version_info = VersionInfo(major='2022', minor='7', micro='0') diff --git a/src/cpl_cli/cpl-cli.json b/src/cpl_cli/cpl-cli.json index a5cebd15..43bc2b6c 100644 --- a/src/cpl_cli/cpl-cli.json +++ b/src/cpl_cli/cpl-cli.json @@ -3,8 +3,8 @@ "Name": "cpl-cli", "Version": { "Major": "2022", - "Minor": "8", - "Micro": "1.dev7" + "Minor": "7", + "Micro": "0" }, "Author": "Sven Heidemann", "AuthorEmail": "sven.heidemann@sh-edraft.de", @@ -16,7 +16,7 @@ "LicenseName": "MIT", "LicenseDescription": "MIT, see LICENSE for more details.", "Dependencies": [ - "cpl-core>=2022.8.1.dev7" + "cpl-core>=2022.7.0" ], "DevDependencies": [], "PythonVersion": ">=3.10", diff --git a/src/cpl_cli/live_server/__init__.py b/src/cpl_cli/live_server/__init__.py index 0e66f7ea..e16fc8a2 100644 --- a/src/cpl_cli/live_server/__init__.py +++ b/src/cpl_cli/live_server/__init__.py @@ -15,11 +15,11 @@ __title__ = 'cpl_cli.live_server' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' -__version__ = '2022.6.0' +__version__ = '2022.7.0' from collections import namedtuple # imports: VersionInfo = namedtuple('VersionInfo', 'major minor micro') -version_info = VersionInfo(major='2022', minor='6', micro='0') +version_info = VersionInfo(major='2022', minor='7', micro='0') diff --git a/src/cpl_cli/publish/__init__.py b/src/cpl_cli/publish/__init__.py index cdfadb9f..ca7420aa 100644 --- a/src/cpl_cli/publish/__init__.py +++ b/src/cpl_cli/publish/__init__.py @@ -15,7 +15,7 @@ __title__ = 'cpl_cli.publish' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' -__version__ = '2022.6.0' +__version__ = '2022.7.0' from collections import namedtuple @@ -24,4 +24,4 @@ from .publisher_abc import PublisherABC from .publisher_service import PublisherService VersionInfo = namedtuple('VersionInfo', 'major minor micro') -version_info = VersionInfo(major='2022', minor='6', micro='0') +version_info = VersionInfo(major='2022', minor='7', micro='0') diff --git a/src/cpl_cli/source_creator/__init__.py b/src/cpl_cli/source_creator/__init__.py index 59a2e085..8b29cf9f 100644 --- a/src/cpl_cli/source_creator/__init__.py +++ b/src/cpl_cli/source_creator/__init__.py @@ -15,11 +15,11 @@ __title__ = 'cpl_cli.source_creator' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' -__version__ = '2022.6.0' +__version__ = '2022.7.0' from collections import namedtuple # imports: VersionInfo = namedtuple('VersionInfo', 'major minor micro') -version_info = VersionInfo(major='2022', minor='6', micro='0') +version_info = VersionInfo(major='2022', minor='7', micro='0') diff --git a/src/cpl_cli/validators/__init__.py b/src/cpl_cli/validators/__init__.py index fef0df52..2c4258ae 100644 --- a/src/cpl_cli/validators/__init__.py +++ b/src/cpl_cli/validators/__init__.py @@ -15,11 +15,11 @@ __title__ = 'cpl_cli.validators' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' -__version__ = '2022.6.0' +__version__ = '2022.7.0' from collections import namedtuple # imports: VersionInfo = namedtuple('VersionInfo', 'major minor micro') -version_info = VersionInfo(major='2022', minor='6', micro='0') +version_info = VersionInfo(major='2022', minor='7', micro='0') diff --git a/src/cpl_core/__init__.py b/src/cpl_core/__init__.py index 0486b522..14a45a27 100644 --- a/src/cpl_core/__init__.py +++ b/src/cpl_core/__init__.py @@ -15,11 +15,11 @@ __title__ = 'cpl_core' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' -__version__ = '2022.6.0' +__version__ = '2022.7.0' from collections import namedtuple # imports: VersionInfo = namedtuple('VersionInfo', 'major minor micro') -version_info = VersionInfo(major='2022', minor='6', micro='0') +version_info = VersionInfo(major='2022', minor='7', micro='0') diff --git a/src/cpl_core/application/__init__.py b/src/cpl_core/application/__init__.py index b0886d10..5dd5cfac 100644 --- a/src/cpl_core/application/__init__.py +++ b/src/cpl_core/application/__init__.py @@ -15,7 +15,7 @@ __title__ = 'cpl_core.application' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' -__version__ = '2022.6.0' +__version__ = '2022.7.0' from collections import namedtuple @@ -28,4 +28,4 @@ from .startup_abc import StartupABC from .startup_extension_abc import StartupExtensionABC VersionInfo = namedtuple('VersionInfo', 'major minor micro') -version_info = VersionInfo(major='2022', minor='6', micro='0') +version_info = VersionInfo(major='2022', minor='7', micro='0') diff --git a/src/cpl_core/configuration/__init__.py b/src/cpl_core/configuration/__init__.py index 3b24c0ed..162bd1a7 100644 --- a/src/cpl_core/configuration/__init__.py +++ b/src/cpl_core/configuration/__init__.py @@ -15,7 +15,7 @@ __title__ = 'cpl_core.configuration' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' -__version__ = '2022.6.0' +__version__ = '2022.7.0' from collections import namedtuple @@ -34,4 +34,4 @@ from .validator_abc import ValidatorABC from .variable_argument import VariableArgument VersionInfo = namedtuple('VersionInfo', 'major minor micro') -version_info = VersionInfo(major='2022', minor='6', micro='0') +version_info = VersionInfo(major='2022', minor='7', micro='0') diff --git a/src/cpl_core/console/__init__.py b/src/cpl_core/console/__init__.py index eea37ca2..d027febe 100644 --- a/src/cpl_core/console/__init__.py +++ b/src/cpl_core/console/__init__.py @@ -15,7 +15,7 @@ __title__ = 'cpl_core.console' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' -__version__ = '2022.6.0' +__version__ = '2022.7.0' from collections import namedtuple @@ -27,4 +27,4 @@ from .foreground_color_enum import ForegroundColorEnum from .spinner_thread import SpinnerThread VersionInfo = namedtuple('VersionInfo', 'major minor micro') -version_info = VersionInfo(major='2022', minor='6', micro='0') +version_info = VersionInfo(major='2022', minor='7', micro='0') diff --git a/src/cpl_core/cpl-core.json b/src/cpl_core/cpl-core.json index 7f5ba5eb..969de04a 100644 --- a/src/cpl_core/cpl-core.json +++ b/src/cpl_core/cpl-core.json @@ -3,8 +3,8 @@ "Name": "cpl-core", "Version": { "Major": "2022", - "Minor": "8", - "Micro": "1.dev7" + "Minor": "7", + "Micro": "0" }, "Author": "Sven Heidemann", "AuthorEmail": "sven.heidemann@sh-edraft.de", diff --git a/src/cpl_core/database/__init__.py b/src/cpl_core/database/__init__.py index 04d37674..f4332e50 100644 --- a/src/cpl_core/database/__init__.py +++ b/src/cpl_core/database/__init__.py @@ -15,7 +15,7 @@ __title__ = 'cpl_core.database' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' -__version__ = '2022.6.0' +__version__ = '2022.7.0' from collections import namedtuple @@ -25,4 +25,4 @@ from .database_settings import DatabaseSettings from .table_abc import TableABC VersionInfo = namedtuple('VersionInfo', 'major minor micro') -version_info = VersionInfo(major='2022', minor='6', micro='0') +version_info = VersionInfo(major='2022', minor='7', micro='0') diff --git a/src/cpl_core/database/connection/__init__.py b/src/cpl_core/database/connection/__init__.py index 4dccec25..d9a40b1e 100644 --- a/src/cpl_core/database/connection/__init__.py +++ b/src/cpl_core/database/connection/__init__.py @@ -15,7 +15,7 @@ __title__ = 'cpl_core.database.connection' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' -__version__ = '2022.6.0' +__version__ = '2022.7.0' from collections import namedtuple @@ -24,4 +24,4 @@ from .database_connection import DatabaseConnection from .database_connection_abc import DatabaseConnectionABC VersionInfo = namedtuple('VersionInfo', 'major minor micro') -version_info = VersionInfo(major='2022', minor='6', micro='0') +version_info = VersionInfo(major='2022', minor='7', micro='0') diff --git a/src/cpl_core/database/context/__init__.py b/src/cpl_core/database/context/__init__.py index d77c3d1f..057aea25 100644 --- a/src/cpl_core/database/context/__init__.py +++ b/src/cpl_core/database/context/__init__.py @@ -15,7 +15,7 @@ __title__ = 'cpl_core.database.context' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' -__version__ = '2022.6.0' +__version__ = '2022.7.0' from collections import namedtuple @@ -24,4 +24,4 @@ from .database_context import DatabaseContext from .database_context_abc import DatabaseContextABC VersionInfo = namedtuple('VersionInfo', 'major minor micro') -version_info = VersionInfo(major='2022', minor='6', micro='0') +version_info = VersionInfo(major='2022', minor='7', micro='0') diff --git a/src/cpl_core/dependency_injection/__init__.py b/src/cpl_core/dependency_injection/__init__.py index 427adc33..2292a916 100644 --- a/src/cpl_core/dependency_injection/__init__.py +++ b/src/cpl_core/dependency_injection/__init__.py @@ -15,7 +15,7 @@ __title__ = 'cpl_core.dependency_injection' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' -__version__ = '2022.6.0' +__version__ = '2022.7.0' from collections import namedtuple @@ -30,4 +30,4 @@ from .service_provider import ServiceProvider from .service_provider_abc import ServiceProviderABC VersionInfo = namedtuple('VersionInfo', 'major minor micro') -version_info = VersionInfo(major='2022', minor='6', micro='0') +version_info = VersionInfo(major='2022', minor='7', micro='0') diff --git a/src/cpl_core/environment/__init__.py b/src/cpl_core/environment/__init__.py index a174e591..f6d308cd 100644 --- a/src/cpl_core/environment/__init__.py +++ b/src/cpl_core/environment/__init__.py @@ -15,7 +15,7 @@ __title__ = 'cpl_core.environment' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' -__version__ = '2022.6.0' +__version__ = '2022.7.0' from collections import namedtuple @@ -25,4 +25,4 @@ from .environment_name_enum import EnvironmentNameEnum from .application_environment import ApplicationEnvironment VersionInfo = namedtuple('VersionInfo', 'major minor micro') -version_info = VersionInfo(major='2022', minor='6', micro='0') +version_info = VersionInfo(major='2022', minor='7', micro='0') diff --git a/src/cpl_core/logging/__init__.py b/src/cpl_core/logging/__init__.py index 7bebcb6a..7a6c5e2a 100644 --- a/src/cpl_core/logging/__init__.py +++ b/src/cpl_core/logging/__init__.py @@ -15,7 +15,7 @@ __title__ = 'cpl_core.logging' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' -__version__ = '2022.6.0' +__version__ = '2022.7.0' from collections import namedtuple @@ -27,4 +27,4 @@ from .logging_settings import LoggingSettings from .logging_settings_name_enum import LoggingSettingsNameEnum VersionInfo = namedtuple('VersionInfo', 'major minor micro') -version_info = VersionInfo(major='2022', minor='6', micro='0') +version_info = VersionInfo(major='2022', minor='7', micro='0') diff --git a/src/cpl_core/mailing/__init__.py b/src/cpl_core/mailing/__init__.py index 8051baa8..52bac922 100644 --- a/src/cpl_core/mailing/__init__.py +++ b/src/cpl_core/mailing/__init__.py @@ -15,7 +15,7 @@ __title__ = 'cpl_core.mailing' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' -__version__ = '2022.6.0' +__version__ = '2022.7.0' from collections import namedtuple @@ -27,4 +27,4 @@ from .email_client_settings import EMailClientSettings from .email_client_settings_name_enum import EMailClientSettingsNameEnum VersionInfo = namedtuple('VersionInfo', 'major minor micro') -version_info = VersionInfo(major='2022', minor='6', micro='0') +version_info = VersionInfo(major='2022', minor='7', micro='0') diff --git a/src/cpl_core/pipes/__init__.py b/src/cpl_core/pipes/__init__.py index b4ecaafe..794a5ec6 100644 --- a/src/cpl_core/pipes/__init__.py +++ b/src/cpl_core/pipes/__init__.py @@ -15,7 +15,7 @@ __title__ = 'cpl_core.pipes' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' -__version__ = '2022.6.0' +__version__ = '2022.7.0' from collections import namedtuple @@ -29,4 +29,4 @@ from .to_camel_case_pipe import ToCamelCasePipe from .to_snake_case_pipe import ToSnakeCasePipe VersionInfo = namedtuple('VersionInfo', 'major minor micro') -version_info = VersionInfo(major='2022', minor='6', micro='0') +version_info = VersionInfo(major='2022', minor='7', micro='0') diff --git a/src/cpl_core/time/__init__.py b/src/cpl_core/time/__init__.py index d42bba93..343536d5 100644 --- a/src/cpl_core/time/__init__.py +++ b/src/cpl_core/time/__init__.py @@ -15,7 +15,7 @@ __title__ = 'cpl_core.time' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' -__version__ = '2022.6.0' +__version__ = '2022.7.0' from collections import namedtuple @@ -24,4 +24,4 @@ from .time_format_settings import TimeFormatSettings from .time_format_settings_names_enum import TimeFormatSettingsNamesEnum VersionInfo = namedtuple('VersionInfo', 'major minor micro') -version_info = VersionInfo(major='2022', minor='6', micro='0') +version_info = VersionInfo(major='2022', minor='7', micro='0') diff --git a/src/cpl_core/utils/__init__.py b/src/cpl_core/utils/__init__.py index f4709dfd..be8bd300 100644 --- a/src/cpl_core/utils/__init__.py +++ b/src/cpl_core/utils/__init__.py @@ -15,7 +15,7 @@ __title__ = 'cpl_core.utils' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' -__version__ = '2022.6.0' +__version__ = '2022.7.0' from collections import namedtuple @@ -25,4 +25,4 @@ from .string import String from .pip import Pip VersionInfo = namedtuple('VersionInfo', 'major minor micro') -version_info = VersionInfo(major='2022', minor='6', micro='0') +version_info = VersionInfo(major='2022', minor='7', micro='0') diff --git a/src/cpl_query/__init__.py b/src/cpl_query/__init__.py index 0e94cbb2..81ae55f3 100644 --- a/src/cpl_query/__init__.py +++ b/src/cpl_query/__init__.py @@ -15,11 +15,11 @@ __title__ = 'cpl_query' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2021 - 2022 sh-edraft.de' -__version__ = '2022.6.0' +__version__ = '2022.7.0' from collections import namedtuple # imports: VersionInfo = namedtuple('VersionInfo', 'major minor micro') -version_info = VersionInfo(major='2022', minor='6', micro='0') +version_info = VersionInfo(major='2022', minor='7', micro='0') diff --git a/src/cpl_query/_query/__init__.py b/src/cpl_query/_query/__init__.py index eca41b6a..c4a4e7c8 100644 --- a/src/cpl_query/_query/__init__.py +++ b/src/cpl_query/_query/__init__.py @@ -15,11 +15,11 @@ __title__ = 'cpl_query._query' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2021 - 2022 sh-edraft.de' -__version__ = '2022.6.0' +__version__ = '2022.7.0' from collections import namedtuple # imports: VersionInfo = namedtuple('VersionInfo', 'major minor micro') -version_info = VersionInfo(major='2022', minor='6', micro='0') +version_info = VersionInfo(major='2022', minor='7', micro='0') diff --git a/src/cpl_query/cpl-query.json b/src/cpl_query/cpl-query.json index 6f64f983..af1c55c5 100644 --- a/src/cpl_query/cpl-query.json +++ b/src/cpl_query/cpl-query.json @@ -3,8 +3,8 @@ "Name": "cpl-query", "Version": { "Major": "2022", - "Minor": "8", - "Micro": "1.dev7" + "Minor": "7", + "Micro": "0" }, "Author": "Sven Heidemann", "AuthorEmail": "sven.heidemann@sh-edraft.de", diff --git a/src/cpl_query/extension/__init__.py b/src/cpl_query/extension/__init__.py index 2f166dd7..73647642 100644 --- a/src/cpl_query/extension/__init__.py +++ b/src/cpl_query/extension/__init__.py @@ -15,7 +15,7 @@ __title__ = 'cpl_query.extension' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2021 - 2022 sh-edraft.de' -__version__ = '2022.6.0' +__version__ = '2022.7.0' from collections import namedtuple @@ -27,4 +27,4 @@ from .ordered_iterable_abc import OrderedIterableABC from .ordered_iterable import OrderedIterable VersionInfo = namedtuple('VersionInfo', 'major minor micro') -version_info = VersionInfo(major='2022', minor='6', micro='0') +version_info = VersionInfo(major='2022', minor='7', micro='0') diff --git a/src/cpl_translation/cpl-translation.json b/src/cpl_translation/cpl-translation.json index 239a0b85..440ccb97 100644 --- a/src/cpl_translation/cpl-translation.json +++ b/src/cpl_translation/cpl-translation.json @@ -3,8 +3,8 @@ "Name": "cpl-translation", "Version": { "Major": "2022", - "Minor": "8", - "Micro": "1.dev7" + "Minor": "7", + "Micro": "0" }, "Author": "Sven Heidemann", "AuthorEmail": "sven.heidemann@sh-edraft.de", @@ -16,10 +16,10 @@ "LicenseName": "MIT", "LicenseDescription": "MIT, see LICENSE for more details.", "Dependencies": [ - "cpl-core>=2022.8.1.dev7" + "cpl-core>=2022.7.0" ], "DevDependencies": [ - "cpl-cli>=2022.6.0" + "cpl-cli>=2022.7.0" ], "PythonVersion": ">=3.10.4", "PythonPath": { diff --git a/tools/set_version/application.py b/tools/set_version/application.py index 1ca6425a..3c52a69c 100644 --- a/tools/set_version/application.py +++ b/tools/set_version/application.py @@ -82,7 +82,8 @@ class Application(ApplicationABC): continue Console.write_line(f'Set dependencies {self._version_pipe.transform(version)} for {project}') - self._version_setter.set_dependencies(self._workspace.projects[project], version, skipped=skipped) + self._version_setter.set_dependencies(self._workspace.projects[project], version, 'Dependencies', skipped=skipped) + self._version_setter.set_dependencies(self._workspace.projects[project], version, 'DevDependencies', skipped=skipped) if not project.startswith('cpl') and not project.startswith('unittest'): Console.write_line(f'Skipping {project}') continue diff --git a/tools/set_version/set-version.json b/tools/set_version/set-version.json index db8269c7..2e999483 100644 --- a/tools/set_version/set-version.json +++ b/tools/set_version/set-version.json @@ -16,12 +16,13 @@ "LicenseName": "MIT", "LicenseDescription": "MIT, see LICENSE for more details.", "Dependencies": [ - "cpl-core>=2022.8.1.dev7", + "cpl-core>=2022.7.0", "gitpython==3.1.27" ], "PythonVersion": ">=3.10.4", "PythonPath": {}, - "Classifiers": [] + "Classifiers": [], + "DevDependencies": [] }, "BuildSettings": { "ProjectType": "console", diff --git a/tools/set_version/version_setter_service.py b/tools/set_version/version_setter_service.py index 0ae94c93..31786269 100644 --- a/tools/set_version/version_setter_service.py +++ b/tools/set_version/version_setter_service.py @@ -33,9 +33,12 @@ class VersionSetterService: project_json['ProjectSettings']['Version'] = version self._write_file(file, project_json) - def set_dependencies(self, file: str, version: dict, skipped=None): + def set_dependencies(self, file: str, version: dict, key: str, skipped=None): project_json = self._read_file(file) - dependencies = project_json['ProjectSettings']['Dependencies'] + if key not in project_json['ProjectSettings']: + project_json['ProjectSettings'][key] = [] + + dependencies = project_json['ProjectSettings'][key] new_deps = [] for dependency in dependencies: if not dependency.startswith('cpl-'): @@ -52,5 +55,5 @@ class VersionSetterService: continue new_deps.append(dependency.replace(dep_version, f'{version["Major"]}.{version["Minor"]}.{version["Micro"]}')) - project_json['ProjectSettings']['Dependencies'] = new_deps + project_json['ProjectSettings'][key] = new_deps self._write_file(file, project_json) From 2772ea8df2a4337f8ab43a6fda6add4405ce9641 Mon Sep 17 00:00:00 2001 From: Sven Heidemann Date: Sun, 10 Jul 2022 17:56:38 +0200 Subject: [PATCH 6/7] Added translation unittests --- cpl-workspace.json | 3 +- src/cpl_cli/command/new_service.py | 2 + src/cpl_translation/__init__.py | 4 ++ src/cpl_translation/translation_service.py | 7 +- unittests/unittests/application.py | 2 + unittests/unittests/unittests.json | 7 +- unittests/unittests_cli/constants.py | 1 + unittests/unittests_cli/unittests_cli.json | 9 +-- unittests/unittests_translation/__init__.py | 1 + .../unittests_translation/translation/de.json | 7 ++ .../unittests_translation/translation/en.json | 7 ++ .../translation_test_case.py | 67 +++++++++++++++++++ .../translation_test_suite.py | 51 ++++++++++++++ .../unittests_translation.json | 47 +++++++++++++ 14 files changed, 206 insertions(+), 9 deletions(-) create mode 100644 unittests/unittests_translation/__init__.py create mode 100644 unittests/unittests_translation/translation/de.json create mode 100644 unittests/unittests_translation/translation/en.json create mode 100644 unittests/unittests_translation/translation_test_case.py create mode 100644 unittests/unittests_translation/translation_test_suite.py create mode 100644 unittests/unittests_translation/unittests_translation.json diff --git a/cpl-workspace.json b/cpl-workspace.json index 55f564a3..e0435866 100644 --- a/cpl-workspace.json +++ b/cpl-workspace.json @@ -5,6 +5,7 @@ "cpl-core": "src/cpl_core/cpl-core.json", "cpl-cli": "src/cpl_cli/cpl-cli.json", "cpl-query": "src/cpl_query/cpl-query.json", + "cpl-translation": "src/cpl_translation/cpl-translation.json", "set-version": "tools/set_version/set-version.json", "set-pip-urls": "tools/set_pip_urls/set-pip-urls.json", "unittests": "unittests/unittests/unittests.json", @@ -12,7 +13,7 @@ "unittests_core": "unittests/unittests_core/unittests_core.json", "unittests_query": "unittests/unittests_query/unittests_query.json", "unittests_shared": "unittests/unittests_shared/unittests_shared.json", - "cpl-translation": "src/cpl_translation/cpl-translation.json" + "unittests_translation": "unittests/unittests_translation/unittests_translation.json" }, "Scripts": { "hello-world": "echo 'Hello World'", diff --git a/src/cpl_cli/command/new_service.py b/src/cpl_cli/command/new_service.py index 387cf8ce..f7f843dd 100644 --- a/src/cpl_cli/command/new_service.py +++ b/src/cpl_cli/command/new_service.py @@ -68,6 +68,7 @@ class NewService(CommandABC): Types: console library + unittest """) @staticmethod @@ -82,6 +83,7 @@ class NewService(CommandABC): schematics = [ 'console (c|C) ', 'library (l|L) ', + 'unittest (ut|UT) ', ] Console.write_line('Available Schematics:') for name in schematics: diff --git a/src/cpl_translation/__init__.py b/src/cpl_translation/__init__.py index bcc2c35b..98c00d66 100644 --- a/src/cpl_translation/__init__.py +++ b/src/cpl_translation/__init__.py @@ -20,6 +20,10 @@ __version__ = '2022.8.1.dev7' from collections import namedtuple # imports: +from .translate_pipe import TranslatePipe +from .translation_service import TranslationService +from .translation_service_abc import TranslationServiceABC +from .translation_settings import TranslationSettings # build-ignore diff --git a/src/cpl_translation/translation_service.py b/src/cpl_translation/translation_service.py index 3fd83b7c..4c75eaf4 100644 --- a/src/cpl_translation/translation_service.py +++ b/src/cpl_translation/translation_service.py @@ -2,7 +2,6 @@ import json import os.path from functools import reduce -from cpl_core.console import Console from cpl_translation.translation_service_abc import TranslationServiceABC from cpl_translation.translation_settings import TranslationSettings @@ -18,10 +17,16 @@ class TranslationService(TranslationServiceABC): TranslationServiceABC.__init__(self) def set_default_lang(self, lang: str): + if lang not in self._translation: + raise KeyError() + self._default_language = lang self.set_lang(lang) def set_lang(self, lang: str): + if lang not in self._translation: + raise KeyError() + self._language = lang def load(self, lang: str): diff --git a/unittests/unittests/application.py b/unittests/unittests/application.py index 9ec49cc6..0ba34799 100644 --- a/unittests/unittests/application.py +++ b/unittests/unittests/application.py @@ -5,6 +5,7 @@ from cpl_core.configuration import ConfigurationABC from cpl_core.dependency_injection import ServiceProviderABC from unittests_cli.cli_test_suite import CLITestSuite from unittests_query.query_test_suite import QueryTestSuite +from unittests_translation.translation_test_suite import TranslationTestSuite class Application(ApplicationABC): @@ -19,3 +20,4 @@ class Application(ApplicationABC): runner = unittest.TextTestRunner() runner.run(CLITestSuite()) runner.run(QueryTestSuite()) + runner.run(TranslationTestSuite()) diff --git a/unittests/unittests/unittests.json b/unittests/unittests/unittests.json index 3504c2a8..ff83d9a0 100644 --- a/unittests/unittests/unittests.json +++ b/unittests/unittests/unittests.json @@ -3,8 +3,8 @@ "Name": "unittests", "Version": { "Major": "2022", - "Minor": "8", - "Micro": "1.dev7" + "Minor": "7", + "Micro": "0" }, "Author": "", "AuthorEmail": "", @@ -22,7 +22,8 @@ "PythonPath": { "linux": "" }, - "Classifiers": [] + "Classifiers": [], + "DevDependencies": [] }, "BuildSettings": { "ProjectType": "unittest", diff --git a/unittests/unittests_cli/constants.py b/unittests/unittests_cli/constants.py index 766d72c0..f585a27f 100644 --- a/unittests/unittests_cli/constants.py +++ b/unittests/unittests_cli/constants.py @@ -1,4 +1,5 @@ import os PLAYGROUND_PATH = os.path.abspath(os.path.join(os.getcwd(), '../test_cli_playground')) +TRANSLATION_PATH = os.path.abspath(os.path.join(os.getcwd(), '../unittests_translation')) CLI_PATH = os.path.abspath(os.path.join(os.getcwd(), '../../src/cpl_cli/main.py')) diff --git a/unittests/unittests_cli/unittests_cli.json b/unittests/unittests_cli/unittests_cli.json index cd728928..b7120f2e 100644 --- a/unittests/unittests_cli/unittests_cli.json +++ b/unittests/unittests_cli/unittests_cli.json @@ -3,8 +3,8 @@ "Name": "unittest_cli", "Version": { "Major": "2022", - "Minor": "8", - "Micro": "1.dev7" + "Minor": "7", + "Micro": "0" }, "Author": "", "AuthorEmail": "", @@ -17,13 +17,14 @@ "LicenseDescription": "", "Dependencies": [ "cpl-core>=2022.8.1.dev7", - "cpl-cli>=2022.8.1.dev7" + "cpl-cli>=2022.7.0" ], "PythonVersion": ">=3.10.4", "PythonPath": { "linux": "" }, - "Classifiers": [] + "Classifiers": [], + "DevDependencies": [] }, "BuildSettings": { "ProjectType": "library", diff --git a/unittests/unittests_translation/__init__.py b/unittests/unittests_translation/__init__.py new file mode 100644 index 00000000..ad5eca30 --- /dev/null +++ b/unittests/unittests_translation/__init__.py @@ -0,0 +1 @@ +# imports: diff --git a/unittests/unittests_translation/translation/de.json b/unittests/unittests_translation/translation/de.json new file mode 100644 index 00000000..afd34db5 --- /dev/null +++ b/unittests/unittests_translation/translation/de.json @@ -0,0 +1,7 @@ +{ + "main": { + "text": { + "hello_world": "Hallo Welt" + } + } +} \ No newline at end of file diff --git a/unittests/unittests_translation/translation/en.json b/unittests/unittests_translation/translation/en.json new file mode 100644 index 00000000..77c63c59 --- /dev/null +++ b/unittests/unittests_translation/translation/en.json @@ -0,0 +1,7 @@ +{ + "main": { + "text": { + "hello_world": "Hello World" + } + } +} \ No newline at end of file diff --git a/unittests/unittests_translation/translation_test_case.py b/unittests/unittests_translation/translation_test_case.py new file mode 100644 index 00000000..f7546ea6 --- /dev/null +++ b/unittests/unittests_translation/translation_test_case.py @@ -0,0 +1,67 @@ +import os +import unittest +from typing import Optional + +from cpl_translation import TranslationService, TranslatePipe, TranslationSettings +from unittests_cli.constants import TRANSLATION_PATH + + +class TranslationTestCase(unittest.TestCase): + + def __init__(self, methodName: str): + unittest.TestCase.__init__(self, methodName) + self._translation: Optional[TranslationService] = None + self._translate: Optional[TranslatePipe] = None + + def setUp(self): + os.chdir(os.path.abspath(TRANSLATION_PATH)) + self._translation = TranslationService() + settings = TranslationSettings() + settings.from_dict({ + "Languages": [ + "de", + "en" + ], + "DefaultLanguage": "en" + }) + self._translation.load_by_settings(settings) + self._translation.set_default_lang('de') + self._translate = TranslatePipe(self._translation) + + def cleanUp(self): + pass + + def test_service(self): + self.assertEqual('Hallo Welt', self._translation.translate('main.text.hello_world')) + self._translation.set_lang('en') + self.assertEqual('Hello World', self._translation.translate('main.text.hello_world')) + with self.assertRaises(KeyError) as ctx: + self._translation.translate('main.text.hallo_welt') + + self.assertTrue(type(ctx.exception) == KeyError) + self.assertIn('Translation main.text.hallo_welt not found', str(ctx.exception)) + + with self.assertRaises(FileNotFoundError) as ctx: + self._translation.load('DE') + + self.assertTrue(type(ctx.exception) == FileNotFoundError) + + with self.assertRaises(KeyError) as ctx: + self._translation.set_lang('DE') + + self.assertTrue(type(ctx.exception) == KeyError) + + with self.assertRaises(KeyError) as ctx: + self._translation.set_default_lang('DE') + + self.assertTrue(type(ctx.exception) == KeyError) + + def test_pipe(self): + self.assertEqual('Hallo Welt', self._translate.transform('main.text.hello_world')) + self._translation.set_lang('en') + self.assertEqual('Hello World', self._translate.transform('main.text.hello_world')) + with self.assertRaises(KeyError) as ctx: + self._translation.translate('main.text.hallo_welt') + + self.assertTrue(type(ctx.exception) == KeyError) + self.assertIn('Translation main.text.hallo_welt not found', str(ctx.exception)) diff --git a/unittests/unittests_translation/translation_test_suite.py b/unittests/unittests_translation/translation_test_suite.py new file mode 100644 index 00000000..f1e15132 --- /dev/null +++ b/unittests/unittests_translation/translation_test_suite.py @@ -0,0 +1,51 @@ +import os +import shutil +import traceback +import unittest +from typing import Optional +from unittest import TestResult + +from unittests_cli.constants import PLAYGROUND_PATH +from unittests_translation.translation_test_case import TranslationTestCase + + +class TranslationTestSuite(unittest.TestSuite): + + def __init__(self): + unittest.TestSuite.__init__(self) + + loader = unittest.TestLoader() + self._result: Optional[TestResult] = None + self._is_online = True + + active_tests = [ + TranslationTestCase + ] + + for test in active_tests: + self.addTests(loader.loadTestsFromTestCase(test)) + + def _setup(self): + try: + if os.path.exists(PLAYGROUND_PATH): + shutil.rmtree(os.path.abspath(os.path.join(PLAYGROUND_PATH))) + + os.makedirs(PLAYGROUND_PATH) + os.chdir(PLAYGROUND_PATH) + except Exception as e: + print(f'Setup of {__name__} failed: {traceback.format_exc()}') + + def _cleanup(self): + try: + if self._result is not None and (len(self._result.errors) > 0 or len(self._result.failures) > 0): + return + + if os.path.exists(PLAYGROUND_PATH): + shutil.rmtree(os.path.abspath(os.path.join(PLAYGROUND_PATH))) + except Exception as e: + print(f'Cleanup of {__name__} failed: {traceback.format_exc()}') + + def run(self, *args): + self._setup() + self._result = super().run(*args) + self._cleanup() diff --git a/unittests/unittests_translation/unittests_translation.json b/unittests/unittests_translation/unittests_translation.json new file mode 100644 index 00000000..05cb6ca4 --- /dev/null +++ b/unittests/unittests_translation/unittests_translation.json @@ -0,0 +1,47 @@ +{ + "ProjectSettings": { + "Name": "unittests_translation", + "Version": { + "Major": "2022", + "Minor": "7", + "Micro": "0" + }, + "Author": "", + "AuthorEmail": "", + "Description": "", + "LongDescription": "", + "URL": "", + "CopyrightDate": "", + "CopyrightName": "", + "LicenseName": "", + "LicenseDescription": "", + "Dependencies": [ + "cpl-core>=2022.7.0", + "cpl-translation>=2022.7.0" + ], + "DevDependencies": [ + "cpl-cli>=2022.7.0" + ], + "PythonVersion": ">=3.10.4", + "PythonPath": { + "linux": "" + }, + "Classifiers": [] + }, + "BuildSettings": { + "ProjectType": "unittest", + "SourcePath": "", + "OutputPath": "../../dist", + "Main": "unittests_translation.main", + "EntryPoint": "unittests_translation", + "IncludePackageData": false, + "Included": [], + "Excluded": [ + "*/__pycache__", + "*/logs", + "*/tests" + ], + "PackageData": {}, + "ProjectReferences": [] + } +} \ No newline at end of file From 4a766e82840822b3c375f9fc91092ddb5e18175e Mon Sep 17 00:00:00 2001 From: Sven Heidemann Date: Sun, 10 Jul 2022 18:08:44 +0200 Subject: [PATCH 7/7] Release 2022.7 --- cpl-workspace.json | 57 +++++++++++++++---- src/cpl_cli/__init__.py | 1 + src/cpl_cli/_templates/__init__.py | 1 + src/cpl_cli/_templates/build/__init__.py | 1 + src/cpl_cli/_templates/generate/__init__.py | 1 + src/cpl_cli/_templates/new/__init__.py | 1 + .../_templates/new/console/__init__.py | 1 + .../_templates/new/console/source/__init__.py | 1 + .../new/console/source/name/__init__.py | 1 + .../new/console/source/tests/__init__.py | 1 + .../_templates/new/library/__init__.py | 1 + .../_templates/new/library/source/__init__.py | 1 + .../new/library/source/name/__init__.py | 1 + .../new/library/source/tests/__init__.py | 1 + .../_templates/new/unittest/__init__.py | 1 + .../new/unittest/source/__init__.py | 1 + .../new/unittest/source/name/__init__.py | 1 + src/cpl_cli/_templates/publish/__init__.py | 1 + src/cpl_cli/command/__init__.py | 1 + src/cpl_cli/configuration/__init__.py | 1 + src/cpl_cli/live_server/__init__.py | 1 + src/cpl_cli/publish/__init__.py | 1 + src/cpl_cli/source_creator/__init__.py | 1 + src/cpl_cli/validators/__init__.py | 1 + src/cpl_core/__init__.py | 1 + src/cpl_core/application/__init__.py | 1 + src/cpl_core/configuration/__init__.py | 1 + src/cpl_core/console/__init__.py | 1 + src/cpl_core/database/__init__.py | 1 + src/cpl_core/database/connection/__init__.py | 1 + src/cpl_core/database/context/__init__.py | 1 + src/cpl_core/dependency_injection/__init__.py | 1 + src/cpl_core/environment/__init__.py | 1 + src/cpl_core/logging/__init__.py | 1 + src/cpl_core/mailing/__init__.py | 1 + src/cpl_core/pipes/__init__.py | 1 + src/cpl_core/time/__init__.py | 1 + src/cpl_core/utils/__init__.py | 1 + src/cpl_query/__init__.py | 1 + src/cpl_query/_query/__init__.py | 1 + src/cpl_query/extension/__init__.py | 1 + src/cpl_translation/__init__.py | 5 +- tools/set_pip_urls/__init__.py | 1 + tools/set_pip_urls/set-pip-urls.json | 5 +- tools/set_version/__init__.py | 1 + 45 files changed, 94 insertions(+), 15 deletions(-) diff --git a/cpl-workspace.json b/cpl-workspace.json index e0435866..e4b287c3 100644 --- a/cpl-workspace.json +++ b/cpl-workspace.json @@ -17,70 +17,105 @@ }, "Scripts": { "hello-world": "echo 'Hello World'", + "sv": "cpl set-version", "set-version": "cpl run set-version $ARGS; echo '';", + "spu": "cpl set-pip-urls", "set-pip-urls": "cpl run set-pip-urls $ARGS; echo '';", + "docs-build": "echo 'Build Documentation'; cd docs/; sphinx-apidoc -o source/ ../src/cpl_core; sphinx-apidoc -o source/ ../src/cpl_query; make clean; make html; rm source/cpl_query.tests.rst;", "db": "cpl docs-build", + "docs-open": "xdg-open $PWD/docs/build/html/index.html &", "do": "cpl docs-open", + "test": "cpl run unittests", + "pre-build-all": "cpl sv $ARGS; cpl spu $ARGS;", - "build-all": "cpl build-cli; cpl build-core; cpl build-query; cpl build-set-pip-urls; cpl build-set-version", + "build-all": "cpl build-cli; cpl build-core; cpl build-query; cpl build-translation; cpl build-set-pip-urls; cpl build-set-version", "ba": "cpl build-all $ARGS", "build-cli": "echo 'Build cpl-cli'; cd ./src/cpl_cli; cpl build; cd ../../;", "build-core": "echo 'Build cpl-core'; cd ./src/cpl_core; cpl build; cd ../../;", "build-query": "echo 'Build cpl-query'; cd ./src/cpl_query; cpl build; cd ../../;", + "build-translation": "echo 'Build cpl-translation'; cd ./src/cpl_translation; cpl build; cd ../../;", "build-set-pip-urls": "echo 'Build set-pip-urls'; cd ./tools/set_pip_urls; cpl build; cd ../../;", "build-set-version": "echo 'Build set-version'; cd ./tools/set_version; cpl build; cd ../../;", + "pre-publish-all": "cpl sv $ARGS; cpl spu $ARGS;", - "publish-all": "cpl publish-cli; cpl publish-core; cpl publish-query;", + "publish-all": "cpl publish-cli; cpl publish-core; cpl publish-query; cpl publish-translation;", "pa": "cpl build-all $ARGS", "publish-cli": "echo 'Publish cpl-cli'; cd ./src/cpl_cli; cpl publish; cd ../../;", "publish-core": "echo 'Publish cpl-core'; cd ./src/cpl_core; cpl publish; cd ../../;", - "publish-query": "echo 'Publish cpl_query'; cd ./src/cpl_query; cpl publish; cd ../../;", + "publish-query": "echo 'Publish cpl-query'; cd ./src/cpl_query; cpl publish; cd ../../;", + "publish-translation": "echo 'Publish cpl-translation'; cd ./src/cpl_translation; cpl publish; cd ../../;", + "upload-prod-cli": "echo 'PROD Upload cpl-cli'; cpl upl-prod-cli;", "upl-prod-cli": "twine upload -r pip.sh-edraft.de dist/cpl-cli/publish/setup/*", + "upload-prod-core": "echo 'PROD Upload cpl-core'; cpl upl-prod-core;", "upl-prod-core": "twine upload -r pip.sh-edraft.de dist/cpl-core/publish/setup/*", - "upload-prod-query": "echo 'PROD Upload cpl_query'; cpl upl-prod-query;", + + "upload-prod-query": "echo 'PROD Upload cpl-query'; cpl upl-prod-query;", "upl-prod-query": "twine upload -r pip.sh-edraft.de dist/cpl-query/publish/setup/*", + + "upload-prod-translation": "echo 'PROD Upload cpl-translation'; cpl upl-prod-translation;", + "upl-prod-translation": "twine upload -r pip.sh-edraft.de dist/cpl-translation/publish/setup/*", + "upload-exp-cli": "echo 'EXP Upload cpl-cli'; cpl upl-exp-cli;", "upl-exp-cli": "twine upload -r pip-exp.sh-edraft.de dist/cpl-cli/publish/setup/*", + "upload-exp-core": "echo 'EXP Upload cpl-core'; cpl upl-exp-core;", "upl-exp-core": "twine upload -r pip-exp.sh-edraft.de dist/cpl-core/publish/setup/*", - "upload-exp-query": "echo 'EXP Upload cpl_query'; cpl upl-exp-query;", + + "upload-exp-query": "echo 'EXP Upload cpl-query'; cpl upl-exp-query;", "upl-exp-query": "twine upload -r pip-exp.sh-edraft.de dist/cpl-query/publish/setup/*", + + "upload-exp-translation": "echo 'EXP Upload cpl-translation'; cpl upl-exp-translation;", + "upl-exp-translation": "twine upload -r pip-exp.sh-edraft.de dist/cpl-translation/publish/setup/*", + "upload-dev-cli": "echo 'DEV Upload cpl-cli'; cpl upl-dev-cli;", "upl-dev-cli": "twine upload -r pip-dev.sh-edraft.de dist/cpl-cli/publish/setup/*", + "upload-dev-core": "echo 'DEV Upload cpl-core'; cpl upl-dev-core;", "upl-dev-core": "twine upload -r pip-dev.sh-edraft.de dist/cpl-core/publish/setup/*", - "upload-dev-query": "echo 'DEV Upload cpl_query'; cpl upl-dev-query;", + + "upload-dev-query": "echo 'DEV Upload cpl-query'; cpl upl-dev-query;", "upl-dev-query": "twine upload -r pip-dev.sh-edraft.de dist/cpl-query/publish/setup/*", + + "upload-dev-translation": "echo 'DEV Upload cpl-translation'; cpl upl-dev-translation;", + "upl-dev-translation": "twine upload -r pip-dev.sh-edraft.de dist/cpl-translation/publish/setup/*", + "pre-deploy-prod": "cpl sv $ARGS; cpl spu --environment=production;", - "deploy-prod": "cpl deploy-prod-cli; cpl deploy-prod-core; cpl deploy-prod-query;", + "deploy-prod": "cpl deploy-prod-cli; cpl deploy-prod-core; cpl deploy-prod-query; cpl deploy-prod-translation;", "dp": "cpl deploy-prod $ARGS", "deploy-prod-cli": "cpl publish-cli; cpl upload-prod-cli", "deploy-prod-core": "cpl publish-core; cpl upload-prod-core", "deploy-prod-query": "cpl publish-query; cpl upload-prod-query", + "deploy-prod-translation": "cpl publish-translation; cpl upload-prod-translation", + "pre-deploy-exp": "cpl sv $ARGS; cpl spu --environment=staging;", - "deploy-exp": "cpl deploy-exp-cli; cpl deploy-exp-core; cpl deploy-exp-query;", + "deploy-exp": "cpl deploy-exp-cli; cpl deploy-exp-core; cpl deploy-exp-query; cpl deploy-exp-translation;", "de": "cpl deploy-exp $ARGS", "deploy-exp-cli": "cpl publish-cli; cpl upload-exp-cli", "deploy-exp-core": "cpl publish-core; cpl upload-exp-core", "deploy-exp-query": "cpl publish-query; cpl upload-exp-query", + "deploy-exp-translation": "cpl publish-translation; cpl upload-exp-translation", + "pre-deploy-dev": "cpl sv $ARGS; cpl spu --environment=development;", - "deploy-dev": "cpl deploy-dev-cli; cpl deploy-dev-core; cpl deploy-dev-query;", + "deploy-dev": "cpl deploy-dev-cli; cpl deploy-dev-core; cpl deploy-dev-query; cpl deploy-dev-translation;", "dd": "cpl deploy-dev $ARGS", "deploy-dev-cli": "cpl publish-cli; cpl upload-dev-cli", "deploy-dev-core": "cpl publish-core; cpl upload-dev-core", "deploy-dev-query": "cpl publish-query; cpl upload-dev-query", - "dev-install": "cpl di-core; cpl di-cli; cpl di-query;", + "deploy-dev-translation": "cpl publish-query; cpl upload-dev-translation", + + "dev-install": "cpl di-core; cpl di-cli; cpl di-query; cpl di-translation;", "di": "cpl dev-install", "di-core": "pip install cpl-core --pre --upgrade --extra-index-url https://pip-dev.sh-edraft.de", "di-cli": "pip install cpl-cli --pre --upgrade --extra-index-url https://pip-dev.sh-edraft.de", - "di-query": "pip install cpl-query --pre --upgrade --extra-index-url https://pip-dev.sh-edraft.de" + "di-query": "pip install cpl-query --pre --upgrade --extra-index-url https://pip-dev.sh-edraft.de", + "di-translation": "pip install cpl-translation --pre --upgrade --extra-index-url https://pip-dev.sh-edraft.de" } } } \ No newline at end of file diff --git a/src/cpl_cli/__init__.py b/src/cpl_cli/__init__.py index 921db544..500289d9 100644 --- a/src/cpl_cli/__init__.py +++ b/src/cpl_cli/__init__.py @@ -19,6 +19,7 @@ __version__ = '2022.7.0' from collections import namedtuple + # imports: from .cli import CLI from .command_abc import CommandABC diff --git a/src/cpl_cli/_templates/__init__.py b/src/cpl_cli/_templates/__init__.py index 2179e037..70ee0afb 100644 --- a/src/cpl_cli/_templates/__init__.py +++ b/src/cpl_cli/_templates/__init__.py @@ -19,6 +19,7 @@ __version__ = '2022.7.0' from collections import namedtuple + # imports: VersionInfo = namedtuple('VersionInfo', 'major minor micro') diff --git a/src/cpl_cli/_templates/build/__init__.py b/src/cpl_cli/_templates/build/__init__.py index 1a1fd9e3..d7c7fbe8 100644 --- a/src/cpl_cli/_templates/build/__init__.py +++ b/src/cpl_cli/_templates/build/__init__.py @@ -19,6 +19,7 @@ __version__ = '2022.7.0' from collections import namedtuple + # imports: VersionInfo = namedtuple('VersionInfo', 'major minor micro') diff --git a/src/cpl_cli/_templates/generate/__init__.py b/src/cpl_cli/_templates/generate/__init__.py index 4dca807d..b32148e9 100644 --- a/src/cpl_cli/_templates/generate/__init__.py +++ b/src/cpl_cli/_templates/generate/__init__.py @@ -19,6 +19,7 @@ __version__ = '2022.7.0' from collections import namedtuple + # imports: VersionInfo = namedtuple('VersionInfo', 'major minor micro') diff --git a/src/cpl_cli/_templates/new/__init__.py b/src/cpl_cli/_templates/new/__init__.py index 21ce3b9f..0fc895c0 100644 --- a/src/cpl_cli/_templates/new/__init__.py +++ b/src/cpl_cli/_templates/new/__init__.py @@ -19,6 +19,7 @@ __version__ = '2022.7.0' from collections import namedtuple + # imports: VersionInfo = namedtuple('VersionInfo', 'major minor micro') diff --git a/src/cpl_cli/_templates/new/console/__init__.py b/src/cpl_cli/_templates/new/console/__init__.py index 304836c9..50a89951 100644 --- a/src/cpl_cli/_templates/new/console/__init__.py +++ b/src/cpl_cli/_templates/new/console/__init__.py @@ -19,6 +19,7 @@ __version__ = '2022.7.0' from collections import namedtuple + # imports: VersionInfo = namedtuple('VersionInfo', 'major minor micro') diff --git a/src/cpl_cli/_templates/new/console/source/__init__.py b/src/cpl_cli/_templates/new/console/source/__init__.py index 3fb2e55c..018811e9 100644 --- a/src/cpl_cli/_templates/new/console/source/__init__.py +++ b/src/cpl_cli/_templates/new/console/source/__init__.py @@ -19,6 +19,7 @@ __version__ = '2022.7.0' from collections import namedtuple + # imports: VersionInfo = namedtuple('VersionInfo', 'major minor micro') diff --git a/src/cpl_cli/_templates/new/console/source/name/__init__.py b/src/cpl_cli/_templates/new/console/source/name/__init__.py index 5be8124f..97fde9b4 100644 --- a/src/cpl_cli/_templates/new/console/source/name/__init__.py +++ b/src/cpl_cli/_templates/new/console/source/name/__init__.py @@ -19,6 +19,7 @@ __version__ = '2022.7.0' from collections import namedtuple + # imports: VersionInfo = namedtuple('VersionInfo', 'major minor micro') diff --git a/src/cpl_cli/_templates/new/console/source/tests/__init__.py b/src/cpl_cli/_templates/new/console/source/tests/__init__.py index 8002e7fa..2d395b7c 100644 --- a/src/cpl_cli/_templates/new/console/source/tests/__init__.py +++ b/src/cpl_cli/_templates/new/console/source/tests/__init__.py @@ -19,6 +19,7 @@ __version__ = '2022.7.0' from collections import namedtuple + # imports: VersionInfo = namedtuple('VersionInfo', 'major minor micro') diff --git a/src/cpl_cli/_templates/new/library/__init__.py b/src/cpl_cli/_templates/new/library/__init__.py index 1b9c9e1c..683167a5 100644 --- a/src/cpl_cli/_templates/new/library/__init__.py +++ b/src/cpl_cli/_templates/new/library/__init__.py @@ -19,6 +19,7 @@ __version__ = '2022.7.0' from collections import namedtuple + # imports: VersionInfo = namedtuple('VersionInfo', 'major minor micro') diff --git a/src/cpl_cli/_templates/new/library/source/__init__.py b/src/cpl_cli/_templates/new/library/source/__init__.py index 7ea7ef05..425fb590 100644 --- a/src/cpl_cli/_templates/new/library/source/__init__.py +++ b/src/cpl_cli/_templates/new/library/source/__init__.py @@ -19,6 +19,7 @@ __version__ = '2022.7.0' from collections import namedtuple + # imports: VersionInfo = namedtuple('VersionInfo', 'major minor micro') diff --git a/src/cpl_cli/_templates/new/library/source/name/__init__.py b/src/cpl_cli/_templates/new/library/source/name/__init__.py index 60f040a2..4227edff 100644 --- a/src/cpl_cli/_templates/new/library/source/name/__init__.py +++ b/src/cpl_cli/_templates/new/library/source/name/__init__.py @@ -19,6 +19,7 @@ __version__ = '2022.7.0' from collections import namedtuple + # imports: VersionInfo = namedtuple('VersionInfo', 'major minor micro') diff --git a/src/cpl_cli/_templates/new/library/source/tests/__init__.py b/src/cpl_cli/_templates/new/library/source/tests/__init__.py index ff01af13..19876d5b 100644 --- a/src/cpl_cli/_templates/new/library/source/tests/__init__.py +++ b/src/cpl_cli/_templates/new/library/source/tests/__init__.py @@ -19,6 +19,7 @@ __version__ = '2022.7.0' from collections import namedtuple + # imports: VersionInfo = namedtuple('VersionInfo', 'major minor micro') diff --git a/src/cpl_cli/_templates/new/unittest/__init__.py b/src/cpl_cli/_templates/new/unittest/__init__.py index 6bf51182..bed7ce6d 100644 --- a/src/cpl_cli/_templates/new/unittest/__init__.py +++ b/src/cpl_cli/_templates/new/unittest/__init__.py @@ -19,6 +19,7 @@ __version__ = '2022.7.0' from collections import namedtuple + # imports: VersionInfo = namedtuple('VersionInfo', 'major minor micro') diff --git a/src/cpl_cli/_templates/new/unittest/source/__init__.py b/src/cpl_cli/_templates/new/unittest/source/__init__.py index d293cc89..b12bdaa4 100644 --- a/src/cpl_cli/_templates/new/unittest/source/__init__.py +++ b/src/cpl_cli/_templates/new/unittest/source/__init__.py @@ -19,6 +19,7 @@ __version__ = '2022.7.0' from collections import namedtuple + # imports: VersionInfo = namedtuple('VersionInfo', 'major minor micro') diff --git a/src/cpl_cli/_templates/new/unittest/source/name/__init__.py b/src/cpl_cli/_templates/new/unittest/source/name/__init__.py index 9c85c5ae..d5bc3b5b 100644 --- a/src/cpl_cli/_templates/new/unittest/source/name/__init__.py +++ b/src/cpl_cli/_templates/new/unittest/source/name/__init__.py @@ -19,6 +19,7 @@ __version__ = '2022.7.0' from collections import namedtuple + # imports: VersionInfo = namedtuple('VersionInfo', 'major minor micro') diff --git a/src/cpl_cli/_templates/publish/__init__.py b/src/cpl_cli/_templates/publish/__init__.py index 38ba30db..c9be677a 100644 --- a/src/cpl_cli/_templates/publish/__init__.py +++ b/src/cpl_cli/_templates/publish/__init__.py @@ -19,6 +19,7 @@ __version__ = '2022.7.0' from collections import namedtuple + # imports: VersionInfo = namedtuple('VersionInfo', 'major minor micro') diff --git a/src/cpl_cli/command/__init__.py b/src/cpl_cli/command/__init__.py index 22e082fd..e8bfbb1d 100644 --- a/src/cpl_cli/command/__init__.py +++ b/src/cpl_cli/command/__init__.py @@ -19,6 +19,7 @@ __version__ = '2022.7.0' from collections import namedtuple + # imports: from .build_service import BuildService from .generate_service import GenerateService diff --git a/src/cpl_cli/configuration/__init__.py b/src/cpl_cli/configuration/__init__.py index dab154b5..2392d059 100644 --- a/src/cpl_cli/configuration/__init__.py +++ b/src/cpl_cli/configuration/__init__.py @@ -19,6 +19,7 @@ __version__ = '2022.7.0' from collections import namedtuple + # imports: from .build_settings import BuildSettings from .build_settings_name_enum import BuildSettingsNameEnum diff --git a/src/cpl_cli/live_server/__init__.py b/src/cpl_cli/live_server/__init__.py index e16fc8a2..46e6b6d2 100644 --- a/src/cpl_cli/live_server/__init__.py +++ b/src/cpl_cli/live_server/__init__.py @@ -19,6 +19,7 @@ __version__ = '2022.7.0' from collections import namedtuple + # imports: VersionInfo = namedtuple('VersionInfo', 'major minor micro') diff --git a/src/cpl_cli/publish/__init__.py b/src/cpl_cli/publish/__init__.py index ca7420aa..9a39a422 100644 --- a/src/cpl_cli/publish/__init__.py +++ b/src/cpl_cli/publish/__init__.py @@ -19,6 +19,7 @@ __version__ = '2022.7.0' from collections import namedtuple + # imports: from .publisher_abc import PublisherABC from .publisher_service import PublisherService diff --git a/src/cpl_cli/source_creator/__init__.py b/src/cpl_cli/source_creator/__init__.py index 8b29cf9f..bd1fabe0 100644 --- a/src/cpl_cli/source_creator/__init__.py +++ b/src/cpl_cli/source_creator/__init__.py @@ -19,6 +19,7 @@ __version__ = '2022.7.0' from collections import namedtuple + # imports: VersionInfo = namedtuple('VersionInfo', 'major minor micro') diff --git a/src/cpl_cli/validators/__init__.py b/src/cpl_cli/validators/__init__.py index 2c4258ae..c58e4aa3 100644 --- a/src/cpl_cli/validators/__init__.py +++ b/src/cpl_cli/validators/__init__.py @@ -19,6 +19,7 @@ __version__ = '2022.7.0' from collections import namedtuple + # imports: VersionInfo = namedtuple('VersionInfo', 'major minor micro') diff --git a/src/cpl_core/__init__.py b/src/cpl_core/__init__.py index 14a45a27..81945db0 100644 --- a/src/cpl_core/__init__.py +++ b/src/cpl_core/__init__.py @@ -19,6 +19,7 @@ __version__ = '2022.7.0' from collections import namedtuple + # imports: VersionInfo = namedtuple('VersionInfo', 'major minor micro') diff --git a/src/cpl_core/application/__init__.py b/src/cpl_core/application/__init__.py index 5dd5cfac..3770c81f 100644 --- a/src/cpl_core/application/__init__.py +++ b/src/cpl_core/application/__init__.py @@ -19,6 +19,7 @@ __version__ = '2022.7.0' from collections import namedtuple + # imports: from .application_abc import ApplicationABC from .application_builder import ApplicationBuilder diff --git a/src/cpl_core/configuration/__init__.py b/src/cpl_core/configuration/__init__.py index 162bd1a7..b596a6a9 100644 --- a/src/cpl_core/configuration/__init__.py +++ b/src/cpl_core/configuration/__init__.py @@ -19,6 +19,7 @@ __version__ = '2022.7.0' from collections import namedtuple + # imports: from .argument_abc import ArgumentABC from .argument_builder import ArgumentBuilder diff --git a/src/cpl_core/console/__init__.py b/src/cpl_core/console/__init__.py index d027febe..bf3a5d7d 100644 --- a/src/cpl_core/console/__init__.py +++ b/src/cpl_core/console/__init__.py @@ -19,6 +19,7 @@ __version__ = '2022.7.0' from collections import namedtuple + # imports: from .background_color_enum import BackgroundColorEnum from .console import Console diff --git a/src/cpl_core/database/__init__.py b/src/cpl_core/database/__init__.py index f4332e50..bf073307 100644 --- a/src/cpl_core/database/__init__.py +++ b/src/cpl_core/database/__init__.py @@ -19,6 +19,7 @@ __version__ = '2022.7.0' from collections import namedtuple + # imports: from .database_settings_name_enum import DatabaseSettingsNameEnum from .database_settings import DatabaseSettings diff --git a/src/cpl_core/database/connection/__init__.py b/src/cpl_core/database/connection/__init__.py index d9a40b1e..e50b869d 100644 --- a/src/cpl_core/database/connection/__init__.py +++ b/src/cpl_core/database/connection/__init__.py @@ -19,6 +19,7 @@ __version__ = '2022.7.0' from collections import namedtuple + # imports: from .database_connection import DatabaseConnection from .database_connection_abc import DatabaseConnectionABC diff --git a/src/cpl_core/database/context/__init__.py b/src/cpl_core/database/context/__init__.py index 057aea25..3494c1ba 100644 --- a/src/cpl_core/database/context/__init__.py +++ b/src/cpl_core/database/context/__init__.py @@ -19,6 +19,7 @@ __version__ = '2022.7.0' from collections import namedtuple + # imports: from .database_context import DatabaseContext from .database_context_abc import DatabaseContextABC diff --git a/src/cpl_core/dependency_injection/__init__.py b/src/cpl_core/dependency_injection/__init__.py index 2292a916..0ed934eb 100644 --- a/src/cpl_core/dependency_injection/__init__.py +++ b/src/cpl_core/dependency_injection/__init__.py @@ -19,6 +19,7 @@ __version__ = '2022.7.0' from collections import namedtuple + # imports: from .scope import Scope from .scope_abc import ScopeABC diff --git a/src/cpl_core/environment/__init__.py b/src/cpl_core/environment/__init__.py index f6d308cd..79a9c218 100644 --- a/src/cpl_core/environment/__init__.py +++ b/src/cpl_core/environment/__init__.py @@ -19,6 +19,7 @@ __version__ = '2022.7.0' from collections import namedtuple + # imports: from .application_environment_abc import ApplicationEnvironmentABC from .environment_name_enum import EnvironmentNameEnum diff --git a/src/cpl_core/logging/__init__.py b/src/cpl_core/logging/__init__.py index 7a6c5e2a..05d4b1d6 100644 --- a/src/cpl_core/logging/__init__.py +++ b/src/cpl_core/logging/__init__.py @@ -19,6 +19,7 @@ __version__ = '2022.7.0' from collections import namedtuple + # imports: from .logger_service import Logger from .logger_abc import LoggerABC diff --git a/src/cpl_core/mailing/__init__.py b/src/cpl_core/mailing/__init__.py index 52bac922..55787a9f 100644 --- a/src/cpl_core/mailing/__init__.py +++ b/src/cpl_core/mailing/__init__.py @@ -19,6 +19,7 @@ __version__ = '2022.7.0' from collections import namedtuple + # imports: from .email import EMail from .email_client_service import EMailClient diff --git a/src/cpl_core/pipes/__init__.py b/src/cpl_core/pipes/__init__.py index 794a5ec6..478cfa06 100644 --- a/src/cpl_core/pipes/__init__.py +++ b/src/cpl_core/pipes/__init__.py @@ -19,6 +19,7 @@ __version__ = '2022.7.0' from collections import namedtuple + # imports: from .bool_pipe import BoolPipe from .first_char_to_lower_pipe import FirstCharToLowerPipe diff --git a/src/cpl_core/time/__init__.py b/src/cpl_core/time/__init__.py index 343536d5..6d8c2e29 100644 --- a/src/cpl_core/time/__init__.py +++ b/src/cpl_core/time/__init__.py @@ -19,6 +19,7 @@ __version__ = '2022.7.0' from collections import namedtuple + # imports: from .time_format_settings import TimeFormatSettings from .time_format_settings_names_enum import TimeFormatSettingsNamesEnum diff --git a/src/cpl_core/utils/__init__.py b/src/cpl_core/utils/__init__.py index be8bd300..2d3c8bc4 100644 --- a/src/cpl_core/utils/__init__.py +++ b/src/cpl_core/utils/__init__.py @@ -19,6 +19,7 @@ __version__ = '2022.7.0' from collections import namedtuple + # imports: from .credential_manager import CredentialManager from .string import String diff --git a/src/cpl_query/__init__.py b/src/cpl_query/__init__.py index 81ae55f3..295e0eac 100644 --- a/src/cpl_query/__init__.py +++ b/src/cpl_query/__init__.py @@ -19,6 +19,7 @@ __version__ = '2022.7.0' from collections import namedtuple + # imports: VersionInfo = namedtuple('VersionInfo', 'major minor micro') diff --git a/src/cpl_query/_query/__init__.py b/src/cpl_query/_query/__init__.py index c4a4e7c8..55afe7f2 100644 --- a/src/cpl_query/_query/__init__.py +++ b/src/cpl_query/_query/__init__.py @@ -19,6 +19,7 @@ __version__ = '2022.7.0' from collections import namedtuple + # imports: VersionInfo = namedtuple('VersionInfo', 'major minor micro') diff --git a/src/cpl_query/extension/__init__.py b/src/cpl_query/extension/__init__.py index 73647642..cdfa93b1 100644 --- a/src/cpl_query/extension/__init__.py +++ b/src/cpl_query/extension/__init__.py @@ -19,6 +19,7 @@ __version__ = '2022.7.0' from collections import namedtuple + # imports: from .iterable_abc import IterableABC from .iterable import Iterable diff --git a/src/cpl_translation/__init__.py b/src/cpl_translation/__init__.py index 98c00d66..1951cce6 100644 --- a/src/cpl_translation/__init__.py +++ b/src/cpl_translation/__init__.py @@ -15,10 +15,11 @@ __title__ = 'cpl_translation' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2022 sh-edraft.de' -__version__ = '2022.8.1.dev7' +__version__ = '2022.7.0' from collections import namedtuple + # imports: from .translate_pipe import TranslatePipe from .translation_service import TranslationService @@ -50,4 +51,4 @@ init() # build-ignore-end VersionInfo = namedtuple('VersionInfo', 'major minor micro') -version_info = VersionInfo(major='2022', minor='8', micro='1.dev7') +version_info = VersionInfo(major='2022', minor='7', micro='0') diff --git a/tools/set_pip_urls/__init__.py b/tools/set_pip_urls/__init__.py index 2ac682a4..293c4a42 100644 --- a/tools/set_pip_urls/__init__.py +++ b/tools/set_pip_urls/__init__.py @@ -19,6 +19,7 @@ __version__ = '2022.6.0' from collections import namedtuple + # imports: VersionInfo = namedtuple('VersionInfo', 'major minor micro') diff --git a/tools/set_pip_urls/set-pip-urls.json b/tools/set_pip_urls/set-pip-urls.json index 1e8ec912..04d95d81 100644 --- a/tools/set_pip_urls/set-pip-urls.json +++ b/tools/set_pip_urls/set-pip-urls.json @@ -16,11 +16,12 @@ "LicenseName": "MIT", "LicenseDescription": "MIT, see LICENSE for more details.", "Dependencies": [ - "cpl-core>=2022.8.1.dev7" + "cpl-core>=2022.7.0" ], "PythonVersion": ">=3.10.4", "PythonPath": {}, - "Classifiers": [] + "Classifiers": [], + "DevDependencies": [] }, "BuildSettings": { "ProjectType": "console", diff --git a/tools/set_version/__init__.py b/tools/set_version/__init__.py index 34e44564..1601ae03 100644 --- a/tools/set_version/__init__.py +++ b/tools/set_version/__init__.py @@ -19,6 +19,7 @@ __version__ = '2022.6.0' from collections import namedtuple + # imports: VersionInfo = namedtuple('VersionInfo', 'major minor micro')