From f450102c932fee9c09555f1cf476e3b1f3b7e812 Mon Sep 17 00:00:00 2001 From: Sven Heidemann Date: Wed, 30 Nov 2022 18:04:40 +0100 Subject: [PATCH 1/7] Fixed cpl g path problems & package names #93 --- cpl-workspace.json | 10 +++- src/cpl_cli/__init__.py | 2 +- src/cpl_cli/_templates/__init__.py | 2 +- src/cpl_cli/_templates/build/__init__.py | 2 +- src/cpl_cli/_templates/generate/__init__.py | 2 +- src/cpl_cli/_templates/new/__init__.py | 2 +- .../_templates/new/console/__init__.py | 2 +- .../_templates/new/console/source/__init__.py | 2 +- .../new/console/source/name/__init__.py | 2 +- .../_templates/new/library/__init__.py | 2 +- .../_templates/new/library/source/__init__.py | 2 +- .../new/library/source/name/__init__.py | 2 +- .../_templates/new/unittest/__init__.py | 2 +- .../new/unittest/source/__init__.py | 2 +- .../new/unittest/source/name/__init__.py | 2 +- src/cpl_cli/_templates/publish/__init__.py | 2 +- src/cpl_cli/command/__init__.py | 2 +- src/cpl_cli/command/generate_service.py | 55 +++++++++++-------- src/cpl_cli/configuration/__init__.py | 2 +- src/cpl_cli/live_server/__init__.py | 2 +- src/cpl_cli/migrations/__init__.py | 2 +- src/cpl_cli/migrations/base/__init__.py | 2 +- src/cpl_cli/migrations/service/__init__.py | 2 +- src/cpl_cli/publish/__init__.py | 2 +- src/cpl_cli/source_creator/__init__.py | 2 +- src/cpl_cli/validators/__init__.py | 2 +- src/cpl_core/__init__.py | 2 +- src/cpl_core/application/__init__.py | 2 +- src/cpl_core/configuration/__init__.py | 2 +- src/cpl_core/console/__init__.py | 2 +- src/cpl_core/database/__init__.py | 2 +- src/cpl_core/database/connection/__init__.py | 2 +- src/cpl_core/database/context/__init__.py | 2 +- src/cpl_core/dependency_injection/__init__.py | 2 +- src/cpl_core/environment/__init__.py | 2 +- src/cpl_core/logging/__init__.py | 2 +- src/cpl_core/mailing/__init__.py | 2 +- src/cpl_core/pipes/__init__.py | 2 +- src/cpl_core/time/__init__.py | 2 +- src/cpl_core/utils/__init__.py | 2 +- src/cpl_discord/__init__.py | 2 +- src/cpl_discord/application/__init__.py | 2 +- src/cpl_discord/command/__init__.py | 2 +- src/cpl_discord/configuration/__init__.py | 2 +- src/cpl_discord/container/__init__.py | 2 +- src/cpl_discord/events/__init__.py | 2 +- src/cpl_discord/helper/__init__.py | 2 +- src/cpl_discord/service/__init__.py | 2 +- src/cpl_query/__init__.py | 2 +- src/cpl_query/base/__init__.py | 2 +- src/cpl_query/enumerable/__init__.py | 2 +- src/cpl_query/extension/__init__.py | 2 +- src/cpl_query/iterable/__init__.py | 2 +- src/cpl_translation/__init__.py | 2 +- tools/set_pip_urls/__init__.py | 2 +- tools/set_version/__init__.py | 2 +- unittests/unittests_cli/build_test_case.py | 2 +- unittests/unittests_cli/cli_test_suite.py | 4 +- unittests/unittests_cli/generate_test_case.py | 54 +++++++++++++++++- unittests/unittests_cli/publish_test_case.py | 4 +- unittests/unittests_cli/update_test_case.py | 2 +- 61 files changed, 153 insertions(+), 86 deletions(-) diff --git a/cpl-workspace.json b/cpl-workspace.json index d07c8cae..081ff298 100644 --- a/cpl-workspace.json +++ b/cpl-workspace.json @@ -131,7 +131,15 @@ "di-cli": "pip install cpl-cli --pre --upgrade --extra-index-url https://pip-dev.sh-edraft.de", "di-discord": "pip install cpl-discord --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" + "di-translation": "pip install cpl-translation --pre --upgrade --extra-index-url https://pip-dev.sh-edraft.de", + + "prod-install": "cpl pi-core; cpl pi-cli; cpl pi-query; cpl pi-translation;", + "pi": "cpl prod-install", + "pi-core": "pip install cpl-core --pre --upgrade --extra-index-url https://pip.sh-edraft.de", + "pi-cli": "pip install cpl-cli --pre --upgrade --extra-index-url https://pip.sh-edraft.de", + "pi-discord": "pip install cpl-discord --pre --upgrade --extra-index-url https://pip.sh-edraft.de", + "pi-query": "pip install cpl-query --pre --upgrade --extra-index-url https://pip.sh-edraft.de", + "pi-translation": "pip install cpl-translation --pre --upgrade --extra-index-url https://pip.sh-edraft.de" } } } \ No newline at end of file diff --git a/src/cpl_cli/__init__.py b/src/cpl_cli/__init__.py index 13f8b234..c0ac06e8 100644 --- a/src/cpl_cli/__init__.py +++ b/src/cpl_cli/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library Command Line Interface """ -__title__ = 'cpl_cli' +__title__ = 'cpl-cli' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' diff --git a/src/cpl_cli/_templates/__init__.py b/src/cpl_cli/_templates/__init__.py index d3712583..b4ebc2fe 100644 --- a/src/cpl_cli/_templates/__init__.py +++ b/src/cpl_cli/_templates/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library Command Line Interface """ -__title__ = 'cpl_cli._templates' +__title__ = '_templates' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' diff --git a/src/cpl_cli/_templates/build/__init__.py b/src/cpl_cli/_templates/build/__init__.py index 7f7326a5..b47f7895 100644 --- a/src/cpl_cli/_templates/build/__init__.py +++ b/src/cpl_cli/_templates/build/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library Command Line Interface """ -__title__ = 'cpl_cli._templates.build' +__title__ = '_templates.build' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' diff --git a/src/cpl_cli/_templates/generate/__init__.py b/src/cpl_cli/_templates/generate/__init__.py index efb7c762..85fbb8fc 100644 --- a/src/cpl_cli/_templates/generate/__init__.py +++ b/src/cpl_cli/_templates/generate/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library Command Line Interface """ -__title__ = 'cpl_cli._templates.generate' +__title__ = '_templates.generate' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' diff --git a/src/cpl_cli/_templates/new/__init__.py b/src/cpl_cli/_templates/new/__init__.py index f6295997..a1b25a8a 100644 --- a/src/cpl_cli/_templates/new/__init__.py +++ b/src/cpl_cli/_templates/new/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library Command Line Interface """ -__title__ = 'cpl_cli._templates.new' +__title__ = '_templates.new' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' diff --git a/src/cpl_cli/_templates/new/console/__init__.py b/src/cpl_cli/_templates/new/console/__init__.py index 72d7f848..a4d26886 100644 --- a/src/cpl_cli/_templates/new/console/__init__.py +++ b/src/cpl_cli/_templates/new/console/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library Command Line Interface """ -__title__ = 'cpl_cli._templates.new.console' +__title__ = '_templates.new.console' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' diff --git a/src/cpl_cli/_templates/new/console/source/__init__.py b/src/cpl_cli/_templates/new/console/source/__init__.py index bd4a870a..ca98b380 100644 --- a/src/cpl_cli/_templates/new/console/source/__init__.py +++ b/src/cpl_cli/_templates/new/console/source/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library Command Line Interface """ -__title__ = 'cpl_cli._templates.new.console.source' +__title__ = '_templates.new.console.source' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' 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 49720a92..07799ad5 100644 --- a/src/cpl_cli/_templates/new/console/source/name/__init__.py +++ b/src/cpl_cli/_templates/new/console/source/name/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library Command Line Interface """ -__title__ = 'cpl_cli._templates.new.console.source.name' +__title__ = '_templates.new.console.source.name' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' diff --git a/src/cpl_cli/_templates/new/library/__init__.py b/src/cpl_cli/_templates/new/library/__init__.py index ce0a260c..94c58e91 100644 --- a/src/cpl_cli/_templates/new/library/__init__.py +++ b/src/cpl_cli/_templates/new/library/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library Command Line Interface """ -__title__ = 'cpl_cli._templates.new.library' +__title__ = '_templates.new.library' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' diff --git a/src/cpl_cli/_templates/new/library/source/__init__.py b/src/cpl_cli/_templates/new/library/source/__init__.py index 9c720806..0cce4499 100644 --- a/src/cpl_cli/_templates/new/library/source/__init__.py +++ b/src/cpl_cli/_templates/new/library/source/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library Command Line Interface """ -__title__ = 'cpl_cli._templates.new.library.source' +__title__ = '_templates.new.library.source' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' 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 0358f17b..92a0debb 100644 --- a/src/cpl_cli/_templates/new/library/source/name/__init__.py +++ b/src/cpl_cli/_templates/new/library/source/name/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library Command Line Interface """ -__title__ = 'cpl_cli._templates.new.library.source.name' +__title__ = '_templates.new.library.source.name' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' diff --git a/src/cpl_cli/_templates/new/unittest/__init__.py b/src/cpl_cli/_templates/new/unittest/__init__.py index 346a3785..f51260ef 100644 --- a/src/cpl_cli/_templates/new/unittest/__init__.py +++ b/src/cpl_cli/_templates/new/unittest/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library Command Line Interface """ -__title__ = 'cpl_cli._templates.new.unittest' +__title__ = '_templates.new.unittest' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' diff --git a/src/cpl_cli/_templates/new/unittest/source/__init__.py b/src/cpl_cli/_templates/new/unittest/source/__init__.py index 6527f05d..a2fb7c3d 100644 --- a/src/cpl_cli/_templates/new/unittest/source/__init__.py +++ b/src/cpl_cli/_templates/new/unittest/source/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library Command Line Interface """ -__title__ = 'cpl_cli._templates.new.unittest.source' +__title__ = '_templates.new.unittest.source' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' 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 1d64ec9a..274c7fb7 100644 --- a/src/cpl_cli/_templates/new/unittest/source/name/__init__.py +++ b/src/cpl_cli/_templates/new/unittest/source/name/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library Command Line Interface """ -__title__ = 'cpl_cli._templates.new.unittest.source.name' +__title__ = '_templates.new.unittest.source.name' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' diff --git a/src/cpl_cli/_templates/publish/__init__.py b/src/cpl_cli/_templates/publish/__init__.py index 65de0113..f55bb002 100644 --- a/src/cpl_cli/_templates/publish/__init__.py +++ b/src/cpl_cli/_templates/publish/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library Command Line Interface """ -__title__ = 'cpl_cli._templates.publish' +__title__ = '_templates.publish' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' diff --git a/src/cpl_cli/command/__init__.py b/src/cpl_cli/command/__init__.py index 35d87879..f8d8e4f2 100644 --- a/src/cpl_cli/command/__init__.py +++ b/src/cpl_cli/command/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library Command Line Interface """ -__title__ = 'cpl_cli.command' +__title__ = 'command' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' diff --git a/src/cpl_cli/command/generate_service.py b/src/cpl_cli/command/generate_service.py index 18b9505c..12236c83 100644 --- a/src/cpl_cli/command/generate_service.py +++ b/src/cpl_cli/command/generate_service.py @@ -14,6 +14,7 @@ from cpl_cli._templates.generate.thread_template import ThreadTemplate from cpl_cli._templates.generate.validator_template import ValidatorTemplate from cpl_cli._templates.template_file_abc import TemplateFileABC from cpl_cli.command_abc import CommandABC +from cpl_cli.configuration import WorkspaceSettings from cpl_core.configuration.configuration_abc import ConfigurationABC from cpl_core.console.console import Console from cpl_core.console.foreground_color_enum import ForegroundColorEnum @@ -22,13 +23,20 @@ from cpl_core.utils.string import String class GenerateService(CommandABC): - def __init__(self, configuration: ConfigurationABC): + def __init__( + self, + configuration: ConfigurationABC, + workspace: WorkspaceSettings, + ): """ Service for the CLI command generate :param configuration: """ CommandABC.__init__(self) + self._config = configuration + self._workspace = workspace + self._schematics = { "abc": { "Upper": "ABC", @@ -129,27 +137,7 @@ class GenerateService(CommandABC): template.write(value) template.close() - def _generate(self, schematic: str, name: str, template: TemplateFileABC): - """ - Generates files by given schematic, name and template - :param schematic: - :param name: - :param template: - :return: - """ - class_name = name - rel_path = '' - if '/' in name: - parts = name.split('/') - rel_path = '/'.join(parts[:-1]) - class_name = parts[len(parts) - 1] - - if 'src' not in rel_path and not os.path.exists(os.path.join(self._env.working_directory, rel_path)): - rel_path = f'src/{rel_path}' - - template = template(class_name, schematic, self._schematics[schematic]["Upper"], rel_path) - - file_path = os.path.join(self._env.working_directory, template.path, template.name) + def _create_init_files(self, file_path: str, template: TemplateFileABC, class_name: str, schematic: str, rel_path: str): if not os.path.isdir(os.path.dirname(file_path)): os.makedirs(os.path.dirname(file_path)) directory = '' @@ -171,6 +159,29 @@ class GenerateService(CommandABC): spinner_foreground_color=ForegroundColorEnum.cyan ) + def _generate(self, schematic: str, name: str, template: TemplateFileABC): + """ + Generates files by given schematic, name and template + :param schematic: + :param name: + :param template: + :return: + """ + class_name = name + rel_path = '' + if '/' in name: + parts = name.split('/') + rel_path = '/'.join(parts[:-1]) + class_name = parts[len(parts) - 1] + + if self._workspace is not None and parts[0] in self._workspace.projects: + rel_path = os.path.dirname(self._workspace.projects[parts[0]]) + + template = template(class_name, schematic, self._schematics[schematic]["Upper"], rel_path) + + file_path = os.path.join(self._env.working_directory, template.path, template.name) + self._create_init_files(file_path, template, class_name, schematic, rel_path) + if os.path.isfile(file_path): Console.error(f'{String.first_to_upper(schematic)} already exists!\n') sys.exit() diff --git a/src/cpl_cli/configuration/__init__.py b/src/cpl_cli/configuration/__init__.py index 3b14d039..89471726 100644 --- a/src/cpl_cli/configuration/__init__.py +++ b/src/cpl_cli/configuration/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library Command Line Interface """ -__title__ = 'cpl_cli.configuration' +__title__ = 'configuration' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' diff --git a/src/cpl_cli/live_server/__init__.py b/src/cpl_cli/live_server/__init__.py index 86e9bded..fdf9cdd8 100644 --- a/src/cpl_cli/live_server/__init__.py +++ b/src/cpl_cli/live_server/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library Command Line Interface """ -__title__ = 'cpl_cli.live_server' +__title__ = 'live_server' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' diff --git a/src/cpl_cli/migrations/__init__.py b/src/cpl_cli/migrations/__init__.py index 196cafd0..2292d1d6 100644 --- a/src/cpl_cli/migrations/__init__.py +++ b/src/cpl_cli/migrations/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library Command Line Interface """ -__title__ = 'cpl_cli.migrations' +__title__ = 'migrations' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' diff --git a/src/cpl_cli/migrations/base/__init__.py b/src/cpl_cli/migrations/base/__init__.py index c9c00535..59143532 100644 --- a/src/cpl_cli/migrations/base/__init__.py +++ b/src/cpl_cli/migrations/base/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library Command Line Interface """ -__title__ = 'cpl_cli.migrations.base' +__title__ = 'migrations.base' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' diff --git a/src/cpl_cli/migrations/service/__init__.py b/src/cpl_cli/migrations/service/__init__.py index 4dc93e5a..87152def 100644 --- a/src/cpl_cli/migrations/service/__init__.py +++ b/src/cpl_cli/migrations/service/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library Command Line Interface """ -__title__ = 'cpl_cli.migrations.service' +__title__ = 'migrations.service' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' diff --git a/src/cpl_cli/publish/__init__.py b/src/cpl_cli/publish/__init__.py index e02b1c63..7ef12225 100644 --- a/src/cpl_cli/publish/__init__.py +++ b/src/cpl_cli/publish/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library Command Line Interface """ -__title__ = 'cpl_cli.publish' +__title__ = 'publish' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' diff --git a/src/cpl_cli/source_creator/__init__.py b/src/cpl_cli/source_creator/__init__.py index edcf1ee3..88a53b8d 100644 --- a/src/cpl_cli/source_creator/__init__.py +++ b/src/cpl_cli/source_creator/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library Command Line Interface """ -__title__ = 'cpl_cli.source_creator' +__title__ = 'source_creator' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' diff --git a/src/cpl_cli/validators/__init__.py b/src/cpl_cli/validators/__init__.py index 6e3e2300..a247d409 100644 --- a/src/cpl_cli/validators/__init__.py +++ b/src/cpl_cli/validators/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library Command Line Interface """ -__title__ = 'cpl_cli.validators' +__title__ = 'validators' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' diff --git a/src/cpl_core/__init__.py b/src/cpl_core/__init__.py index b9b5c269..831d4cdb 100644 --- a/src/cpl_core/__init__.py +++ b/src/cpl_core/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library """ -__title__ = 'cpl_core' +__title__ = 'cpl-core' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' diff --git a/src/cpl_core/application/__init__.py b/src/cpl_core/application/__init__.py index 025c205a..6c4785bb 100644 --- a/src/cpl_core/application/__init__.py +++ b/src/cpl_core/application/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library """ -__title__ = 'cpl_core.application' +__title__ = 'application' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' diff --git a/src/cpl_core/configuration/__init__.py b/src/cpl_core/configuration/__init__.py index cef5c5dd..3b3742eb 100644 --- a/src/cpl_core/configuration/__init__.py +++ b/src/cpl_core/configuration/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library """ -__title__ = 'cpl_core.configuration' +__title__ = 'configuration' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' diff --git a/src/cpl_core/console/__init__.py b/src/cpl_core/console/__init__.py index 18525b46..41363ef7 100644 --- a/src/cpl_core/console/__init__.py +++ b/src/cpl_core/console/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library """ -__title__ = 'cpl_core.console' +__title__ = 'console' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' diff --git a/src/cpl_core/database/__init__.py b/src/cpl_core/database/__init__.py index c2e5b49a..2b59e2e1 100644 --- a/src/cpl_core/database/__init__.py +++ b/src/cpl_core/database/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library """ -__title__ = 'cpl_core.database' +__title__ = 'database' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' diff --git a/src/cpl_core/database/connection/__init__.py b/src/cpl_core/database/connection/__init__.py index c1851618..f27d336e 100644 --- a/src/cpl_core/database/connection/__init__.py +++ b/src/cpl_core/database/connection/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library """ -__title__ = 'cpl_core.database.connection' +__title__ = 'database.connection' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' diff --git a/src/cpl_core/database/context/__init__.py b/src/cpl_core/database/context/__init__.py index 224ddb32..728be14a 100644 --- a/src/cpl_core/database/context/__init__.py +++ b/src/cpl_core/database/context/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library """ -__title__ = 'cpl_core.database.context' +__title__ = 'database.context' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' diff --git a/src/cpl_core/dependency_injection/__init__.py b/src/cpl_core/dependency_injection/__init__.py index b35fb03e..4f2322e3 100644 --- a/src/cpl_core/dependency_injection/__init__.py +++ b/src/cpl_core/dependency_injection/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library """ -__title__ = 'cpl_core.dependency_injection' +__title__ = 'dependency_injection' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' diff --git a/src/cpl_core/environment/__init__.py b/src/cpl_core/environment/__init__.py index 587fd780..4ac8db8b 100644 --- a/src/cpl_core/environment/__init__.py +++ b/src/cpl_core/environment/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library """ -__title__ = 'cpl_core.environment' +__title__ = 'environment' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' diff --git a/src/cpl_core/logging/__init__.py b/src/cpl_core/logging/__init__.py index 6afacdbe..0d92764a 100644 --- a/src/cpl_core/logging/__init__.py +++ b/src/cpl_core/logging/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library """ -__title__ = 'cpl_core.logging' +__title__ = 'logging' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' diff --git a/src/cpl_core/mailing/__init__.py b/src/cpl_core/mailing/__init__.py index a63daf4a..077fb36d 100644 --- a/src/cpl_core/mailing/__init__.py +++ b/src/cpl_core/mailing/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library """ -__title__ = 'cpl_core.mailing' +__title__ = 'mailing' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' diff --git a/src/cpl_core/pipes/__init__.py b/src/cpl_core/pipes/__init__.py index 6afcae2a..7502f6c5 100644 --- a/src/cpl_core/pipes/__init__.py +++ b/src/cpl_core/pipes/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library """ -__title__ = 'cpl_core.pipes' +__title__ = 'pipes' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' diff --git a/src/cpl_core/time/__init__.py b/src/cpl_core/time/__init__.py index 45aacf77..55c05086 100644 --- a/src/cpl_core/time/__init__.py +++ b/src/cpl_core/time/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library """ -__title__ = 'cpl_core.time' +__title__ = 'time' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' diff --git a/src/cpl_core/utils/__init__.py b/src/cpl_core/utils/__init__.py index 64179a2b..893d5903 100644 --- a/src/cpl_core/utils/__init__.py +++ b/src/cpl_core/utils/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library """ -__title__ = 'cpl_core.utils' +__title__ = 'utils' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' diff --git a/src/cpl_discord/__init__.py b/src/cpl_discord/__init__.py index 9e01b9a4..9b4f67d8 100644 --- a/src/cpl_discord/__init__.py +++ b/src/cpl_discord/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library link between discord.py and CPL """ -__title__ = 'cpl_discord' +__title__ = 'cpl-discord' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2021 - 2022 sh-edraft.de' diff --git a/src/cpl_discord/application/__init__.py b/src/cpl_discord/application/__init__.py index b513d032..f7cc5b3e 100644 --- a/src/cpl_discord/application/__init__.py +++ b/src/cpl_discord/application/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library link between discord.py and CPL """ -__title__ = 'cpl_discord.application' +__title__ = 'application' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2021 - 2022 sh-edraft.de' diff --git a/src/cpl_discord/command/__init__.py b/src/cpl_discord/command/__init__.py index 9ccd88da..15b8bd13 100644 --- a/src/cpl_discord/command/__init__.py +++ b/src/cpl_discord/command/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library link between discord.py and CPL """ -__title__ = 'cpl_discord.command' +__title__ = 'command' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2021 - 2022 sh-edraft.de' diff --git a/src/cpl_discord/configuration/__init__.py b/src/cpl_discord/configuration/__init__.py index 51110c41..c0b7cfcd 100644 --- a/src/cpl_discord/configuration/__init__.py +++ b/src/cpl_discord/configuration/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library link between discord.py and CPL """ -__title__ = 'cpl_discord.configuration' +__title__ = 'configuration' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2021 - 2022 sh-edraft.de' diff --git a/src/cpl_discord/container/__init__.py b/src/cpl_discord/container/__init__.py index 009623c6..c9d25138 100644 --- a/src/cpl_discord/container/__init__.py +++ b/src/cpl_discord/container/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library link between discord.py and CPL """ -__title__ = 'cpl_discord.container' +__title__ = 'container' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2021 - 2022 sh-edraft.de' diff --git a/src/cpl_discord/events/__init__.py b/src/cpl_discord/events/__init__.py index d961d3ad..9c7f7f8c 100644 --- a/src/cpl_discord/events/__init__.py +++ b/src/cpl_discord/events/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library link between discord.py and CPL """ -__title__ = 'cpl_discord.events' +__title__ = 'events' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2021 - 2022 sh-edraft.de' diff --git a/src/cpl_discord/helper/__init__.py b/src/cpl_discord/helper/__init__.py index 5eb30f53..db6a6d9c 100644 --- a/src/cpl_discord/helper/__init__.py +++ b/src/cpl_discord/helper/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library link between discord.py and CPL """ -__title__ = 'cpl_discord.helper' +__title__ = 'helper' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2021 - 2022 sh-edraft.de' diff --git a/src/cpl_discord/service/__init__.py b/src/cpl_discord/service/__init__.py index 4223e0f8..5756e668 100644 --- a/src/cpl_discord/service/__init__.py +++ b/src/cpl_discord/service/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library link between discord.py and CPL """ -__title__ = 'cpl_discord.service' +__title__ = 'service' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2021 - 2022 sh-edraft.de' diff --git a/src/cpl_query/__init__.py b/src/cpl_query/__init__.py index 86fe8082..2e2559f6 100644 --- a/src/cpl_query/__init__.py +++ b/src/cpl_query/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library Python integrated Queries """ -__title__ = 'cpl_query' +__title__ = 'cpl-query' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2021 - 2022 sh-edraft.de' diff --git a/src/cpl_query/base/__init__.py b/src/cpl_query/base/__init__.py index ab831d0a..23c921da 100644 --- a/src/cpl_query/base/__init__.py +++ b/src/cpl_query/base/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library Python integrated Queries """ -__title__ = 'cpl_query.base' +__title__ = 'base' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2021 - 2022 sh-edraft.de' diff --git a/src/cpl_query/enumerable/__init__.py b/src/cpl_query/enumerable/__init__.py index 9bd1147e..14d10619 100644 --- a/src/cpl_query/enumerable/__init__.py +++ b/src/cpl_query/enumerable/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library Python integrated Queries """ -__title__ = 'cpl_query.enumerable' +__title__ = 'enumerable' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2021 - 2022 sh-edraft.de' diff --git a/src/cpl_query/extension/__init__.py b/src/cpl_query/extension/__init__.py index c47d1d20..54cdcac2 100644 --- a/src/cpl_query/extension/__init__.py +++ b/src/cpl_query/extension/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library Python integrated Queries """ -__title__ = 'cpl_query.extension' +__title__ = 'extension' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2021 - 2022 sh-edraft.de' diff --git a/src/cpl_query/iterable/__init__.py b/src/cpl_query/iterable/__init__.py index d129a1c1..45cde067 100644 --- a/src/cpl_query/iterable/__init__.py +++ b/src/cpl_query/iterable/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library Python integrated Queries """ -__title__ = 'cpl_query.iterable' +__title__ = 'iterable' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2021 - 2022 sh-edraft.de' diff --git a/src/cpl_translation/__init__.py b/src/cpl_translation/__init__.py index d789a358..2c3eedb0 100644 --- a/src/cpl_translation/__init__.py +++ b/src/cpl_translation/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library Python Translation """ -__title__ = 'cpl_translation' +__title__ = 'cpl-translation' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2022 sh-edraft.de' diff --git a/tools/set_pip_urls/__init__.py b/tools/set_pip_urls/__init__.py index 293c4a42..290901d9 100644 --- a/tools/set_pip_urls/__init__.py +++ b/tools/set_pip_urls/__init__.py @@ -11,7 +11,7 @@ CPL internal tool to set pip URL for CLI by environment """ -__title__ = 'set_pip_urls' +__title__ = 'set-pip-urls' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2022 sh-edraft.de' diff --git a/tools/set_version/__init__.py b/tools/set_version/__init__.py index ef7b39f6..47ab1c7b 100644 --- a/tools/set_version/__init__.py +++ b/tools/set_version/__init__.py @@ -11,7 +11,7 @@ CPL internal tool to set version from branch name """ -__title__ = 'set_version' +__title__ = 'set-version' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2022 sh-edraft.de' diff --git a/unittests/unittests_cli/build_test_case.py b/unittests/unittests_cli/build_test_case.py index e35d5cbd..6594bd08 100644 --- a/unittests/unittests_cli/build_test_case.py +++ b/unittests/unittests_cli/build_test_case.py @@ -78,7 +78,7 @@ class BuildTestCase(unittest.TestCase): def test_build(self): CLICommands.build() dist_path = './dist' - full_dist_path = f'{dist_path}/{self._source}/build/{String.convert_to_snake_case(self._source)}' + full_dist_path = f'{dist_path}/{self._source}/build/' self.assertTrue(os.path.exists(dist_path)) self.assertTrue(os.path.exists(full_dist_path)) self.assertFalse(self._are_dir_trees_equal(f'./src/{String.convert_to_snake_case(self._source)}', full_dist_path)) diff --git a/unittests/unittests_cli/cli_test_suite.py b/unittests/unittests_cli/cli_test_suite.py index f26f3f3a..65cb6355 100644 --- a/unittests/unittests_cli/cli_test_suite.py +++ b/unittests/unittests_cli/cli_test_suite.py @@ -32,8 +32,8 @@ class CLITestSuite(unittest.TestSuite): active_tests = [ # nothing needed VersionTestCase, - GenerateTestCase, NewTestCase, + GenerateTestCase, # project needed BuildTestCase, PublishTestCase, @@ -75,4 +75,4 @@ class CLITestSuite(unittest.TestSuite): def run(self, *args): self._setup() self._result = super().run(*args) - self._cleanup() + # self._cleanup() diff --git a/unittests/unittests_cli/generate_test_case.py b/unittests/unittests_cli/generate_test_case.py index 53c03839..c53f28d5 100644 --- a/unittests/unittests_cli/generate_test_case.py +++ b/unittests/unittests_cli/generate_test_case.py @@ -1,41 +1,89 @@ import os.path import unittest +from cpl_core.utils import String from unittests_cli.constants import PLAYGROUND_PATH from unittests_shared.cli_commands import CLICommands class GenerateTestCase(unittest.TestCase): + _project = 'test-console' + _t_path = 'test' - def _test_file(self, schematic: str, suffix: str): - CLICommands.generate(schematic, 'GeneratedFile') - file_path = os.path.abspath(os.path.join(PLAYGROUND_PATH, f'generated_file{suffix}.py')) + @classmethod + def setUpClass(cls): + CLICommands.new('console', cls._project, '--ab', '--s', '--venv') + + def setUp(self): + os.chdir(PLAYGROUND_PATH) + + def _test_file(self, schematic: str, suffix: str, path=None): + file = 'GeneratedFile' + expected_path = f'generated_file{suffix}.py' + if path is not None: + file = f'{path}/{file}' + expected_path = f'{path}/{expected_path}' + CLICommands.generate(schematic, file) + file_path = os.path.abspath(os.path.join(PLAYGROUND_PATH, expected_path)) file_exists = os.path.exists(file_path) self.assertTrue(file_exists) + def _test_file_with_project(self, schematic: str, suffix: str, path=None, enter=True): + file = f'GeneratedFile' + excepted_path = f'generated_file{suffix}.py' + if path is not None: + excepted_path = f'{self._project}/src/{String.convert_to_snake_case(self._project)}/{path}/generated_file_in_project{suffix}.py' + if enter: + os.chdir(path) + excepted_path = f'{path}/src/{String.convert_to_snake_case(self._project)}/generated_file_in_project{suffix}.py' + + file = f'{path}/GeneratedFileInProject' + + CLICommands.generate(schematic, file) + file_path = os.path.abspath(os.path.join(PLAYGROUND_PATH, excepted_path)) + self.assertTrue(os.path.exists(file_path)) + def test_abc(self): self._test_file('abc', '_abc') + self._test_file('abc', '_abc', path=self._t_path) + self._test_file('abc', '_abc', path=f'{self._t_path}/{self._t_path}') + self._test_file_with_project('abc', '_abc', path=self._project) + os.chdir(f'src/{String.convert_to_snake_case(self._project)}') + self._test_file_with_project('abc', '_abc', path='test', enter=False) def test_class(self): self._test_file('class', '') + self._test_file('class', '', path=self._t_path) + self._test_file_with_project('class', '', path=self._project) def test_enum(self): self._test_file('enum', '_enum') + self._test_file('enum', '_enum', path=self._t_path) + self._test_file_with_project('enum', '_enum', path=self._project) + os.chdir(f'src/{String.convert_to_snake_case(self._project)}') + self._test_file_with_project('enum', '_enum', path='test', enter=False) def test_pipe(self): self._test_file('pipe', '_pipe') + self._test_file('pipe', '_pipe', path=self._t_path) + self._test_file_with_project('pipe', '_pipe', path=self._project) def test_service(self): self._test_file('service', '_service') + self._test_file_with_project('service', '_service', path=self._project) def test_settings(self): self._test_file('settings', '_settings') + self._test_file_with_project('settings', '_settings', path=self._project) def test_test_case(self): self._test_file('test_case', '_test_case') + self._test_file_with_project('test_case', '_test_case', path=self._project) def test_thread(self): self._test_file('thread', '_thread') + self._test_file_with_project('thread', '_thread', path=self._project) def test_validator(self): self._test_file('validator', '_validator') + self._test_file_with_project('validator', '_validator', path=self._project) diff --git a/unittests/unittests_cli/publish_test_case.py b/unittests/unittests_cli/publish_test_case.py index 7c828ced..b24531c5 100644 --- a/unittests/unittests_cli/publish_test_case.py +++ b/unittests/unittests_cli/publish_test_case.py @@ -79,7 +79,7 @@ class PublishTestCase(unittest.TestCase): CLICommands.publish() dist_path = './dist' setup_path = f'{dist_path}/{self._source}/publish/setup' - full_dist_path = f'{dist_path}/{self._source}/publish/build/lib/{String.convert_to_snake_case(self._source)}' + full_dist_path = f'{dist_path}/{self._source}/publish/' self.assertTrue(os.path.exists(dist_path)) self.assertTrue(os.path.exists(setup_path)) self.assertTrue(os.path.exists(os.path.join(setup_path, f'{self._source}-0.0.0.tar.gz'))) @@ -89,4 +89,4 @@ class PublishTestCase(unittest.TestCase): with open(f'{full_dist_path}/{self._source}.json', 'w') as file: file.write(json.dumps(self._get_project_settings(), indent=2)) file.close() - self.assertTrue(self._are_dir_trees_equal(f'./src/{String.convert_to_snake_case(self._source)}', full_dist_path)) + # self.assertTrue(self._are_dir_trees_equal(f'./src/{String.convert_to_snake_case(self._source)}', full_dist_path)) diff --git a/unittests/unittests_cli/update_test_case.py b/unittests/unittests_cli/update_test_case.py index de21bf6b..3b50b38c 100644 --- a/unittests/unittests_cli/update_test_case.py +++ b/unittests/unittests_cli/update_test_case.py @@ -22,7 +22,7 @@ class UpdateTestCase(unittest.TestCase): self._old_package = f'{self._old_package_name}=={self._old_version}' # todo: better way to do shit required - self._new_version = '2.0.1' + self._new_version = '2.1.0' self._new_package_name = 'discord.py' self._new_package = f'{self._new_package_name}=={self._new_version}' -- 2.45.1 From abd03527507e462ea41965c9f5eaedd1960b5879 Mon Sep 17 00:00:00 2001 From: Sven Heidemann Date: Wed, 30 Nov 2022 19:05:11 +0100 Subject: [PATCH 2/7] Repaired build & publish #93 --- src/cpl_cli/__init__.py | 2 +- src/cpl_cli/_templates/__init__.py | 2 +- src/cpl_cli/_templates/build/__init__.py | 2 +- src/cpl_cli/_templates/generate/__init__.py | 2 +- src/cpl_cli/_templates/new/__init__.py | 2 +- src/cpl_cli/_templates/new/console/__init__.py | 2 +- src/cpl_cli/_templates/new/console/source/__init__.py | 2 +- src/cpl_cli/_templates/new/console/source/name/__init__.py | 2 +- src/cpl_cli/_templates/new/library/__init__.py | 2 +- src/cpl_cli/_templates/new/library/source/__init__.py | 2 +- src/cpl_cli/_templates/new/library/source/name/__init__.py | 2 +- src/cpl_cli/_templates/new/unittest/__init__.py | 2 +- src/cpl_cli/_templates/new/unittest/source/__init__.py | 2 +- src/cpl_cli/_templates/new/unittest/source/name/__init__.py | 2 +- src/cpl_cli/_templates/publish/__init__.py | 2 +- src/cpl_cli/command/__init__.py | 2 +- src/cpl_cli/configuration/__init__.py | 2 +- src/cpl_cli/live_server/__init__.py | 2 +- src/cpl_cli/migrations/__init__.py | 2 +- src/cpl_cli/migrations/base/__init__.py | 2 +- src/cpl_cli/migrations/service/__init__.py | 2 +- src/cpl_cli/publish/__init__.py | 2 +- src/cpl_cli/publish/publisher_service.py | 4 ++-- src/cpl_cli/source_creator/__init__.py | 2 +- src/cpl_cli/validators/__init__.py | 2 +- unittests/unittests_cli/build_test_case.py | 2 +- unittests/unittests_cli/publish_test_case.py | 4 ++-- 27 files changed, 29 insertions(+), 29 deletions(-) diff --git a/src/cpl_cli/__init__.py b/src/cpl_cli/__init__.py index c0ac06e8..13f8b234 100644 --- a/src/cpl_cli/__init__.py +++ b/src/cpl_cli/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library Command Line Interface """ -__title__ = 'cpl-cli' +__title__ = 'cpl_cli' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' diff --git a/src/cpl_cli/_templates/__init__.py b/src/cpl_cli/_templates/__init__.py index b4ebc2fe..d3712583 100644 --- a/src/cpl_cli/_templates/__init__.py +++ b/src/cpl_cli/_templates/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library Command Line Interface """ -__title__ = '_templates' +__title__ = 'cpl_cli._templates' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' diff --git a/src/cpl_cli/_templates/build/__init__.py b/src/cpl_cli/_templates/build/__init__.py index b47f7895..7f7326a5 100644 --- a/src/cpl_cli/_templates/build/__init__.py +++ b/src/cpl_cli/_templates/build/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library Command Line Interface """ -__title__ = '_templates.build' +__title__ = 'cpl_cli._templates.build' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' diff --git a/src/cpl_cli/_templates/generate/__init__.py b/src/cpl_cli/_templates/generate/__init__.py index 85fbb8fc..efb7c762 100644 --- a/src/cpl_cli/_templates/generate/__init__.py +++ b/src/cpl_cli/_templates/generate/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library Command Line Interface """ -__title__ = '_templates.generate' +__title__ = 'cpl_cli._templates.generate' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' diff --git a/src/cpl_cli/_templates/new/__init__.py b/src/cpl_cli/_templates/new/__init__.py index a1b25a8a..f6295997 100644 --- a/src/cpl_cli/_templates/new/__init__.py +++ b/src/cpl_cli/_templates/new/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library Command Line Interface """ -__title__ = '_templates.new' +__title__ = 'cpl_cli._templates.new' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' diff --git a/src/cpl_cli/_templates/new/console/__init__.py b/src/cpl_cli/_templates/new/console/__init__.py index a4d26886..72d7f848 100644 --- a/src/cpl_cli/_templates/new/console/__init__.py +++ b/src/cpl_cli/_templates/new/console/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library Command Line Interface """ -__title__ = '_templates.new.console' +__title__ = 'cpl_cli._templates.new.console' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' diff --git a/src/cpl_cli/_templates/new/console/source/__init__.py b/src/cpl_cli/_templates/new/console/source/__init__.py index ca98b380..bd4a870a 100644 --- a/src/cpl_cli/_templates/new/console/source/__init__.py +++ b/src/cpl_cli/_templates/new/console/source/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library Command Line Interface """ -__title__ = '_templates.new.console.source' +__title__ = 'cpl_cli._templates.new.console.source' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' 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 07799ad5..49720a92 100644 --- a/src/cpl_cli/_templates/new/console/source/name/__init__.py +++ b/src/cpl_cli/_templates/new/console/source/name/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library Command Line Interface """ -__title__ = '_templates.new.console.source.name' +__title__ = 'cpl_cli._templates.new.console.source.name' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' diff --git a/src/cpl_cli/_templates/new/library/__init__.py b/src/cpl_cli/_templates/new/library/__init__.py index 94c58e91..ce0a260c 100644 --- a/src/cpl_cli/_templates/new/library/__init__.py +++ b/src/cpl_cli/_templates/new/library/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library Command Line Interface """ -__title__ = '_templates.new.library' +__title__ = 'cpl_cli._templates.new.library' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' diff --git a/src/cpl_cli/_templates/new/library/source/__init__.py b/src/cpl_cli/_templates/new/library/source/__init__.py index 0cce4499..9c720806 100644 --- a/src/cpl_cli/_templates/new/library/source/__init__.py +++ b/src/cpl_cli/_templates/new/library/source/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library Command Line Interface """ -__title__ = '_templates.new.library.source' +__title__ = 'cpl_cli._templates.new.library.source' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' 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 92a0debb..0358f17b 100644 --- a/src/cpl_cli/_templates/new/library/source/name/__init__.py +++ b/src/cpl_cli/_templates/new/library/source/name/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library Command Line Interface """ -__title__ = '_templates.new.library.source.name' +__title__ = 'cpl_cli._templates.new.library.source.name' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' diff --git a/src/cpl_cli/_templates/new/unittest/__init__.py b/src/cpl_cli/_templates/new/unittest/__init__.py index f51260ef..346a3785 100644 --- a/src/cpl_cli/_templates/new/unittest/__init__.py +++ b/src/cpl_cli/_templates/new/unittest/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library Command Line Interface """ -__title__ = '_templates.new.unittest' +__title__ = 'cpl_cli._templates.new.unittest' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' diff --git a/src/cpl_cli/_templates/new/unittest/source/__init__.py b/src/cpl_cli/_templates/new/unittest/source/__init__.py index a2fb7c3d..6527f05d 100644 --- a/src/cpl_cli/_templates/new/unittest/source/__init__.py +++ b/src/cpl_cli/_templates/new/unittest/source/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library Command Line Interface """ -__title__ = '_templates.new.unittest.source' +__title__ = 'cpl_cli._templates.new.unittest.source' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' 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 274c7fb7..1d64ec9a 100644 --- a/src/cpl_cli/_templates/new/unittest/source/name/__init__.py +++ b/src/cpl_cli/_templates/new/unittest/source/name/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library Command Line Interface """ -__title__ = '_templates.new.unittest.source.name' +__title__ = 'cpl_cli._templates.new.unittest.source.name' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' diff --git a/src/cpl_cli/_templates/publish/__init__.py b/src/cpl_cli/_templates/publish/__init__.py index f55bb002..65de0113 100644 --- a/src/cpl_cli/_templates/publish/__init__.py +++ b/src/cpl_cli/_templates/publish/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library Command Line Interface """ -__title__ = '_templates.publish' +__title__ = 'cpl_cli._templates.publish' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' diff --git a/src/cpl_cli/command/__init__.py b/src/cpl_cli/command/__init__.py index f8d8e4f2..35d87879 100644 --- a/src/cpl_cli/command/__init__.py +++ b/src/cpl_cli/command/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library Command Line Interface """ -__title__ = 'command' +__title__ = 'cpl_cli.command' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' diff --git a/src/cpl_cli/configuration/__init__.py b/src/cpl_cli/configuration/__init__.py index 89471726..3b14d039 100644 --- a/src/cpl_cli/configuration/__init__.py +++ b/src/cpl_cli/configuration/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library Command Line Interface """ -__title__ = 'configuration' +__title__ = 'cpl_cli.configuration' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' diff --git a/src/cpl_cli/live_server/__init__.py b/src/cpl_cli/live_server/__init__.py index fdf9cdd8..86e9bded 100644 --- a/src/cpl_cli/live_server/__init__.py +++ b/src/cpl_cli/live_server/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library Command Line Interface """ -__title__ = 'live_server' +__title__ = 'cpl_cli.live_server' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' diff --git a/src/cpl_cli/migrations/__init__.py b/src/cpl_cli/migrations/__init__.py index 2292d1d6..196cafd0 100644 --- a/src/cpl_cli/migrations/__init__.py +++ b/src/cpl_cli/migrations/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library Command Line Interface """ -__title__ = 'migrations' +__title__ = 'cpl_cli.migrations' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' diff --git a/src/cpl_cli/migrations/base/__init__.py b/src/cpl_cli/migrations/base/__init__.py index 59143532..c9c00535 100644 --- a/src/cpl_cli/migrations/base/__init__.py +++ b/src/cpl_cli/migrations/base/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library Command Line Interface """ -__title__ = 'migrations.base' +__title__ = 'cpl_cli.migrations.base' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' diff --git a/src/cpl_cli/migrations/service/__init__.py b/src/cpl_cli/migrations/service/__init__.py index 87152def..4dc93e5a 100644 --- a/src/cpl_cli/migrations/service/__init__.py +++ b/src/cpl_cli/migrations/service/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library Command Line Interface """ -__title__ = 'migrations.service' +__title__ = 'cpl_cli.migrations.service' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' diff --git a/src/cpl_cli/publish/__init__.py b/src/cpl_cli/publish/__init__.py index 7ef12225..e02b1c63 100644 --- a/src/cpl_cli/publish/__init__.py +++ b/src/cpl_cli/publish/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library Command Line Interface """ -__title__ = 'publish' +__title__ = 'cpl_cli.publish' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' diff --git a/src/cpl_cli/publish/publisher_service.py b/src/cpl_cli/publish/publisher_service.py index 72596219..b1639023 100644 --- a/src/cpl_cli/publish/publisher_service.py +++ b/src/cpl_cli/publish/publisher_service.py @@ -433,7 +433,7 @@ class PublisherService(PublisherABC): 3. Copies all included source files to dist_path/build :return: """ - # self._env.set_working_directory(os.path.join(self._env.working_directory, '../')) # probably causing some errors (#125) + self._env.set_working_directory(os.path.join(self._env.working_directory, '../')) # probably causing some errors (#125) self.exclude(f'*/{self._project_settings.name}.json') self._output_path = os.path.abspath(os.path.join(self._output_path, self._project_settings.name, 'build')) @@ -456,7 +456,7 @@ class PublisherService(PublisherABC): 4. Remove all included source from dist_path/publish :return: """ - # self._env.set_working_directory(os.path.join(self._env.working_directory, '../')) # probably causing some errors (#125) + self._env.set_working_directory(os.path.join(self._env.working_directory, '../')) # probably causing some errors (#125) self.exclude(f'*/{self._project_settings.name}.json') self._output_path = os.path.abspath(os.path.join(self._output_path, self._project_settings.name, 'publish')) diff --git a/src/cpl_cli/source_creator/__init__.py b/src/cpl_cli/source_creator/__init__.py index 88a53b8d..edcf1ee3 100644 --- a/src/cpl_cli/source_creator/__init__.py +++ b/src/cpl_cli/source_creator/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library Command Line Interface """ -__title__ = 'source_creator' +__title__ = 'cpl_cli.source_creator' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' diff --git a/src/cpl_cli/validators/__init__.py b/src/cpl_cli/validators/__init__.py index a247d409..6e3e2300 100644 --- a/src/cpl_cli/validators/__init__.py +++ b/src/cpl_cli/validators/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library Command Line Interface """ -__title__ = 'validators' +__title__ = 'cpl_cli.validators' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' diff --git a/unittests/unittests_cli/build_test_case.py b/unittests/unittests_cli/build_test_case.py index 6594bd08..e35d5cbd 100644 --- a/unittests/unittests_cli/build_test_case.py +++ b/unittests/unittests_cli/build_test_case.py @@ -78,7 +78,7 @@ class BuildTestCase(unittest.TestCase): def test_build(self): CLICommands.build() dist_path = './dist' - full_dist_path = f'{dist_path}/{self._source}/build/' + full_dist_path = f'{dist_path}/{self._source}/build/{String.convert_to_snake_case(self._source)}' self.assertTrue(os.path.exists(dist_path)) self.assertTrue(os.path.exists(full_dist_path)) self.assertFalse(self._are_dir_trees_equal(f'./src/{String.convert_to_snake_case(self._source)}', full_dist_path)) diff --git a/unittests/unittests_cli/publish_test_case.py b/unittests/unittests_cli/publish_test_case.py index b24531c5..7c828ced 100644 --- a/unittests/unittests_cli/publish_test_case.py +++ b/unittests/unittests_cli/publish_test_case.py @@ -79,7 +79,7 @@ class PublishTestCase(unittest.TestCase): CLICommands.publish() dist_path = './dist' setup_path = f'{dist_path}/{self._source}/publish/setup' - full_dist_path = f'{dist_path}/{self._source}/publish/' + full_dist_path = f'{dist_path}/{self._source}/publish/build/lib/{String.convert_to_snake_case(self._source)}' self.assertTrue(os.path.exists(dist_path)) self.assertTrue(os.path.exists(setup_path)) self.assertTrue(os.path.exists(os.path.join(setup_path, f'{self._source}-0.0.0.tar.gz'))) @@ -89,4 +89,4 @@ class PublishTestCase(unittest.TestCase): with open(f'{full_dist_path}/{self._source}.json', 'w') as file: file.write(json.dumps(self._get_project_settings(), indent=2)) file.close() - # self.assertTrue(self._are_dir_trees_equal(f'./src/{String.convert_to_snake_case(self._source)}', full_dist_path)) + self.assertTrue(self._are_dir_trees_equal(f'./src/{String.convert_to_snake_case(self._source)}', full_dist_path)) -- 2.45.1 From 2e8be741cc498f1de5f6647903ff124bfd000633 Mon Sep 17 00:00:00 2001 From: Sven Heidemann Date: Thu, 1 Dec 2022 12:17:26 +0100 Subject: [PATCH 3/7] Repaired build & publish #93 --- src/cpl_core/__init__.py | 2 +- src/cpl_core/application/__init__.py | 2 +- src/cpl_core/configuration/__init__.py | 2 +- src/cpl_core/console/__init__.py | 2 +- src/cpl_core/database/__init__.py | 2 +- src/cpl_core/database/connection/__init__.py | 2 +- src/cpl_core/database/context/__init__.py | 2 +- src/cpl_core/dependency_injection/__init__.py | 2 +- src/cpl_core/environment/__init__.py | 2 +- src/cpl_core/logging/__init__.py | 2 +- src/cpl_core/mailing/__init__.py | 2 +- src/cpl_core/pipes/__init__.py | 2 +- src/cpl_core/time/__init__.py | 2 +- src/cpl_core/utils/__init__.py | 2 +- src/cpl_discord/__init__.py | 2 +- src/cpl_discord/application/__init__.py | 2 +- src/cpl_discord/command/__init__.py | 2 +- src/cpl_discord/configuration/__init__.py | 2 +- src/cpl_discord/container/__init__.py | 2 +- src/cpl_discord/events/__init__.py | 2 +- src/cpl_discord/helper/__init__.py | 2 +- src/cpl_discord/service/__init__.py | 2 +- src/cpl_query/__init__.py | 2 +- src/cpl_query/base/__init__.py | 2 +- src/cpl_query/enumerable/__init__.py | 2 +- src/cpl_query/extension/__init__.py | 2 +- src/cpl_query/iterable/__init__.py | 2 +- src/cpl_translation/__init__.py | 2 +- tools/set_pip_urls/__init__.py | 2 +- tools/set_version/__init__.py | 2 +- 30 files changed, 30 insertions(+), 30 deletions(-) diff --git a/src/cpl_core/__init__.py b/src/cpl_core/__init__.py index 831d4cdb..b9b5c269 100644 --- a/src/cpl_core/__init__.py +++ b/src/cpl_core/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library """ -__title__ = 'cpl-core' +__title__ = 'cpl_core' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' diff --git a/src/cpl_core/application/__init__.py b/src/cpl_core/application/__init__.py index 6c4785bb..025c205a 100644 --- a/src/cpl_core/application/__init__.py +++ b/src/cpl_core/application/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library """ -__title__ = 'application' +__title__ = 'cpl_core.application' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' diff --git a/src/cpl_core/configuration/__init__.py b/src/cpl_core/configuration/__init__.py index 3b3742eb..cef5c5dd 100644 --- a/src/cpl_core/configuration/__init__.py +++ b/src/cpl_core/configuration/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library """ -__title__ = 'configuration' +__title__ = 'cpl_core.configuration' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' diff --git a/src/cpl_core/console/__init__.py b/src/cpl_core/console/__init__.py index 41363ef7..18525b46 100644 --- a/src/cpl_core/console/__init__.py +++ b/src/cpl_core/console/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library """ -__title__ = 'console' +__title__ = 'cpl_core.console' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' diff --git a/src/cpl_core/database/__init__.py b/src/cpl_core/database/__init__.py index 2b59e2e1..c2e5b49a 100644 --- a/src/cpl_core/database/__init__.py +++ b/src/cpl_core/database/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library """ -__title__ = 'database' +__title__ = 'cpl_core.database' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' diff --git a/src/cpl_core/database/connection/__init__.py b/src/cpl_core/database/connection/__init__.py index f27d336e..c1851618 100644 --- a/src/cpl_core/database/connection/__init__.py +++ b/src/cpl_core/database/connection/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library """ -__title__ = 'database.connection' +__title__ = 'cpl_core.database.connection' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' diff --git a/src/cpl_core/database/context/__init__.py b/src/cpl_core/database/context/__init__.py index 728be14a..224ddb32 100644 --- a/src/cpl_core/database/context/__init__.py +++ b/src/cpl_core/database/context/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library """ -__title__ = 'database.context' +__title__ = 'cpl_core.database.context' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' diff --git a/src/cpl_core/dependency_injection/__init__.py b/src/cpl_core/dependency_injection/__init__.py index 4f2322e3..b35fb03e 100644 --- a/src/cpl_core/dependency_injection/__init__.py +++ b/src/cpl_core/dependency_injection/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library """ -__title__ = 'dependency_injection' +__title__ = 'cpl_core.dependency_injection' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' diff --git a/src/cpl_core/environment/__init__.py b/src/cpl_core/environment/__init__.py index 4ac8db8b..587fd780 100644 --- a/src/cpl_core/environment/__init__.py +++ b/src/cpl_core/environment/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library """ -__title__ = 'environment' +__title__ = 'cpl_core.environment' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' diff --git a/src/cpl_core/logging/__init__.py b/src/cpl_core/logging/__init__.py index 0d92764a..6afacdbe 100644 --- a/src/cpl_core/logging/__init__.py +++ b/src/cpl_core/logging/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library """ -__title__ = 'logging' +__title__ = 'cpl_core.logging' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' diff --git a/src/cpl_core/mailing/__init__.py b/src/cpl_core/mailing/__init__.py index 077fb36d..a63daf4a 100644 --- a/src/cpl_core/mailing/__init__.py +++ b/src/cpl_core/mailing/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library """ -__title__ = 'mailing' +__title__ = 'cpl_core.mailing' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' diff --git a/src/cpl_core/pipes/__init__.py b/src/cpl_core/pipes/__init__.py index 7502f6c5..6afcae2a 100644 --- a/src/cpl_core/pipes/__init__.py +++ b/src/cpl_core/pipes/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library """ -__title__ = 'pipes' +__title__ = 'cpl_core.pipes' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' diff --git a/src/cpl_core/time/__init__.py b/src/cpl_core/time/__init__.py index 55c05086..45aacf77 100644 --- a/src/cpl_core/time/__init__.py +++ b/src/cpl_core/time/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library """ -__title__ = 'time' +__title__ = 'cpl_core.time' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' diff --git a/src/cpl_core/utils/__init__.py b/src/cpl_core/utils/__init__.py index 893d5903..64179a2b 100644 --- a/src/cpl_core/utils/__init__.py +++ b/src/cpl_core/utils/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library """ -__title__ = 'utils' +__title__ = 'cpl_core.utils' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' diff --git a/src/cpl_discord/__init__.py b/src/cpl_discord/__init__.py index 9b4f67d8..9e01b9a4 100644 --- a/src/cpl_discord/__init__.py +++ b/src/cpl_discord/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library link between discord.py and CPL """ -__title__ = 'cpl-discord' +__title__ = 'cpl_discord' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2021 - 2022 sh-edraft.de' diff --git a/src/cpl_discord/application/__init__.py b/src/cpl_discord/application/__init__.py index f7cc5b3e..b513d032 100644 --- a/src/cpl_discord/application/__init__.py +++ b/src/cpl_discord/application/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library link between discord.py and CPL """ -__title__ = 'application' +__title__ = 'cpl_discord.application' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2021 - 2022 sh-edraft.de' diff --git a/src/cpl_discord/command/__init__.py b/src/cpl_discord/command/__init__.py index 15b8bd13..9ccd88da 100644 --- a/src/cpl_discord/command/__init__.py +++ b/src/cpl_discord/command/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library link between discord.py and CPL """ -__title__ = 'command' +__title__ = 'cpl_discord.command' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2021 - 2022 sh-edraft.de' diff --git a/src/cpl_discord/configuration/__init__.py b/src/cpl_discord/configuration/__init__.py index c0b7cfcd..51110c41 100644 --- a/src/cpl_discord/configuration/__init__.py +++ b/src/cpl_discord/configuration/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library link between discord.py and CPL """ -__title__ = 'configuration' +__title__ = 'cpl_discord.configuration' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2021 - 2022 sh-edraft.de' diff --git a/src/cpl_discord/container/__init__.py b/src/cpl_discord/container/__init__.py index c9d25138..009623c6 100644 --- a/src/cpl_discord/container/__init__.py +++ b/src/cpl_discord/container/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library link between discord.py and CPL """ -__title__ = 'container' +__title__ = 'cpl_discord.container' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2021 - 2022 sh-edraft.de' diff --git a/src/cpl_discord/events/__init__.py b/src/cpl_discord/events/__init__.py index 9c7f7f8c..d961d3ad 100644 --- a/src/cpl_discord/events/__init__.py +++ b/src/cpl_discord/events/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library link between discord.py and CPL """ -__title__ = 'events' +__title__ = 'cpl_discord.events' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2021 - 2022 sh-edraft.de' diff --git a/src/cpl_discord/helper/__init__.py b/src/cpl_discord/helper/__init__.py index db6a6d9c..5eb30f53 100644 --- a/src/cpl_discord/helper/__init__.py +++ b/src/cpl_discord/helper/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library link between discord.py and CPL """ -__title__ = 'helper' +__title__ = 'cpl_discord.helper' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2021 - 2022 sh-edraft.de' diff --git a/src/cpl_discord/service/__init__.py b/src/cpl_discord/service/__init__.py index 5756e668..4223e0f8 100644 --- a/src/cpl_discord/service/__init__.py +++ b/src/cpl_discord/service/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library link between discord.py and CPL """ -__title__ = 'service' +__title__ = 'cpl_discord.service' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2021 - 2022 sh-edraft.de' diff --git a/src/cpl_query/__init__.py b/src/cpl_query/__init__.py index 2e2559f6..86fe8082 100644 --- a/src/cpl_query/__init__.py +++ b/src/cpl_query/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library Python integrated Queries """ -__title__ = 'cpl-query' +__title__ = 'cpl_query' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2021 - 2022 sh-edraft.de' diff --git a/src/cpl_query/base/__init__.py b/src/cpl_query/base/__init__.py index 23c921da..ab831d0a 100644 --- a/src/cpl_query/base/__init__.py +++ b/src/cpl_query/base/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library Python integrated Queries """ -__title__ = 'base' +__title__ = 'cpl_query.base' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2021 - 2022 sh-edraft.de' diff --git a/src/cpl_query/enumerable/__init__.py b/src/cpl_query/enumerable/__init__.py index 14d10619..9bd1147e 100644 --- a/src/cpl_query/enumerable/__init__.py +++ b/src/cpl_query/enumerable/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library Python integrated Queries """ -__title__ = 'enumerable' +__title__ = 'cpl_query.enumerable' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2021 - 2022 sh-edraft.de' diff --git a/src/cpl_query/extension/__init__.py b/src/cpl_query/extension/__init__.py index 54cdcac2..c47d1d20 100644 --- a/src/cpl_query/extension/__init__.py +++ b/src/cpl_query/extension/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library Python integrated Queries """ -__title__ = 'extension' +__title__ = 'cpl_query.extension' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2021 - 2022 sh-edraft.de' diff --git a/src/cpl_query/iterable/__init__.py b/src/cpl_query/iterable/__init__.py index 45cde067..d129a1c1 100644 --- a/src/cpl_query/iterable/__init__.py +++ b/src/cpl_query/iterable/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library Python integrated Queries """ -__title__ = 'iterable' +__title__ = 'cpl_query.iterable' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2021 - 2022 sh-edraft.de' diff --git a/src/cpl_translation/__init__.py b/src/cpl_translation/__init__.py index 2c3eedb0..d789a358 100644 --- a/src/cpl_translation/__init__.py +++ b/src/cpl_translation/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library Python Translation """ -__title__ = 'cpl-translation' +__title__ = 'cpl_translation' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2022 sh-edraft.de' diff --git a/tools/set_pip_urls/__init__.py b/tools/set_pip_urls/__init__.py index 290901d9..293c4a42 100644 --- a/tools/set_pip_urls/__init__.py +++ b/tools/set_pip_urls/__init__.py @@ -11,7 +11,7 @@ CPL internal tool to set pip URL for CLI by environment """ -__title__ = 'set-pip-urls' +__title__ = 'set_pip_urls' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2022 sh-edraft.de' diff --git a/tools/set_version/__init__.py b/tools/set_version/__init__.py index 47ab1c7b..ef7b39f6 100644 --- a/tools/set_version/__init__.py +++ b/tools/set_version/__init__.py @@ -11,7 +11,7 @@ CPL internal tool to set version from branch name """ -__title__ = 'set-version' +__title__ = 'set_version' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2022 sh-edraft.de' -- 2.45.1 From 1bbec27d1af3570fef29e48a62aa00882f75ad7c Mon Sep 17 00:00:00 2001 From: Sven Heidemann Date: Wed, 30 Nov 2022 18:04:40 +0100 Subject: [PATCH 4/7] Fixed cpl g path problems & package names #93 --- cpl-workspace.json | 10 +++- src/cpl_cli/__init__.py | 2 +- src/cpl_cli/_templates/__init__.py | 2 +- src/cpl_cli/_templates/build/__init__.py | 2 +- src/cpl_cli/_templates/generate/__init__.py | 2 +- src/cpl_cli/_templates/new/__init__.py | 2 +- .../_templates/new/console/__init__.py | 2 +- .../_templates/new/console/source/__init__.py | 2 +- .../new/console/source/name/__init__.py | 2 +- .../_templates/new/library/__init__.py | 2 +- .../_templates/new/library/source/__init__.py | 2 +- .../new/library/source/name/__init__.py | 2 +- .../_templates/new/unittest/__init__.py | 2 +- .../new/unittest/source/__init__.py | 2 +- .../new/unittest/source/name/__init__.py | 2 +- src/cpl_cli/_templates/publish/__init__.py | 2 +- src/cpl_cli/command/__init__.py | 2 +- src/cpl_cli/command/generate_service.py | 55 +++++++++++-------- src/cpl_cli/configuration/__init__.py | 2 +- src/cpl_cli/live_server/__init__.py | 2 +- src/cpl_cli/migrations/__init__.py | 2 +- src/cpl_cli/migrations/base/__init__.py | 2 +- src/cpl_cli/migrations/service/__init__.py | 2 +- src/cpl_cli/publish/__init__.py | 2 +- src/cpl_cli/source_creator/__init__.py | 2 +- src/cpl_cli/validators/__init__.py | 2 +- src/cpl_core/__init__.py | 2 +- src/cpl_core/application/__init__.py | 2 +- src/cpl_core/configuration/__init__.py | 2 +- src/cpl_core/console/__init__.py | 2 +- src/cpl_core/database/__init__.py | 2 +- src/cpl_core/database/connection/__init__.py | 2 +- src/cpl_core/database/context/__init__.py | 2 +- src/cpl_core/dependency_injection/__init__.py | 2 +- src/cpl_core/environment/__init__.py | 2 +- src/cpl_core/logging/__init__.py | 2 +- src/cpl_core/mailing/__init__.py | 2 +- src/cpl_core/pipes/__init__.py | 2 +- src/cpl_core/time/__init__.py | 2 +- src/cpl_core/utils/__init__.py | 2 +- src/cpl_discord/__init__.py | 2 +- src/cpl_discord/application/__init__.py | 2 +- src/cpl_discord/command/__init__.py | 2 +- src/cpl_discord/configuration/__init__.py | 2 +- src/cpl_discord/container/__init__.py | 2 +- src/cpl_discord/events/__init__.py | 2 +- src/cpl_discord/helper/__init__.py | 2 +- src/cpl_discord/service/__init__.py | 2 +- src/cpl_query/__init__.py | 2 +- src/cpl_query/base/__init__.py | 2 +- src/cpl_query/enumerable/__init__.py | 2 +- src/cpl_query/extension/__init__.py | 2 +- src/cpl_query/iterable/__init__.py | 2 +- src/cpl_translation/__init__.py | 2 +- tools/set_pip_urls/__init__.py | 2 +- tools/set_version/__init__.py | 2 +- unittests/unittests_cli/build_test_case.py | 2 +- unittests/unittests_cli/cli_test_suite.py | 4 +- unittests/unittests_cli/generate_test_case.py | 54 +++++++++++++++++- unittests/unittests_cli/publish_test_case.py | 4 +- unittests/unittests_cli/update_test_case.py | 2 +- 61 files changed, 153 insertions(+), 86 deletions(-) diff --git a/cpl-workspace.json b/cpl-workspace.json index d07c8cae..081ff298 100644 --- a/cpl-workspace.json +++ b/cpl-workspace.json @@ -131,7 +131,15 @@ "di-cli": "pip install cpl-cli --pre --upgrade --extra-index-url https://pip-dev.sh-edraft.de", "di-discord": "pip install cpl-discord --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" + "di-translation": "pip install cpl-translation --pre --upgrade --extra-index-url https://pip-dev.sh-edraft.de", + + "prod-install": "cpl pi-core; cpl pi-cli; cpl pi-query; cpl pi-translation;", + "pi": "cpl prod-install", + "pi-core": "pip install cpl-core --pre --upgrade --extra-index-url https://pip.sh-edraft.de", + "pi-cli": "pip install cpl-cli --pre --upgrade --extra-index-url https://pip.sh-edraft.de", + "pi-discord": "pip install cpl-discord --pre --upgrade --extra-index-url https://pip.sh-edraft.de", + "pi-query": "pip install cpl-query --pre --upgrade --extra-index-url https://pip.sh-edraft.de", + "pi-translation": "pip install cpl-translation --pre --upgrade --extra-index-url https://pip.sh-edraft.de" } } } \ No newline at end of file diff --git a/src/cpl_cli/__init__.py b/src/cpl_cli/__init__.py index cacc83ee..227afbda 100644 --- a/src/cpl_cli/__init__.py +++ b/src/cpl_cli/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library Command Line Interface """ -__title__ = 'cpl_cli' +__title__ = 'cpl-cli' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' diff --git a/src/cpl_cli/_templates/__init__.py b/src/cpl_cli/_templates/__init__.py index c46a6fd5..1742ddf9 100644 --- a/src/cpl_cli/_templates/__init__.py +++ b/src/cpl_cli/_templates/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library Command Line Interface """ -__title__ = 'cpl_cli._templates' +__title__ = '_templates' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' diff --git a/src/cpl_cli/_templates/build/__init__.py b/src/cpl_cli/_templates/build/__init__.py index 21ad75d9..17140905 100644 --- a/src/cpl_cli/_templates/build/__init__.py +++ b/src/cpl_cli/_templates/build/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library Command Line Interface """ -__title__ = 'cpl_cli._templates.build' +__title__ = '_templates.build' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' diff --git a/src/cpl_cli/_templates/generate/__init__.py b/src/cpl_cli/_templates/generate/__init__.py index 84b734d1..25d1efa5 100644 --- a/src/cpl_cli/_templates/generate/__init__.py +++ b/src/cpl_cli/_templates/generate/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library Command Line Interface """ -__title__ = 'cpl_cli._templates.generate' +__title__ = '_templates.generate' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' diff --git a/src/cpl_cli/_templates/new/__init__.py b/src/cpl_cli/_templates/new/__init__.py index db2618ea..b06174cb 100644 --- a/src/cpl_cli/_templates/new/__init__.py +++ b/src/cpl_cli/_templates/new/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library Command Line Interface """ -__title__ = 'cpl_cli._templates.new' +__title__ = '_templates.new' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' diff --git a/src/cpl_cli/_templates/new/console/__init__.py b/src/cpl_cli/_templates/new/console/__init__.py index 6c1afdc0..1f8490fd 100644 --- a/src/cpl_cli/_templates/new/console/__init__.py +++ b/src/cpl_cli/_templates/new/console/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library Command Line Interface """ -__title__ = 'cpl_cli._templates.new.console' +__title__ = '_templates.new.console' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' diff --git a/src/cpl_cli/_templates/new/console/source/__init__.py b/src/cpl_cli/_templates/new/console/source/__init__.py index 78bef3d1..21378df3 100644 --- a/src/cpl_cli/_templates/new/console/source/__init__.py +++ b/src/cpl_cli/_templates/new/console/source/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library Command Line Interface """ -__title__ = 'cpl_cli._templates.new.console.source' +__title__ = '_templates.new.console.source' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' 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 3fbf8c29..b892426a 100644 --- a/src/cpl_cli/_templates/new/console/source/name/__init__.py +++ b/src/cpl_cli/_templates/new/console/source/name/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library Command Line Interface """ -__title__ = 'cpl_cli._templates.new.console.source.name' +__title__ = '_templates.new.console.source.name' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' diff --git a/src/cpl_cli/_templates/new/library/__init__.py b/src/cpl_cli/_templates/new/library/__init__.py index 24146cb0..d585cb0b 100644 --- a/src/cpl_cli/_templates/new/library/__init__.py +++ b/src/cpl_cli/_templates/new/library/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library Command Line Interface """ -__title__ = 'cpl_cli._templates.new.library' +__title__ = '_templates.new.library' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' diff --git a/src/cpl_cli/_templates/new/library/source/__init__.py b/src/cpl_cli/_templates/new/library/source/__init__.py index 6f010ead..7c8b2755 100644 --- a/src/cpl_cli/_templates/new/library/source/__init__.py +++ b/src/cpl_cli/_templates/new/library/source/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library Command Line Interface """ -__title__ = 'cpl_cli._templates.new.library.source' +__title__ = '_templates.new.library.source' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' 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 30965706..bf9076ae 100644 --- a/src/cpl_cli/_templates/new/library/source/name/__init__.py +++ b/src/cpl_cli/_templates/new/library/source/name/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library Command Line Interface """ -__title__ = 'cpl_cli._templates.new.library.source.name' +__title__ = '_templates.new.library.source.name' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' diff --git a/src/cpl_cli/_templates/new/unittest/__init__.py b/src/cpl_cli/_templates/new/unittest/__init__.py index bfb4c039..58469b8b 100644 --- a/src/cpl_cli/_templates/new/unittest/__init__.py +++ b/src/cpl_cli/_templates/new/unittest/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library Command Line Interface """ -__title__ = 'cpl_cli._templates.new.unittest' +__title__ = '_templates.new.unittest' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' diff --git a/src/cpl_cli/_templates/new/unittest/source/__init__.py b/src/cpl_cli/_templates/new/unittest/source/__init__.py index 324cfbf6..51f76f0e 100644 --- a/src/cpl_cli/_templates/new/unittest/source/__init__.py +++ b/src/cpl_cli/_templates/new/unittest/source/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library Command Line Interface """ -__title__ = 'cpl_cli._templates.new.unittest.source' +__title__ = '_templates.new.unittest.source' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' 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 ed6c3518..7bf46294 100644 --- a/src/cpl_cli/_templates/new/unittest/source/name/__init__.py +++ b/src/cpl_cli/_templates/new/unittest/source/name/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library Command Line Interface """ -__title__ = 'cpl_cli._templates.new.unittest.source.name' +__title__ = '_templates.new.unittest.source.name' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' diff --git a/src/cpl_cli/_templates/publish/__init__.py b/src/cpl_cli/_templates/publish/__init__.py index 0b0c9ee4..5258b787 100644 --- a/src/cpl_cli/_templates/publish/__init__.py +++ b/src/cpl_cli/_templates/publish/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library Command Line Interface """ -__title__ = 'cpl_cli._templates.publish' +__title__ = '_templates.publish' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' diff --git a/src/cpl_cli/command/__init__.py b/src/cpl_cli/command/__init__.py index 350b8f8d..f54559ac 100644 --- a/src/cpl_cli/command/__init__.py +++ b/src/cpl_cli/command/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library Command Line Interface """ -__title__ = 'cpl_cli.command' +__title__ = 'command' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' diff --git a/src/cpl_cli/command/generate_service.py b/src/cpl_cli/command/generate_service.py index 18b9505c..12236c83 100644 --- a/src/cpl_cli/command/generate_service.py +++ b/src/cpl_cli/command/generate_service.py @@ -14,6 +14,7 @@ from cpl_cli._templates.generate.thread_template import ThreadTemplate from cpl_cli._templates.generate.validator_template import ValidatorTemplate from cpl_cli._templates.template_file_abc import TemplateFileABC from cpl_cli.command_abc import CommandABC +from cpl_cli.configuration import WorkspaceSettings from cpl_core.configuration.configuration_abc import ConfigurationABC from cpl_core.console.console import Console from cpl_core.console.foreground_color_enum import ForegroundColorEnum @@ -22,13 +23,20 @@ from cpl_core.utils.string import String class GenerateService(CommandABC): - def __init__(self, configuration: ConfigurationABC): + def __init__( + self, + configuration: ConfigurationABC, + workspace: WorkspaceSettings, + ): """ Service for the CLI command generate :param configuration: """ CommandABC.__init__(self) + self._config = configuration + self._workspace = workspace + self._schematics = { "abc": { "Upper": "ABC", @@ -129,27 +137,7 @@ class GenerateService(CommandABC): template.write(value) template.close() - def _generate(self, schematic: str, name: str, template: TemplateFileABC): - """ - Generates files by given schematic, name and template - :param schematic: - :param name: - :param template: - :return: - """ - class_name = name - rel_path = '' - if '/' in name: - parts = name.split('/') - rel_path = '/'.join(parts[:-1]) - class_name = parts[len(parts) - 1] - - if 'src' not in rel_path and not os.path.exists(os.path.join(self._env.working_directory, rel_path)): - rel_path = f'src/{rel_path}' - - template = template(class_name, schematic, self._schematics[schematic]["Upper"], rel_path) - - file_path = os.path.join(self._env.working_directory, template.path, template.name) + def _create_init_files(self, file_path: str, template: TemplateFileABC, class_name: str, schematic: str, rel_path: str): if not os.path.isdir(os.path.dirname(file_path)): os.makedirs(os.path.dirname(file_path)) directory = '' @@ -171,6 +159,29 @@ class GenerateService(CommandABC): spinner_foreground_color=ForegroundColorEnum.cyan ) + def _generate(self, schematic: str, name: str, template: TemplateFileABC): + """ + Generates files by given schematic, name and template + :param schematic: + :param name: + :param template: + :return: + """ + class_name = name + rel_path = '' + if '/' in name: + parts = name.split('/') + rel_path = '/'.join(parts[:-1]) + class_name = parts[len(parts) - 1] + + if self._workspace is not None and parts[0] in self._workspace.projects: + rel_path = os.path.dirname(self._workspace.projects[parts[0]]) + + template = template(class_name, schematic, self._schematics[schematic]["Upper"], rel_path) + + file_path = os.path.join(self._env.working_directory, template.path, template.name) + self._create_init_files(file_path, template, class_name, schematic, rel_path) + if os.path.isfile(file_path): Console.error(f'{String.first_to_upper(schematic)} already exists!\n') sys.exit() diff --git a/src/cpl_cli/configuration/__init__.py b/src/cpl_cli/configuration/__init__.py index d175531d..104a3809 100644 --- a/src/cpl_cli/configuration/__init__.py +++ b/src/cpl_cli/configuration/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library Command Line Interface """ -__title__ = 'cpl_cli.configuration' +__title__ = 'configuration' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' diff --git a/src/cpl_cli/live_server/__init__.py b/src/cpl_cli/live_server/__init__.py index 8f6d1272..d7af8e7c 100644 --- a/src/cpl_cli/live_server/__init__.py +++ b/src/cpl_cli/live_server/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library Command Line Interface """ -__title__ = 'cpl_cli.live_server' +__title__ = 'live_server' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' diff --git a/src/cpl_cli/migrations/__init__.py b/src/cpl_cli/migrations/__init__.py index 63cd6250..d9aa0412 100644 --- a/src/cpl_cli/migrations/__init__.py +++ b/src/cpl_cli/migrations/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library Command Line Interface """ -__title__ = 'cpl_cli.migrations' +__title__ = 'migrations' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' diff --git a/src/cpl_cli/migrations/base/__init__.py b/src/cpl_cli/migrations/base/__init__.py index c69bac92..19179a2c 100644 --- a/src/cpl_cli/migrations/base/__init__.py +++ b/src/cpl_cli/migrations/base/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library Command Line Interface """ -__title__ = 'cpl_cli.migrations.base' +__title__ = 'migrations.base' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' diff --git a/src/cpl_cli/migrations/service/__init__.py b/src/cpl_cli/migrations/service/__init__.py index 92ffaa26..9cb4d5ff 100644 --- a/src/cpl_cli/migrations/service/__init__.py +++ b/src/cpl_cli/migrations/service/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library Command Line Interface """ -__title__ = 'cpl_cli.migrations.service' +__title__ = 'migrations.service' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' diff --git a/src/cpl_cli/publish/__init__.py b/src/cpl_cli/publish/__init__.py index 4cc2e9aa..736a41fb 100644 --- a/src/cpl_cli/publish/__init__.py +++ b/src/cpl_cli/publish/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library Command Line Interface """ -__title__ = 'cpl_cli.publish' +__title__ = 'publish' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' diff --git a/src/cpl_cli/source_creator/__init__.py b/src/cpl_cli/source_creator/__init__.py index af5e211e..fd32c0c0 100644 --- a/src/cpl_cli/source_creator/__init__.py +++ b/src/cpl_cli/source_creator/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library Command Line Interface """ -__title__ = 'cpl_cli.source_creator' +__title__ = 'source_creator' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' diff --git a/src/cpl_cli/validators/__init__.py b/src/cpl_cli/validators/__init__.py index b3cf1671..13642c80 100644 --- a/src/cpl_cli/validators/__init__.py +++ b/src/cpl_cli/validators/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library Command Line Interface """ -__title__ = 'cpl_cli.validators' +__title__ = 'validators' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' diff --git a/src/cpl_core/__init__.py b/src/cpl_core/__init__.py index b9b5c269..831d4cdb 100644 --- a/src/cpl_core/__init__.py +++ b/src/cpl_core/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library """ -__title__ = 'cpl_core' +__title__ = 'cpl-core' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' diff --git a/src/cpl_core/application/__init__.py b/src/cpl_core/application/__init__.py index 025c205a..6c4785bb 100644 --- a/src/cpl_core/application/__init__.py +++ b/src/cpl_core/application/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library """ -__title__ = 'cpl_core.application' +__title__ = 'application' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' diff --git a/src/cpl_core/configuration/__init__.py b/src/cpl_core/configuration/__init__.py index cef5c5dd..3b3742eb 100644 --- a/src/cpl_core/configuration/__init__.py +++ b/src/cpl_core/configuration/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library """ -__title__ = 'cpl_core.configuration' +__title__ = 'configuration' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' diff --git a/src/cpl_core/console/__init__.py b/src/cpl_core/console/__init__.py index 18525b46..41363ef7 100644 --- a/src/cpl_core/console/__init__.py +++ b/src/cpl_core/console/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library """ -__title__ = 'cpl_core.console' +__title__ = 'console' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' diff --git a/src/cpl_core/database/__init__.py b/src/cpl_core/database/__init__.py index c2e5b49a..2b59e2e1 100644 --- a/src/cpl_core/database/__init__.py +++ b/src/cpl_core/database/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library """ -__title__ = 'cpl_core.database' +__title__ = 'database' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' diff --git a/src/cpl_core/database/connection/__init__.py b/src/cpl_core/database/connection/__init__.py index c1851618..f27d336e 100644 --- a/src/cpl_core/database/connection/__init__.py +++ b/src/cpl_core/database/connection/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library """ -__title__ = 'cpl_core.database.connection' +__title__ = 'database.connection' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' diff --git a/src/cpl_core/database/context/__init__.py b/src/cpl_core/database/context/__init__.py index 224ddb32..728be14a 100644 --- a/src/cpl_core/database/context/__init__.py +++ b/src/cpl_core/database/context/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library """ -__title__ = 'cpl_core.database.context' +__title__ = 'database.context' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' diff --git a/src/cpl_core/dependency_injection/__init__.py b/src/cpl_core/dependency_injection/__init__.py index b35fb03e..4f2322e3 100644 --- a/src/cpl_core/dependency_injection/__init__.py +++ b/src/cpl_core/dependency_injection/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library """ -__title__ = 'cpl_core.dependency_injection' +__title__ = 'dependency_injection' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' diff --git a/src/cpl_core/environment/__init__.py b/src/cpl_core/environment/__init__.py index 587fd780..4ac8db8b 100644 --- a/src/cpl_core/environment/__init__.py +++ b/src/cpl_core/environment/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library """ -__title__ = 'cpl_core.environment' +__title__ = 'environment' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' diff --git a/src/cpl_core/logging/__init__.py b/src/cpl_core/logging/__init__.py index 6afacdbe..0d92764a 100644 --- a/src/cpl_core/logging/__init__.py +++ b/src/cpl_core/logging/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library """ -__title__ = 'cpl_core.logging' +__title__ = 'logging' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' diff --git a/src/cpl_core/mailing/__init__.py b/src/cpl_core/mailing/__init__.py index a63daf4a..077fb36d 100644 --- a/src/cpl_core/mailing/__init__.py +++ b/src/cpl_core/mailing/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library """ -__title__ = 'cpl_core.mailing' +__title__ = 'mailing' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' diff --git a/src/cpl_core/pipes/__init__.py b/src/cpl_core/pipes/__init__.py index 6afcae2a..7502f6c5 100644 --- a/src/cpl_core/pipes/__init__.py +++ b/src/cpl_core/pipes/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library """ -__title__ = 'cpl_core.pipes' +__title__ = 'pipes' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' diff --git a/src/cpl_core/time/__init__.py b/src/cpl_core/time/__init__.py index 45aacf77..55c05086 100644 --- a/src/cpl_core/time/__init__.py +++ b/src/cpl_core/time/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library """ -__title__ = 'cpl_core.time' +__title__ = 'time' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' diff --git a/src/cpl_core/utils/__init__.py b/src/cpl_core/utils/__init__.py index 64179a2b..893d5903 100644 --- a/src/cpl_core/utils/__init__.py +++ b/src/cpl_core/utils/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library """ -__title__ = 'cpl_core.utils' +__title__ = 'utils' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' diff --git a/src/cpl_discord/__init__.py b/src/cpl_discord/__init__.py index 9e01b9a4..9b4f67d8 100644 --- a/src/cpl_discord/__init__.py +++ b/src/cpl_discord/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library link between discord.py and CPL """ -__title__ = 'cpl_discord' +__title__ = 'cpl-discord' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2021 - 2022 sh-edraft.de' diff --git a/src/cpl_discord/application/__init__.py b/src/cpl_discord/application/__init__.py index b513d032..f7cc5b3e 100644 --- a/src/cpl_discord/application/__init__.py +++ b/src/cpl_discord/application/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library link between discord.py and CPL """ -__title__ = 'cpl_discord.application' +__title__ = 'application' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2021 - 2022 sh-edraft.de' diff --git a/src/cpl_discord/command/__init__.py b/src/cpl_discord/command/__init__.py index 9ccd88da..15b8bd13 100644 --- a/src/cpl_discord/command/__init__.py +++ b/src/cpl_discord/command/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library link between discord.py and CPL """ -__title__ = 'cpl_discord.command' +__title__ = 'command' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2021 - 2022 sh-edraft.de' diff --git a/src/cpl_discord/configuration/__init__.py b/src/cpl_discord/configuration/__init__.py index 51110c41..c0b7cfcd 100644 --- a/src/cpl_discord/configuration/__init__.py +++ b/src/cpl_discord/configuration/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library link between discord.py and CPL """ -__title__ = 'cpl_discord.configuration' +__title__ = 'configuration' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2021 - 2022 sh-edraft.de' diff --git a/src/cpl_discord/container/__init__.py b/src/cpl_discord/container/__init__.py index 009623c6..c9d25138 100644 --- a/src/cpl_discord/container/__init__.py +++ b/src/cpl_discord/container/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library link between discord.py and CPL """ -__title__ = 'cpl_discord.container' +__title__ = 'container' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2021 - 2022 sh-edraft.de' diff --git a/src/cpl_discord/events/__init__.py b/src/cpl_discord/events/__init__.py index d961d3ad..9c7f7f8c 100644 --- a/src/cpl_discord/events/__init__.py +++ b/src/cpl_discord/events/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library link between discord.py and CPL """ -__title__ = 'cpl_discord.events' +__title__ = 'events' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2021 - 2022 sh-edraft.de' diff --git a/src/cpl_discord/helper/__init__.py b/src/cpl_discord/helper/__init__.py index 5eb30f53..db6a6d9c 100644 --- a/src/cpl_discord/helper/__init__.py +++ b/src/cpl_discord/helper/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library link between discord.py and CPL """ -__title__ = 'cpl_discord.helper' +__title__ = 'helper' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2021 - 2022 sh-edraft.de' diff --git a/src/cpl_discord/service/__init__.py b/src/cpl_discord/service/__init__.py index 4223e0f8..5756e668 100644 --- a/src/cpl_discord/service/__init__.py +++ b/src/cpl_discord/service/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library link between discord.py and CPL """ -__title__ = 'cpl_discord.service' +__title__ = 'service' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2021 - 2022 sh-edraft.de' diff --git a/src/cpl_query/__init__.py b/src/cpl_query/__init__.py index 86fe8082..2e2559f6 100644 --- a/src/cpl_query/__init__.py +++ b/src/cpl_query/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library Python integrated Queries """ -__title__ = 'cpl_query' +__title__ = 'cpl-query' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2021 - 2022 sh-edraft.de' diff --git a/src/cpl_query/base/__init__.py b/src/cpl_query/base/__init__.py index ab831d0a..23c921da 100644 --- a/src/cpl_query/base/__init__.py +++ b/src/cpl_query/base/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library Python integrated Queries """ -__title__ = 'cpl_query.base' +__title__ = 'base' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2021 - 2022 sh-edraft.de' diff --git a/src/cpl_query/enumerable/__init__.py b/src/cpl_query/enumerable/__init__.py index 9bd1147e..14d10619 100644 --- a/src/cpl_query/enumerable/__init__.py +++ b/src/cpl_query/enumerable/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library Python integrated Queries """ -__title__ = 'cpl_query.enumerable' +__title__ = 'enumerable' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2021 - 2022 sh-edraft.de' diff --git a/src/cpl_query/extension/__init__.py b/src/cpl_query/extension/__init__.py index c47d1d20..54cdcac2 100644 --- a/src/cpl_query/extension/__init__.py +++ b/src/cpl_query/extension/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library Python integrated Queries """ -__title__ = 'cpl_query.extension' +__title__ = 'extension' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2021 - 2022 sh-edraft.de' diff --git a/src/cpl_query/iterable/__init__.py b/src/cpl_query/iterable/__init__.py index d129a1c1..45cde067 100644 --- a/src/cpl_query/iterable/__init__.py +++ b/src/cpl_query/iterable/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library Python integrated Queries """ -__title__ = 'cpl_query.iterable' +__title__ = 'iterable' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2021 - 2022 sh-edraft.de' diff --git a/src/cpl_translation/__init__.py b/src/cpl_translation/__init__.py index d789a358..2c3eedb0 100644 --- a/src/cpl_translation/__init__.py +++ b/src/cpl_translation/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library Python Translation """ -__title__ = 'cpl_translation' +__title__ = 'cpl-translation' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2022 sh-edraft.de' diff --git a/tools/set_pip_urls/__init__.py b/tools/set_pip_urls/__init__.py index 293c4a42..290901d9 100644 --- a/tools/set_pip_urls/__init__.py +++ b/tools/set_pip_urls/__init__.py @@ -11,7 +11,7 @@ CPL internal tool to set pip URL for CLI by environment """ -__title__ = 'set_pip_urls' +__title__ = 'set-pip-urls' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2022 sh-edraft.de' diff --git a/tools/set_version/__init__.py b/tools/set_version/__init__.py index ef7b39f6..47ab1c7b 100644 --- a/tools/set_version/__init__.py +++ b/tools/set_version/__init__.py @@ -11,7 +11,7 @@ CPL internal tool to set version from branch name """ -__title__ = 'set_version' +__title__ = 'set-version' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2022 sh-edraft.de' diff --git a/unittests/unittests_cli/build_test_case.py b/unittests/unittests_cli/build_test_case.py index e35d5cbd..6594bd08 100644 --- a/unittests/unittests_cli/build_test_case.py +++ b/unittests/unittests_cli/build_test_case.py @@ -78,7 +78,7 @@ class BuildTestCase(unittest.TestCase): def test_build(self): CLICommands.build() dist_path = './dist' - full_dist_path = f'{dist_path}/{self._source}/build/{String.convert_to_snake_case(self._source)}' + full_dist_path = f'{dist_path}/{self._source}/build/' self.assertTrue(os.path.exists(dist_path)) self.assertTrue(os.path.exists(full_dist_path)) self.assertFalse(self._are_dir_trees_equal(f'./src/{String.convert_to_snake_case(self._source)}', full_dist_path)) diff --git a/unittests/unittests_cli/cli_test_suite.py b/unittests/unittests_cli/cli_test_suite.py index f26f3f3a..65cb6355 100644 --- a/unittests/unittests_cli/cli_test_suite.py +++ b/unittests/unittests_cli/cli_test_suite.py @@ -32,8 +32,8 @@ class CLITestSuite(unittest.TestSuite): active_tests = [ # nothing needed VersionTestCase, - GenerateTestCase, NewTestCase, + GenerateTestCase, # project needed BuildTestCase, PublishTestCase, @@ -75,4 +75,4 @@ class CLITestSuite(unittest.TestSuite): def run(self, *args): self._setup() self._result = super().run(*args) - self._cleanup() + # self._cleanup() diff --git a/unittests/unittests_cli/generate_test_case.py b/unittests/unittests_cli/generate_test_case.py index 53c03839..c53f28d5 100644 --- a/unittests/unittests_cli/generate_test_case.py +++ b/unittests/unittests_cli/generate_test_case.py @@ -1,41 +1,89 @@ import os.path import unittest +from cpl_core.utils import String from unittests_cli.constants import PLAYGROUND_PATH from unittests_shared.cli_commands import CLICommands class GenerateTestCase(unittest.TestCase): + _project = 'test-console' + _t_path = 'test' - def _test_file(self, schematic: str, suffix: str): - CLICommands.generate(schematic, 'GeneratedFile') - file_path = os.path.abspath(os.path.join(PLAYGROUND_PATH, f'generated_file{suffix}.py')) + @classmethod + def setUpClass(cls): + CLICommands.new('console', cls._project, '--ab', '--s', '--venv') + + def setUp(self): + os.chdir(PLAYGROUND_PATH) + + def _test_file(self, schematic: str, suffix: str, path=None): + file = 'GeneratedFile' + expected_path = f'generated_file{suffix}.py' + if path is not None: + file = f'{path}/{file}' + expected_path = f'{path}/{expected_path}' + CLICommands.generate(schematic, file) + file_path = os.path.abspath(os.path.join(PLAYGROUND_PATH, expected_path)) file_exists = os.path.exists(file_path) self.assertTrue(file_exists) + def _test_file_with_project(self, schematic: str, suffix: str, path=None, enter=True): + file = f'GeneratedFile' + excepted_path = f'generated_file{suffix}.py' + if path is not None: + excepted_path = f'{self._project}/src/{String.convert_to_snake_case(self._project)}/{path}/generated_file_in_project{suffix}.py' + if enter: + os.chdir(path) + excepted_path = f'{path}/src/{String.convert_to_snake_case(self._project)}/generated_file_in_project{suffix}.py' + + file = f'{path}/GeneratedFileInProject' + + CLICommands.generate(schematic, file) + file_path = os.path.abspath(os.path.join(PLAYGROUND_PATH, excepted_path)) + self.assertTrue(os.path.exists(file_path)) + def test_abc(self): self._test_file('abc', '_abc') + self._test_file('abc', '_abc', path=self._t_path) + self._test_file('abc', '_abc', path=f'{self._t_path}/{self._t_path}') + self._test_file_with_project('abc', '_abc', path=self._project) + os.chdir(f'src/{String.convert_to_snake_case(self._project)}') + self._test_file_with_project('abc', '_abc', path='test', enter=False) def test_class(self): self._test_file('class', '') + self._test_file('class', '', path=self._t_path) + self._test_file_with_project('class', '', path=self._project) def test_enum(self): self._test_file('enum', '_enum') + self._test_file('enum', '_enum', path=self._t_path) + self._test_file_with_project('enum', '_enum', path=self._project) + os.chdir(f'src/{String.convert_to_snake_case(self._project)}') + self._test_file_with_project('enum', '_enum', path='test', enter=False) def test_pipe(self): self._test_file('pipe', '_pipe') + self._test_file('pipe', '_pipe', path=self._t_path) + self._test_file_with_project('pipe', '_pipe', path=self._project) def test_service(self): self._test_file('service', '_service') + self._test_file_with_project('service', '_service', path=self._project) def test_settings(self): self._test_file('settings', '_settings') + self._test_file_with_project('settings', '_settings', path=self._project) def test_test_case(self): self._test_file('test_case', '_test_case') + self._test_file_with_project('test_case', '_test_case', path=self._project) def test_thread(self): self._test_file('thread', '_thread') + self._test_file_with_project('thread', '_thread', path=self._project) def test_validator(self): self._test_file('validator', '_validator') + self._test_file_with_project('validator', '_validator', path=self._project) diff --git a/unittests/unittests_cli/publish_test_case.py b/unittests/unittests_cli/publish_test_case.py index 7c828ced..b24531c5 100644 --- a/unittests/unittests_cli/publish_test_case.py +++ b/unittests/unittests_cli/publish_test_case.py @@ -79,7 +79,7 @@ class PublishTestCase(unittest.TestCase): CLICommands.publish() dist_path = './dist' setup_path = f'{dist_path}/{self._source}/publish/setup' - full_dist_path = f'{dist_path}/{self._source}/publish/build/lib/{String.convert_to_snake_case(self._source)}' + full_dist_path = f'{dist_path}/{self._source}/publish/' self.assertTrue(os.path.exists(dist_path)) self.assertTrue(os.path.exists(setup_path)) self.assertTrue(os.path.exists(os.path.join(setup_path, f'{self._source}-0.0.0.tar.gz'))) @@ -89,4 +89,4 @@ class PublishTestCase(unittest.TestCase): with open(f'{full_dist_path}/{self._source}.json', 'w') as file: file.write(json.dumps(self._get_project_settings(), indent=2)) file.close() - self.assertTrue(self._are_dir_trees_equal(f'./src/{String.convert_to_snake_case(self._source)}', full_dist_path)) + # self.assertTrue(self._are_dir_trees_equal(f'./src/{String.convert_to_snake_case(self._source)}', full_dist_path)) diff --git a/unittests/unittests_cli/update_test_case.py b/unittests/unittests_cli/update_test_case.py index de21bf6b..3b50b38c 100644 --- a/unittests/unittests_cli/update_test_case.py +++ b/unittests/unittests_cli/update_test_case.py @@ -22,7 +22,7 @@ class UpdateTestCase(unittest.TestCase): self._old_package = f'{self._old_package_name}=={self._old_version}' # todo: better way to do shit required - self._new_version = '2.0.1' + self._new_version = '2.1.0' self._new_package_name = 'discord.py' self._new_package = f'{self._new_package_name}=={self._new_version}' -- 2.45.1 From 186b336bf34cf50814c5f1500a337830ab1af218 Mon Sep 17 00:00:00 2001 From: Sven Heidemann Date: Wed, 30 Nov 2022 19:05:11 +0100 Subject: [PATCH 5/7] Repaired build & publish #93 --- src/cpl_cli/__init__.py | 2 +- src/cpl_cli/_templates/__init__.py | 2 +- src/cpl_cli/_templates/build/__init__.py | 2 +- src/cpl_cli/_templates/generate/__init__.py | 2 +- src/cpl_cli/_templates/new/__init__.py | 2 +- src/cpl_cli/_templates/new/console/__init__.py | 2 +- src/cpl_cli/_templates/new/console/source/__init__.py | 2 +- src/cpl_cli/_templates/new/console/source/name/__init__.py | 2 +- src/cpl_cli/_templates/new/library/__init__.py | 2 +- src/cpl_cli/_templates/new/library/source/__init__.py | 2 +- src/cpl_cli/_templates/new/library/source/name/__init__.py | 2 +- src/cpl_cli/_templates/new/unittest/__init__.py | 2 +- src/cpl_cli/_templates/new/unittest/source/__init__.py | 2 +- src/cpl_cli/_templates/new/unittest/source/name/__init__.py | 2 +- src/cpl_cli/_templates/publish/__init__.py | 2 +- src/cpl_cli/command/__init__.py | 2 +- src/cpl_cli/configuration/__init__.py | 2 +- src/cpl_cli/live_server/__init__.py | 2 +- src/cpl_cli/migrations/__init__.py | 2 +- src/cpl_cli/migrations/base/__init__.py | 2 +- src/cpl_cli/migrations/service/__init__.py | 2 +- src/cpl_cli/publish/__init__.py | 2 +- src/cpl_cli/publish/publisher_service.py | 4 ++-- src/cpl_cli/source_creator/__init__.py | 2 +- src/cpl_cli/validators/__init__.py | 2 +- unittests/unittests_cli/build_test_case.py | 2 +- unittests/unittests_cli/publish_test_case.py | 4 ++-- 27 files changed, 29 insertions(+), 29 deletions(-) diff --git a/src/cpl_cli/__init__.py b/src/cpl_cli/__init__.py index 227afbda..cacc83ee 100644 --- a/src/cpl_cli/__init__.py +++ b/src/cpl_cli/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library Command Line Interface """ -__title__ = 'cpl-cli' +__title__ = 'cpl_cli' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' diff --git a/src/cpl_cli/_templates/__init__.py b/src/cpl_cli/_templates/__init__.py index 1742ddf9..c46a6fd5 100644 --- a/src/cpl_cli/_templates/__init__.py +++ b/src/cpl_cli/_templates/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library Command Line Interface """ -__title__ = '_templates' +__title__ = 'cpl_cli._templates' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' diff --git a/src/cpl_cli/_templates/build/__init__.py b/src/cpl_cli/_templates/build/__init__.py index 17140905..21ad75d9 100644 --- a/src/cpl_cli/_templates/build/__init__.py +++ b/src/cpl_cli/_templates/build/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library Command Line Interface """ -__title__ = '_templates.build' +__title__ = 'cpl_cli._templates.build' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' diff --git a/src/cpl_cli/_templates/generate/__init__.py b/src/cpl_cli/_templates/generate/__init__.py index 25d1efa5..84b734d1 100644 --- a/src/cpl_cli/_templates/generate/__init__.py +++ b/src/cpl_cli/_templates/generate/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library Command Line Interface """ -__title__ = '_templates.generate' +__title__ = 'cpl_cli._templates.generate' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' diff --git a/src/cpl_cli/_templates/new/__init__.py b/src/cpl_cli/_templates/new/__init__.py index b06174cb..db2618ea 100644 --- a/src/cpl_cli/_templates/new/__init__.py +++ b/src/cpl_cli/_templates/new/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library Command Line Interface """ -__title__ = '_templates.new' +__title__ = 'cpl_cli._templates.new' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' diff --git a/src/cpl_cli/_templates/new/console/__init__.py b/src/cpl_cli/_templates/new/console/__init__.py index 1f8490fd..6c1afdc0 100644 --- a/src/cpl_cli/_templates/new/console/__init__.py +++ b/src/cpl_cli/_templates/new/console/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library Command Line Interface """ -__title__ = '_templates.new.console' +__title__ = 'cpl_cli._templates.new.console' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' diff --git a/src/cpl_cli/_templates/new/console/source/__init__.py b/src/cpl_cli/_templates/new/console/source/__init__.py index 21378df3..78bef3d1 100644 --- a/src/cpl_cli/_templates/new/console/source/__init__.py +++ b/src/cpl_cli/_templates/new/console/source/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library Command Line Interface """ -__title__ = '_templates.new.console.source' +__title__ = 'cpl_cli._templates.new.console.source' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' 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 b892426a..3fbf8c29 100644 --- a/src/cpl_cli/_templates/new/console/source/name/__init__.py +++ b/src/cpl_cli/_templates/new/console/source/name/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library Command Line Interface """ -__title__ = '_templates.new.console.source.name' +__title__ = 'cpl_cli._templates.new.console.source.name' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' diff --git a/src/cpl_cli/_templates/new/library/__init__.py b/src/cpl_cli/_templates/new/library/__init__.py index d585cb0b..24146cb0 100644 --- a/src/cpl_cli/_templates/new/library/__init__.py +++ b/src/cpl_cli/_templates/new/library/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library Command Line Interface """ -__title__ = '_templates.new.library' +__title__ = 'cpl_cli._templates.new.library' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' diff --git a/src/cpl_cli/_templates/new/library/source/__init__.py b/src/cpl_cli/_templates/new/library/source/__init__.py index 7c8b2755..6f010ead 100644 --- a/src/cpl_cli/_templates/new/library/source/__init__.py +++ b/src/cpl_cli/_templates/new/library/source/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library Command Line Interface """ -__title__ = '_templates.new.library.source' +__title__ = 'cpl_cli._templates.new.library.source' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' 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 bf9076ae..30965706 100644 --- a/src/cpl_cli/_templates/new/library/source/name/__init__.py +++ b/src/cpl_cli/_templates/new/library/source/name/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library Command Line Interface """ -__title__ = '_templates.new.library.source.name' +__title__ = 'cpl_cli._templates.new.library.source.name' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' diff --git a/src/cpl_cli/_templates/new/unittest/__init__.py b/src/cpl_cli/_templates/new/unittest/__init__.py index 58469b8b..bfb4c039 100644 --- a/src/cpl_cli/_templates/new/unittest/__init__.py +++ b/src/cpl_cli/_templates/new/unittest/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library Command Line Interface """ -__title__ = '_templates.new.unittest' +__title__ = 'cpl_cli._templates.new.unittest' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' diff --git a/src/cpl_cli/_templates/new/unittest/source/__init__.py b/src/cpl_cli/_templates/new/unittest/source/__init__.py index 51f76f0e..324cfbf6 100644 --- a/src/cpl_cli/_templates/new/unittest/source/__init__.py +++ b/src/cpl_cli/_templates/new/unittest/source/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library Command Line Interface """ -__title__ = '_templates.new.unittest.source' +__title__ = 'cpl_cli._templates.new.unittest.source' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' 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 7bf46294..ed6c3518 100644 --- a/src/cpl_cli/_templates/new/unittest/source/name/__init__.py +++ b/src/cpl_cli/_templates/new/unittest/source/name/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library Command Line Interface """ -__title__ = '_templates.new.unittest.source.name' +__title__ = 'cpl_cli._templates.new.unittest.source.name' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' diff --git a/src/cpl_cli/_templates/publish/__init__.py b/src/cpl_cli/_templates/publish/__init__.py index 5258b787..0b0c9ee4 100644 --- a/src/cpl_cli/_templates/publish/__init__.py +++ b/src/cpl_cli/_templates/publish/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library Command Line Interface """ -__title__ = '_templates.publish' +__title__ = 'cpl_cli._templates.publish' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' diff --git a/src/cpl_cli/command/__init__.py b/src/cpl_cli/command/__init__.py index f54559ac..350b8f8d 100644 --- a/src/cpl_cli/command/__init__.py +++ b/src/cpl_cli/command/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library Command Line Interface """ -__title__ = 'command' +__title__ = 'cpl_cli.command' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' diff --git a/src/cpl_cli/configuration/__init__.py b/src/cpl_cli/configuration/__init__.py index 104a3809..d175531d 100644 --- a/src/cpl_cli/configuration/__init__.py +++ b/src/cpl_cli/configuration/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library Command Line Interface """ -__title__ = 'configuration' +__title__ = 'cpl_cli.configuration' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' diff --git a/src/cpl_cli/live_server/__init__.py b/src/cpl_cli/live_server/__init__.py index d7af8e7c..8f6d1272 100644 --- a/src/cpl_cli/live_server/__init__.py +++ b/src/cpl_cli/live_server/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library Command Line Interface """ -__title__ = 'live_server' +__title__ = 'cpl_cli.live_server' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' diff --git a/src/cpl_cli/migrations/__init__.py b/src/cpl_cli/migrations/__init__.py index d9aa0412..63cd6250 100644 --- a/src/cpl_cli/migrations/__init__.py +++ b/src/cpl_cli/migrations/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library Command Line Interface """ -__title__ = 'migrations' +__title__ = 'cpl_cli.migrations' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' diff --git a/src/cpl_cli/migrations/base/__init__.py b/src/cpl_cli/migrations/base/__init__.py index 19179a2c..c69bac92 100644 --- a/src/cpl_cli/migrations/base/__init__.py +++ b/src/cpl_cli/migrations/base/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library Command Line Interface """ -__title__ = 'migrations.base' +__title__ = 'cpl_cli.migrations.base' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' diff --git a/src/cpl_cli/migrations/service/__init__.py b/src/cpl_cli/migrations/service/__init__.py index 9cb4d5ff..92ffaa26 100644 --- a/src/cpl_cli/migrations/service/__init__.py +++ b/src/cpl_cli/migrations/service/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library Command Line Interface """ -__title__ = 'migrations.service' +__title__ = 'cpl_cli.migrations.service' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' diff --git a/src/cpl_cli/publish/__init__.py b/src/cpl_cli/publish/__init__.py index 736a41fb..4cc2e9aa 100644 --- a/src/cpl_cli/publish/__init__.py +++ b/src/cpl_cli/publish/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library Command Line Interface """ -__title__ = 'publish' +__title__ = 'cpl_cli.publish' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' diff --git a/src/cpl_cli/publish/publisher_service.py b/src/cpl_cli/publish/publisher_service.py index e7d59ad9..b1639023 100644 --- a/src/cpl_cli/publish/publisher_service.py +++ b/src/cpl_cli/publish/publisher_service.py @@ -433,7 +433,7 @@ class PublisherService(PublisherABC): 3. Copies all included source files to dist_path/build :return: """ - self._env.set_working_directory(os.path.join(self._env.working_directory, '../')) # probably causing some errors (#125) + self._env.set_working_directory(os.path.join(self._env.working_directory, '../')) # probably causing some errors (#125) self.exclude(f'*/{self._project_settings.name}.json') self._output_path = os.path.abspath(os.path.join(self._output_path, self._project_settings.name, 'build')) @@ -456,7 +456,7 @@ class PublisherService(PublisherABC): 4. Remove all included source from dist_path/publish :return: """ - self._env.set_working_directory(os.path.join(self._env.working_directory, '../')) # probably causing some errors (#125) + self._env.set_working_directory(os.path.join(self._env.working_directory, '../')) # probably causing some errors (#125) self.exclude(f'*/{self._project_settings.name}.json') self._output_path = os.path.abspath(os.path.join(self._output_path, self._project_settings.name, 'publish')) diff --git a/src/cpl_cli/source_creator/__init__.py b/src/cpl_cli/source_creator/__init__.py index fd32c0c0..af5e211e 100644 --- a/src/cpl_cli/source_creator/__init__.py +++ b/src/cpl_cli/source_creator/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library Command Line Interface """ -__title__ = 'source_creator' +__title__ = 'cpl_cli.source_creator' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' diff --git a/src/cpl_cli/validators/__init__.py b/src/cpl_cli/validators/__init__.py index 13642c80..b3cf1671 100644 --- a/src/cpl_cli/validators/__init__.py +++ b/src/cpl_cli/validators/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library Command Line Interface """ -__title__ = 'validators' +__title__ = 'cpl_cli.validators' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' diff --git a/unittests/unittests_cli/build_test_case.py b/unittests/unittests_cli/build_test_case.py index 6594bd08..e35d5cbd 100644 --- a/unittests/unittests_cli/build_test_case.py +++ b/unittests/unittests_cli/build_test_case.py @@ -78,7 +78,7 @@ class BuildTestCase(unittest.TestCase): def test_build(self): CLICommands.build() dist_path = './dist' - full_dist_path = f'{dist_path}/{self._source}/build/' + full_dist_path = f'{dist_path}/{self._source}/build/{String.convert_to_snake_case(self._source)}' self.assertTrue(os.path.exists(dist_path)) self.assertTrue(os.path.exists(full_dist_path)) self.assertFalse(self._are_dir_trees_equal(f'./src/{String.convert_to_snake_case(self._source)}', full_dist_path)) diff --git a/unittests/unittests_cli/publish_test_case.py b/unittests/unittests_cli/publish_test_case.py index b24531c5..7c828ced 100644 --- a/unittests/unittests_cli/publish_test_case.py +++ b/unittests/unittests_cli/publish_test_case.py @@ -79,7 +79,7 @@ class PublishTestCase(unittest.TestCase): CLICommands.publish() dist_path = './dist' setup_path = f'{dist_path}/{self._source}/publish/setup' - full_dist_path = f'{dist_path}/{self._source}/publish/' + full_dist_path = f'{dist_path}/{self._source}/publish/build/lib/{String.convert_to_snake_case(self._source)}' self.assertTrue(os.path.exists(dist_path)) self.assertTrue(os.path.exists(setup_path)) self.assertTrue(os.path.exists(os.path.join(setup_path, f'{self._source}-0.0.0.tar.gz'))) @@ -89,4 +89,4 @@ class PublishTestCase(unittest.TestCase): with open(f'{full_dist_path}/{self._source}.json', 'w') as file: file.write(json.dumps(self._get_project_settings(), indent=2)) file.close() - # self.assertTrue(self._are_dir_trees_equal(f'./src/{String.convert_to_snake_case(self._source)}', full_dist_path)) + self.assertTrue(self._are_dir_trees_equal(f'./src/{String.convert_to_snake_case(self._source)}', full_dist_path)) -- 2.45.1 From 6aef49de4037a31bfc2166f8baa94c28543c611c Mon Sep 17 00:00:00 2001 From: Sven Heidemann Date: Thu, 1 Dec 2022 12:17:26 +0100 Subject: [PATCH 6/7] Repaired build & publish #93 --- src/cpl_core/__init__.py | 2 +- src/cpl_core/application/__init__.py | 2 +- src/cpl_core/configuration/__init__.py | 2 +- src/cpl_core/console/__init__.py | 2 +- src/cpl_core/database/__init__.py | 2 +- src/cpl_core/database/connection/__init__.py | 2 +- src/cpl_core/database/context/__init__.py | 2 +- src/cpl_core/dependency_injection/__init__.py | 2 +- src/cpl_core/environment/__init__.py | 2 +- src/cpl_core/logging/__init__.py | 2 +- src/cpl_core/mailing/__init__.py | 2 +- src/cpl_core/pipes/__init__.py | 2 +- src/cpl_core/time/__init__.py | 2 +- src/cpl_core/utils/__init__.py | 2 +- src/cpl_discord/__init__.py | 2 +- src/cpl_discord/application/__init__.py | 2 +- src/cpl_discord/command/__init__.py | 2 +- src/cpl_discord/configuration/__init__.py | 2 +- src/cpl_discord/container/__init__.py | 2 +- src/cpl_discord/events/__init__.py | 2 +- src/cpl_discord/helper/__init__.py | 2 +- src/cpl_discord/service/__init__.py | 2 +- src/cpl_query/__init__.py | 2 +- src/cpl_query/base/__init__.py | 2 +- src/cpl_query/enumerable/__init__.py | 2 +- src/cpl_query/extension/__init__.py | 2 +- src/cpl_query/iterable/__init__.py | 2 +- src/cpl_translation/__init__.py | 2 +- tools/set_pip_urls/__init__.py | 2 +- tools/set_version/__init__.py | 2 +- 30 files changed, 30 insertions(+), 30 deletions(-) diff --git a/src/cpl_core/__init__.py b/src/cpl_core/__init__.py index 831d4cdb..b9b5c269 100644 --- a/src/cpl_core/__init__.py +++ b/src/cpl_core/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library """ -__title__ = 'cpl-core' +__title__ = 'cpl_core' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' diff --git a/src/cpl_core/application/__init__.py b/src/cpl_core/application/__init__.py index 6c4785bb..025c205a 100644 --- a/src/cpl_core/application/__init__.py +++ b/src/cpl_core/application/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library """ -__title__ = 'application' +__title__ = 'cpl_core.application' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' diff --git a/src/cpl_core/configuration/__init__.py b/src/cpl_core/configuration/__init__.py index 3b3742eb..cef5c5dd 100644 --- a/src/cpl_core/configuration/__init__.py +++ b/src/cpl_core/configuration/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library """ -__title__ = 'configuration' +__title__ = 'cpl_core.configuration' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' diff --git a/src/cpl_core/console/__init__.py b/src/cpl_core/console/__init__.py index 41363ef7..18525b46 100644 --- a/src/cpl_core/console/__init__.py +++ b/src/cpl_core/console/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library """ -__title__ = 'console' +__title__ = 'cpl_core.console' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' diff --git a/src/cpl_core/database/__init__.py b/src/cpl_core/database/__init__.py index 2b59e2e1..c2e5b49a 100644 --- a/src/cpl_core/database/__init__.py +++ b/src/cpl_core/database/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library """ -__title__ = 'database' +__title__ = 'cpl_core.database' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' diff --git a/src/cpl_core/database/connection/__init__.py b/src/cpl_core/database/connection/__init__.py index f27d336e..c1851618 100644 --- a/src/cpl_core/database/connection/__init__.py +++ b/src/cpl_core/database/connection/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library """ -__title__ = 'database.connection' +__title__ = 'cpl_core.database.connection' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' diff --git a/src/cpl_core/database/context/__init__.py b/src/cpl_core/database/context/__init__.py index 728be14a..224ddb32 100644 --- a/src/cpl_core/database/context/__init__.py +++ b/src/cpl_core/database/context/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library """ -__title__ = 'database.context' +__title__ = 'cpl_core.database.context' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' diff --git a/src/cpl_core/dependency_injection/__init__.py b/src/cpl_core/dependency_injection/__init__.py index 4f2322e3..b35fb03e 100644 --- a/src/cpl_core/dependency_injection/__init__.py +++ b/src/cpl_core/dependency_injection/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library """ -__title__ = 'dependency_injection' +__title__ = 'cpl_core.dependency_injection' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' diff --git a/src/cpl_core/environment/__init__.py b/src/cpl_core/environment/__init__.py index 4ac8db8b..587fd780 100644 --- a/src/cpl_core/environment/__init__.py +++ b/src/cpl_core/environment/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library """ -__title__ = 'environment' +__title__ = 'cpl_core.environment' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' diff --git a/src/cpl_core/logging/__init__.py b/src/cpl_core/logging/__init__.py index 0d92764a..6afacdbe 100644 --- a/src/cpl_core/logging/__init__.py +++ b/src/cpl_core/logging/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library """ -__title__ = 'logging' +__title__ = 'cpl_core.logging' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' diff --git a/src/cpl_core/mailing/__init__.py b/src/cpl_core/mailing/__init__.py index 077fb36d..a63daf4a 100644 --- a/src/cpl_core/mailing/__init__.py +++ b/src/cpl_core/mailing/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library """ -__title__ = 'mailing' +__title__ = 'cpl_core.mailing' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' diff --git a/src/cpl_core/pipes/__init__.py b/src/cpl_core/pipes/__init__.py index 7502f6c5..6afcae2a 100644 --- a/src/cpl_core/pipes/__init__.py +++ b/src/cpl_core/pipes/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library """ -__title__ = 'pipes' +__title__ = 'cpl_core.pipes' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' diff --git a/src/cpl_core/time/__init__.py b/src/cpl_core/time/__init__.py index 55c05086..45aacf77 100644 --- a/src/cpl_core/time/__init__.py +++ b/src/cpl_core/time/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library """ -__title__ = 'time' +__title__ = 'cpl_core.time' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' diff --git a/src/cpl_core/utils/__init__.py b/src/cpl_core/utils/__init__.py index 893d5903..64179a2b 100644 --- a/src/cpl_core/utils/__init__.py +++ b/src/cpl_core/utils/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library """ -__title__ = 'utils' +__title__ = 'cpl_core.utils' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' diff --git a/src/cpl_discord/__init__.py b/src/cpl_discord/__init__.py index 9b4f67d8..9e01b9a4 100644 --- a/src/cpl_discord/__init__.py +++ b/src/cpl_discord/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library link between discord.py and CPL """ -__title__ = 'cpl-discord' +__title__ = 'cpl_discord' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2021 - 2022 sh-edraft.de' diff --git a/src/cpl_discord/application/__init__.py b/src/cpl_discord/application/__init__.py index f7cc5b3e..b513d032 100644 --- a/src/cpl_discord/application/__init__.py +++ b/src/cpl_discord/application/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library link between discord.py and CPL """ -__title__ = 'application' +__title__ = 'cpl_discord.application' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2021 - 2022 sh-edraft.de' diff --git a/src/cpl_discord/command/__init__.py b/src/cpl_discord/command/__init__.py index 15b8bd13..9ccd88da 100644 --- a/src/cpl_discord/command/__init__.py +++ b/src/cpl_discord/command/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library link between discord.py and CPL """ -__title__ = 'command' +__title__ = 'cpl_discord.command' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2021 - 2022 sh-edraft.de' diff --git a/src/cpl_discord/configuration/__init__.py b/src/cpl_discord/configuration/__init__.py index c0b7cfcd..51110c41 100644 --- a/src/cpl_discord/configuration/__init__.py +++ b/src/cpl_discord/configuration/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library link between discord.py and CPL """ -__title__ = 'configuration' +__title__ = 'cpl_discord.configuration' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2021 - 2022 sh-edraft.de' diff --git a/src/cpl_discord/container/__init__.py b/src/cpl_discord/container/__init__.py index c9d25138..009623c6 100644 --- a/src/cpl_discord/container/__init__.py +++ b/src/cpl_discord/container/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library link between discord.py and CPL """ -__title__ = 'container' +__title__ = 'cpl_discord.container' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2021 - 2022 sh-edraft.de' diff --git a/src/cpl_discord/events/__init__.py b/src/cpl_discord/events/__init__.py index 9c7f7f8c..d961d3ad 100644 --- a/src/cpl_discord/events/__init__.py +++ b/src/cpl_discord/events/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library link between discord.py and CPL """ -__title__ = 'events' +__title__ = 'cpl_discord.events' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2021 - 2022 sh-edraft.de' diff --git a/src/cpl_discord/helper/__init__.py b/src/cpl_discord/helper/__init__.py index db6a6d9c..5eb30f53 100644 --- a/src/cpl_discord/helper/__init__.py +++ b/src/cpl_discord/helper/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library link between discord.py and CPL """ -__title__ = 'helper' +__title__ = 'cpl_discord.helper' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2021 - 2022 sh-edraft.de' diff --git a/src/cpl_discord/service/__init__.py b/src/cpl_discord/service/__init__.py index 5756e668..4223e0f8 100644 --- a/src/cpl_discord/service/__init__.py +++ b/src/cpl_discord/service/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library link between discord.py and CPL """ -__title__ = 'service' +__title__ = 'cpl_discord.service' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2021 - 2022 sh-edraft.de' diff --git a/src/cpl_query/__init__.py b/src/cpl_query/__init__.py index 2e2559f6..86fe8082 100644 --- a/src/cpl_query/__init__.py +++ b/src/cpl_query/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library Python integrated Queries """ -__title__ = 'cpl-query' +__title__ = 'cpl_query' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2021 - 2022 sh-edraft.de' diff --git a/src/cpl_query/base/__init__.py b/src/cpl_query/base/__init__.py index 23c921da..ab831d0a 100644 --- a/src/cpl_query/base/__init__.py +++ b/src/cpl_query/base/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library Python integrated Queries """ -__title__ = 'base' +__title__ = 'cpl_query.base' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2021 - 2022 sh-edraft.de' diff --git a/src/cpl_query/enumerable/__init__.py b/src/cpl_query/enumerable/__init__.py index 14d10619..9bd1147e 100644 --- a/src/cpl_query/enumerable/__init__.py +++ b/src/cpl_query/enumerable/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library Python integrated Queries """ -__title__ = 'enumerable' +__title__ = 'cpl_query.enumerable' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2021 - 2022 sh-edraft.de' diff --git a/src/cpl_query/extension/__init__.py b/src/cpl_query/extension/__init__.py index 54cdcac2..c47d1d20 100644 --- a/src/cpl_query/extension/__init__.py +++ b/src/cpl_query/extension/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library Python integrated Queries """ -__title__ = 'extension' +__title__ = 'cpl_query.extension' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2021 - 2022 sh-edraft.de' diff --git a/src/cpl_query/iterable/__init__.py b/src/cpl_query/iterable/__init__.py index 45cde067..d129a1c1 100644 --- a/src/cpl_query/iterable/__init__.py +++ b/src/cpl_query/iterable/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library Python integrated Queries """ -__title__ = 'iterable' +__title__ = 'cpl_query.iterable' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2021 - 2022 sh-edraft.de' diff --git a/src/cpl_translation/__init__.py b/src/cpl_translation/__init__.py index 2c3eedb0..d789a358 100644 --- a/src/cpl_translation/__init__.py +++ b/src/cpl_translation/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library Python Translation """ -__title__ = 'cpl-translation' +__title__ = 'cpl_translation' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2022 sh-edraft.de' diff --git a/tools/set_pip_urls/__init__.py b/tools/set_pip_urls/__init__.py index 290901d9..293c4a42 100644 --- a/tools/set_pip_urls/__init__.py +++ b/tools/set_pip_urls/__init__.py @@ -11,7 +11,7 @@ CPL internal tool to set pip URL for CLI by environment """ -__title__ = 'set-pip-urls' +__title__ = 'set_pip_urls' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2022 sh-edraft.de' diff --git a/tools/set_version/__init__.py b/tools/set_version/__init__.py index 47ab1c7b..ef7b39f6 100644 --- a/tools/set_version/__init__.py +++ b/tools/set_version/__init__.py @@ -11,7 +11,7 @@ CPL internal tool to set version from branch name """ -__title__ = 'set-version' +__title__ = 'set_version' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2022 sh-edraft.de' -- 2.45.1 From 9e84c8359bfde853c3b536feaf4a6bb790558851 Mon Sep 17 00:00:00 2001 From: Sven Heidemann Date: Thu, 1 Dec 2022 12:25:36 +0100 Subject: [PATCH 7/7] Removed empty PythonPath #93 --- src/cpl_discord/cpl-discord.json | 4 +--- tests/custom/async/src/async/async.json | 4 +--- tests/custom/database/cpl.json | 4 +--- tests/custom/di/src/di/di.json | 4 +--- tests/custom/discord/src/discord_bot/discord-bot.json | 4 +--- tests/custom/discord/src/modules/hello_world/hello-world.json | 4 +--- tests/custom/translation/src/translation/translation.json | 4 +--- tests/generated/simple-app/cpl.json | 4 +--- tests/generated/simple-app/src/simple_app/simple-app.json | 4 +--- tests/generated/simple-console/cpl.json | 4 +--- .../simple-console/src/simple_console/simple-console.json | 4 +--- tests/generated/simple-di/cpl.json | 4 +--- tests/generated/simple-di/src/simple_di/simple-di.json | 4 +--- .../src/simple_startup_app/simple-startup-app.json | 4 +--- tests/generated/startup-app/cpl.json | 4 +--- unittests/unittests/unittests.json | 4 +--- unittests/unittests_cli/unittests_cli.json | 4 +--- unittests/unittests_core/unittests_core.json | 4 +--- unittests/unittests_query/unittests_query.json | 4 +--- unittests/unittests_shared/unittests_shared.json | 4 +--- unittests/unittests_translation/unittests_translation.json | 4 +--- 21 files changed, 21 insertions(+), 63 deletions(-) diff --git a/src/cpl_discord/cpl-discord.json b/src/cpl_discord/cpl-discord.json index cdaed19b..dabf8aab 100644 --- a/src/cpl_discord/cpl-discord.json +++ b/src/cpl_discord/cpl-discord.json @@ -24,9 +24,7 @@ "cpl-cli>=2022.10.0" ], "PythonVersion": ">=3.10.4", - "PythonPath": { - "linux": "" - }, + "PythonPath": {}, "Classifiers": [] }, "BuildSettings": { diff --git a/tests/custom/async/src/async/async.json b/tests/custom/async/src/async/async.json index 7e632a65..ab459429 100644 --- a/tests/custom/async/src/async/async.json +++ b/tests/custom/async/src/async/async.json @@ -19,9 +19,7 @@ "sh_cpl>=2021.10.0.post1" ], "PythonVersion": ">=3.9.2", - "PythonPath": { - "linux": "" - }, + "PythonPath": {}, "Classifiers": [] }, "BuildSettings": { diff --git a/tests/custom/database/cpl.json b/tests/custom/database/cpl.json index e964c144..ee84d745 100644 --- a/tests/custom/database/cpl.json +++ b/tests/custom/database/cpl.json @@ -19,9 +19,7 @@ "sh_cpl==2021.4.2.dev1" ], "PythonVersion": ">=3.9.2", - "PythonPath": { - "linux": "" - }, + "PythonPath": {}, "Classifiers": [] }, "BuildSettings": { diff --git a/tests/custom/di/src/di/di.json b/tests/custom/di/src/di/di.json index cd4e3ff2..67ca9bd5 100644 --- a/tests/custom/di/src/di/di.json +++ b/tests/custom/di/src/di/di.json @@ -19,9 +19,7 @@ "sh_cpl>=2021.10.0.post1" ], "PythonVersion": ">=3.9.2", - "PythonPath": { - "linux": "" - }, + "PythonPath": {}, "Classifiers": [] }, "BuildSettings": { diff --git a/tests/custom/discord/src/discord_bot/discord-bot.json b/tests/custom/discord/src/discord_bot/discord-bot.json index d91dbfcc..c543ea19 100644 --- a/tests/custom/discord/src/discord_bot/discord-bot.json +++ b/tests/custom/discord/src/discord_bot/discord-bot.json @@ -22,9 +22,7 @@ "cpl-cli>=2022.7.0" ], "PythonVersion": ">=3.10.4", - "PythonPath": { - "linux": "" - }, + "PythonPath": {}, "Classifiers": [] }, "BuildSettings": { diff --git a/tests/custom/discord/src/modules/hello_world/hello-world.json b/tests/custom/discord/src/modules/hello_world/hello-world.json index 869a7901..f5dd8fcc 100644 --- a/tests/custom/discord/src/modules/hello_world/hello-world.json +++ b/tests/custom/discord/src/modules/hello_world/hello-world.json @@ -22,9 +22,7 @@ "cpl-cli>=2022.7.0.post1" ], "PythonVersion": ">=3.10.4", - "PythonPath": { - "linux": "" - }, + "PythonPath": {}, "Classifiers": [] }, "BuildSettings": { diff --git a/tests/custom/translation/src/translation/translation.json b/tests/custom/translation/src/translation/translation.json index f857761d..dbbe2dcd 100644 --- a/tests/custom/translation/src/translation/translation.json +++ b/tests/custom/translation/src/translation/translation.json @@ -22,9 +22,7 @@ "cpl-cli>=2022.6.0" ], "PythonVersion": ">=3.10.4", - "PythonPath": { - "linux": "" - }, + "PythonPath": {}, "Classifiers": [] }, "BuildSettings": { diff --git a/tests/generated/simple-app/cpl.json b/tests/generated/simple-app/cpl.json index f223da45..1af0f6e6 100644 --- a/tests/generated/simple-app/cpl.json +++ b/tests/generated/simple-app/cpl.json @@ -19,9 +19,7 @@ "sh_cpl==2021.4.2" ], "PythonVersion": ">=3.9.2", - "PythonPath": { - "linux": "" - }, + "PythonPath": {}, "Classifiers": [] }, "BuildSettings": { diff --git a/tests/generated/simple-app/src/simple_app/simple-app.json b/tests/generated/simple-app/src/simple_app/simple-app.json index 5375d662..3aa9d743 100644 --- a/tests/generated/simple-app/src/simple_app/simple-app.json +++ b/tests/generated/simple-app/src/simple_app/simple-app.json @@ -19,9 +19,7 @@ "sh_cpl==2021.4.1rc2" ], "PythonVersion": ">=3.9.2", - "PythonPath": { - "linux": "" - }, + "PythonPath": {}, "Classifiers": [] }, "BuildSettings": { diff --git a/tests/generated/simple-console/cpl.json b/tests/generated/simple-console/cpl.json index 63fe1a4d..5ddc2f0f 100644 --- a/tests/generated/simple-console/cpl.json +++ b/tests/generated/simple-console/cpl.json @@ -19,9 +19,7 @@ "sh_cpl==2021.4.2" ], "PythonVersion": ">=3.9.2", - "PythonPath": { - "linux": "" - }, + "PythonPath": {}, "Classifiers": [] }, "BuildSettings": { diff --git a/tests/generated/simple-console/src/simple_console/simple-console.json b/tests/generated/simple-console/src/simple_console/simple-console.json index e05e9201..24d5c821 100644 --- a/tests/generated/simple-console/src/simple_console/simple-console.json +++ b/tests/generated/simple-console/src/simple_console/simple-console.json @@ -19,9 +19,7 @@ "sh_cpl==2021.4.1rc2" ], "PythonVersion": ">=3.9.2", - "PythonPath": { - "linux": "" - }, + "PythonPath": {}, "Classifiers": [] }, "BuildSettings": { diff --git a/tests/generated/simple-di/cpl.json b/tests/generated/simple-di/cpl.json index 8804958a..a048da7f 100644 --- a/tests/generated/simple-di/cpl.json +++ b/tests/generated/simple-di/cpl.json @@ -19,9 +19,7 @@ "sh_cpl==2021.4.2.dev1" ], "PythonVersion": ">=3.9.2", - "PythonPath": { - "linux": "" - }, + "PythonPath": {}, "Classifiers": [] }, "BuildSettings": { diff --git a/tests/generated/simple-di/src/simple_di/simple-di.json b/tests/generated/simple-di/src/simple_di/simple-di.json index b5591ebf..54751fcc 100644 --- a/tests/generated/simple-di/src/simple_di/simple-di.json +++ b/tests/generated/simple-di/src/simple_di/simple-di.json @@ -19,9 +19,7 @@ "sh_cpl==2021.4.1rc2" ], "PythonVersion": ">=3.9.2", - "PythonPath": { - "linux": "" - }, + "PythonPath": {}, "Classifiers": [] }, "BuildSettings": { diff --git a/tests/generated/simple-startup-app/src/simple_startup_app/simple-startup-app.json b/tests/generated/simple-startup-app/src/simple_startup_app/simple-startup-app.json index 6c036f08..80e4786f 100644 --- a/tests/generated/simple-startup-app/src/simple_startup_app/simple-startup-app.json +++ b/tests/generated/simple-startup-app/src/simple_startup_app/simple-startup-app.json @@ -19,9 +19,7 @@ "sh_cpl==2021.4.1rc2" ], "PythonVersion": ">=3.9.2", - "PythonPath": { - "linux": "" - }, + "PythonPath": {}, "Classifiers": [] }, "BuildSettings": { diff --git a/tests/generated/startup-app/cpl.json b/tests/generated/startup-app/cpl.json index 086c70ae..39de3a85 100644 --- a/tests/generated/startup-app/cpl.json +++ b/tests/generated/startup-app/cpl.json @@ -19,9 +19,7 @@ "sh_cpl==2021.4.2" ], "PythonVersion": ">=3.9.2", - "PythonPath": { - "linux": "" - }, + "PythonPath": {}, "Classifiers": [] }, "BuildSettings": { diff --git a/unittests/unittests/unittests.json b/unittests/unittests/unittests.json index a3f1e8b3..bae65fc0 100644 --- a/unittests/unittests/unittests.json +++ b/unittests/unittests/unittests.json @@ -19,9 +19,7 @@ "cpl-core>=2022.10.0" ], "PythonVersion": ">=3.10.4", - "PythonPath": { - "linux": "" - }, + "PythonPath": {}, "Classifiers": [], "DevDependencies": [] }, diff --git a/unittests/unittests_cli/unittests_cli.json b/unittests/unittests_cli/unittests_cli.json index aa975a3f..7b81087c 100644 --- a/unittests/unittests_cli/unittests_cli.json +++ b/unittests/unittests_cli/unittests_cli.json @@ -20,9 +20,7 @@ "cpl-cli>=2022.10.0" ], "PythonVersion": ">=3.10.4", - "PythonPath": { - "linux": "" - }, + "PythonPath": {}, "Classifiers": [], "DevDependencies": [] }, diff --git a/unittests/unittests_core/unittests_core.json b/unittests/unittests_core/unittests_core.json index 1e875549..143b7da1 100644 --- a/unittests/unittests_core/unittests_core.json +++ b/unittests/unittests_core/unittests_core.json @@ -19,9 +19,7 @@ "cpl-core>=2022.10.0" ], "PythonVersion": ">=3.10.4", - "PythonPath": { - "linux": "" - }, + "PythonPath": {}, "Classifiers": [], "DevDependencies": [] }, diff --git a/unittests/unittests_query/unittests_query.json b/unittests/unittests_query/unittests_query.json index d125ef96..bf5c4041 100644 --- a/unittests/unittests_query/unittests_query.json +++ b/unittests/unittests_query/unittests_query.json @@ -20,9 +20,7 @@ "cpl-query>=2022.10.0" ], "PythonVersion": ">=3.10.4", - "PythonPath": { - "linux": "" - }, + "PythonPath": {}, "Classifiers": [], "DevDependencies": [] }, diff --git a/unittests/unittests_shared/unittests_shared.json b/unittests/unittests_shared/unittests_shared.json index 795691a5..881cf7b1 100644 --- a/unittests/unittests_shared/unittests_shared.json +++ b/unittests/unittests_shared/unittests_shared.json @@ -19,9 +19,7 @@ "cpl-core>=2022.10.0" ], "PythonVersion": ">=3.10.4", - "PythonPath": { - "linux": "" - }, + "PythonPath": {}, "Classifiers": [], "DevDependencies": [] }, diff --git a/unittests/unittests_translation/unittests_translation.json b/unittests/unittests_translation/unittests_translation.json index f609a6d4..28396a27 100644 --- a/unittests/unittests_translation/unittests_translation.json +++ b/unittests/unittests_translation/unittests_translation.json @@ -23,9 +23,7 @@ "cpl-cli>=2022.10.0" ], "PythonVersion": ">=3.10.4", - "PythonPath": { - "linux": "" - }, + "PythonPath": {}, "Classifiers": [] }, "BuildSettings": { -- 2.45.1