From d8168f024c385c8024638854b094c9c7ca9e5a3e Mon Sep 17 00:00:00 2001 From: Sven Heidemann Date: Wed, 25 May 2022 19:53:05 +0200 Subject: [PATCH] Added logic to write PipPath & build dev2 --- cpl-workspace.json | 4 +- src/cpl_cli/__init__.py | 4 +- src/cpl_cli/_templates/__init__.py | 4 +- src/cpl_cli/_templates/build/__init__.py | 4 +- src/cpl_cli/_templates/generate/__init__.py | 4 +- src/cpl_cli/_templates/new/__init__.py | 4 +- .../_templates/new/console/__init__.py | 4 +- .../_templates/new/console/source/__init__.py | 4 +- .../new/console/source/name/__init__.py | 4 +- .../new/console/source/tests/__init__.py | 4 +- .../_templates/new/library/__init__.py | 4 +- .../_templates/new/library/source/__init__.py | 4 +- .../new/library/source/name/__init__.py | 4 +- .../new/library/source/tests/__init__.py | 4 +- src/cpl_cli/_templates/publish/__init__.py | 4 +- src/cpl_cli/command/__init__.py | 4 +- src/cpl_cli/configuration/__init__.py | 4 +- src/cpl_cli/cpl-cli.json | 4 +- src/cpl_cli/live_server/__init__.py | 4 +- src/cpl_cli/publish/__init__.py | 4 +- src/cpl_cli/source_creator/__init__.py | 4 +- src/cpl_cli/validators/__init__.py | 4 +- src/cpl_core/__init__.py | 4 +- src/cpl_core/application/__init__.py | 4 +- src/cpl_core/configuration/__init__.py | 4 +- src/cpl_core/console/__init__.py | 4 +- src/cpl_core/cpl-core.json | 2 +- src/cpl_core/database/__init__.py | 4 +- src/cpl_core/database/connection/__init__.py | 4 +- src/cpl_core/database/context/__init__.py | 4 +- src/cpl_core/dependency_injection/__init__.py | 4 +- src/cpl_core/environment/__init__.py | 4 +- src/cpl_core/logging/__init__.py | 4 +- src/cpl_core/mailing/__init__.py | 4 +- src/cpl_core/pipes/__init__.py | 4 +- src/cpl_core/time/__init__.py | 4 +- src/cpl_core/utils/__init__.py | 4 +- src/cpl_query/__init__.py | 4 +- src/cpl_query/_query/__init__.py | 4 +- src/cpl_query/cpl-query.json | 4 +- src/cpl_query/extension/__init__.py | 4 +- tools/set_pip_urls/application.py | 36 +++++++++++++++++- tools/set_pip_urls/pip_settings.py | 37 +++++++++++++++++++ tools/set_pip_urls/set-pip-urls.json | 2 +- tools/set_pip_urls/startup.py | 2 + tools/set_version/set-version.json | 2 +- 46 files changed, 156 insertions(+), 85 deletions(-) create mode 100644 tools/set_pip_urls/pip_settings.py diff --git a/cpl-workspace.json b/cpl-workspace.json index b262a5ba..e99ca505 100644 --- a/cpl-workspace.json +++ b/cpl-workspace.json @@ -22,7 +22,7 @@ "docs-open": "xdg-open $PWD/docs/build/html/index.html &", "do": "cpl docs-open", - "pre-build-all": "cpl sv $ARGS; cpl spu;", + "pre-build-all": "cpl sv $ARGS; cpl spu $ARGS;", "build-all": "cpl build-cli; cpl build-core; cpl build-query; cpl build-set-pip-urls; cpl build-set-version", "ba": "cpl build-all $ARGS", "build-cli": "echo 'Build cpl-cli'; cd ./src/cpl_cli; cpl build; cd ../../;", @@ -31,7 +31,7 @@ "build-set-pip-urls": "echo 'Build set-pip-urls'; cd ./tools/set_pip_urls; cpl build; cd ../../;", "build-set-version": "echo 'Build set-version'; cd ./tools/set_version; cpl build; cd ../../;", - "pre-publish-all": "cpl sv $ARGS", + "pre-publish-all": "cpl sv $ARGS; cpl spu $ARGS;", "publish-all": "cpl publish-cli; cpl publish-core; cpl publish-query;", "pa": "cpl build-all $ARGS", "publish-cli": "echo 'Publish cpl-cli'; cd ./src/cpl_cli; cpl publish; cd ../../;", diff --git a/src/cpl_cli/__init__.py b/src/cpl_cli/__init__.py index 62458b63..05e52eb0 100644 --- a/src/cpl_cli/__init__.py +++ b/src/cpl_cli/__init__.py @@ -15,7 +15,7 @@ __title__ = 'cpl_cli' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' -__version__ = '2022.6.16.dev1' +__version__ = '2022.6.16.dev2' from collections import namedtuple @@ -27,4 +27,4 @@ from .main import main from .startup import Startup VersionInfo = namedtuple('VersionInfo', 'major minor micro') -version_info = VersionInfo(major='2022', minor='6', micro='16.dev1') +version_info = VersionInfo(major='2022', minor='6', micro='16.dev2') diff --git a/src/cpl_cli/_templates/__init__.py b/src/cpl_cli/_templates/__init__.py index 8a5ce5c8..2f05b3a2 100644 --- a/src/cpl_cli/_templates/__init__.py +++ b/src/cpl_cli/_templates/__init__.py @@ -15,11 +15,11 @@ __title__ = 'cpl_cli._templates' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' -__version__ = '2022.6.16.dev1' +__version__ = '2022.6.16.dev2' from collections import namedtuple # imports: VersionInfo = namedtuple('VersionInfo', 'major minor micro') -version_info = VersionInfo(major='2022', minor='6', micro='16.dev1') +version_info = VersionInfo(major='2022', minor='6', micro='16.dev2') diff --git a/src/cpl_cli/_templates/build/__init__.py b/src/cpl_cli/_templates/build/__init__.py index 20a7c85c..4d15c7c4 100644 --- a/src/cpl_cli/_templates/build/__init__.py +++ b/src/cpl_cli/_templates/build/__init__.py @@ -15,11 +15,11 @@ __title__ = 'cpl_cli._templates.build' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' -__version__ = '2022.6.16.dev1' +__version__ = '2022.6.16.dev2' from collections import namedtuple # imports: VersionInfo = namedtuple('VersionInfo', 'major minor micro') -version_info = VersionInfo(major='2022', minor='6', micro='16.dev1') +version_info = VersionInfo(major='2022', minor='6', micro='16.dev2') diff --git a/src/cpl_cli/_templates/generate/__init__.py b/src/cpl_cli/_templates/generate/__init__.py index c5e240b8..f623a461 100644 --- a/src/cpl_cli/_templates/generate/__init__.py +++ b/src/cpl_cli/_templates/generate/__init__.py @@ -15,11 +15,11 @@ __title__ = 'cpl_cli._templates.generate' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' -__version__ = '2022.6.16.dev1' +__version__ = '2022.6.16.dev2' from collections import namedtuple # imports: VersionInfo = namedtuple('VersionInfo', 'major minor micro') -version_info = VersionInfo(major='2022', minor='6', micro='16.dev1') +version_info = VersionInfo(major='2022', minor='6', micro='16.dev2') diff --git a/src/cpl_cli/_templates/new/__init__.py b/src/cpl_cli/_templates/new/__init__.py index 3a36054b..87792c02 100644 --- a/src/cpl_cli/_templates/new/__init__.py +++ b/src/cpl_cli/_templates/new/__init__.py @@ -15,11 +15,11 @@ __title__ = 'cpl_cli._templates.new' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' -__version__ = '2022.6.16.dev1' +__version__ = '2022.6.16.dev2' from collections import namedtuple # imports: VersionInfo = namedtuple('VersionInfo', 'major minor micro') -version_info = VersionInfo(major='2022', minor='6', micro='16.dev1') +version_info = VersionInfo(major='2022', minor='6', micro='16.dev2') diff --git a/src/cpl_cli/_templates/new/console/__init__.py b/src/cpl_cli/_templates/new/console/__init__.py index 6061c0ef..d88df923 100644 --- a/src/cpl_cli/_templates/new/console/__init__.py +++ b/src/cpl_cli/_templates/new/console/__init__.py @@ -15,11 +15,11 @@ __title__ = 'cpl_cli._templates.new.console' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' -__version__ = '2022.6.16.dev1' +__version__ = '2022.6.16.dev2' from collections import namedtuple # imports: VersionInfo = namedtuple('VersionInfo', 'major minor micro') -version_info = VersionInfo(major='2022', minor='6', micro='16.dev1') +version_info = VersionInfo(major='2022', minor='6', micro='16.dev2') diff --git a/src/cpl_cli/_templates/new/console/source/__init__.py b/src/cpl_cli/_templates/new/console/source/__init__.py index 35796370..7d9d4f31 100644 --- a/src/cpl_cli/_templates/new/console/source/__init__.py +++ b/src/cpl_cli/_templates/new/console/source/__init__.py @@ -15,11 +15,11 @@ __title__ = 'cpl_cli._templates.new.console.source' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' -__version__ = '2022.6.16.dev1' +__version__ = '2022.6.16.dev2' from collections import namedtuple # imports: VersionInfo = namedtuple('VersionInfo', 'major minor micro') -version_info = VersionInfo(major='2022', minor='6', micro='16.dev1') +version_info = VersionInfo(major='2022', minor='6', micro='16.dev2') 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 c67f58e3..bcf07bec 100644 --- a/src/cpl_cli/_templates/new/console/source/name/__init__.py +++ b/src/cpl_cli/_templates/new/console/source/name/__init__.py @@ -15,11 +15,11 @@ __title__ = 'cpl_cli._templates.new.console.source.name' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' -__version__ = '2022.6.16.dev1' +__version__ = '2022.6.16.dev2' from collections import namedtuple # imports: VersionInfo = namedtuple('VersionInfo', 'major minor micro') -version_info = VersionInfo(major='2022', minor='6', micro='16.dev1') +version_info = VersionInfo(major='2022', minor='6', micro='16.dev2') diff --git a/src/cpl_cli/_templates/new/console/source/tests/__init__.py b/src/cpl_cli/_templates/new/console/source/tests/__init__.py index 6d03cfab..e6f97f7d 100644 --- a/src/cpl_cli/_templates/new/console/source/tests/__init__.py +++ b/src/cpl_cli/_templates/new/console/source/tests/__init__.py @@ -15,11 +15,11 @@ __title__ = 'cpl_cli._templates.new.console.source.tests' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' -__version__ = '2022.6.16.dev1' +__version__ = '2022.6.16.dev2' from collections import namedtuple # imports: VersionInfo = namedtuple('VersionInfo', 'major minor micro') -version_info = VersionInfo(major='2022', minor='6', micro='16.dev1') +version_info = VersionInfo(major='2022', minor='6', micro='16.dev2') diff --git a/src/cpl_cli/_templates/new/library/__init__.py b/src/cpl_cli/_templates/new/library/__init__.py index e983abe7..983bda70 100644 --- a/src/cpl_cli/_templates/new/library/__init__.py +++ b/src/cpl_cli/_templates/new/library/__init__.py @@ -15,11 +15,11 @@ __title__ = 'cpl_cli._templates.new.library' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' -__version__ = '2022.6.16.dev1' +__version__ = '2022.6.16.dev2' from collections import namedtuple # imports: VersionInfo = namedtuple('VersionInfo', 'major minor micro') -version_info = VersionInfo(major='2022', minor='6', micro='16.dev1') +version_info = VersionInfo(major='2022', minor='6', micro='16.dev2') diff --git a/src/cpl_cli/_templates/new/library/source/__init__.py b/src/cpl_cli/_templates/new/library/source/__init__.py index a6bbfa24..05c73fef 100644 --- a/src/cpl_cli/_templates/new/library/source/__init__.py +++ b/src/cpl_cli/_templates/new/library/source/__init__.py @@ -15,11 +15,11 @@ __title__ = 'cpl_cli._templates.new.library.source' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' -__version__ = '2022.6.16.dev1' +__version__ = '2022.6.16.dev2' from collections import namedtuple # imports: VersionInfo = namedtuple('VersionInfo', 'major minor micro') -version_info = VersionInfo(major='2022', minor='6', micro='16.dev1') +version_info = VersionInfo(major='2022', minor='6', micro='16.dev2') 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 b0ec5cd8..cff20c14 100644 --- a/src/cpl_cli/_templates/new/library/source/name/__init__.py +++ b/src/cpl_cli/_templates/new/library/source/name/__init__.py @@ -15,11 +15,11 @@ __title__ = 'cpl_cli._templates.new.library.source.name' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' -__version__ = '2022.6.16.dev1' +__version__ = '2022.6.16.dev2' from collections import namedtuple # imports: VersionInfo = namedtuple('VersionInfo', 'major minor micro') -version_info = VersionInfo(major='2022', minor='6', micro='16.dev1') +version_info = VersionInfo(major='2022', minor='6', micro='16.dev2') diff --git a/src/cpl_cli/_templates/new/library/source/tests/__init__.py b/src/cpl_cli/_templates/new/library/source/tests/__init__.py index 49e7fe39..b5b21f5f 100644 --- a/src/cpl_cli/_templates/new/library/source/tests/__init__.py +++ b/src/cpl_cli/_templates/new/library/source/tests/__init__.py @@ -15,11 +15,11 @@ __title__ = 'cpl_cli._templates.new.library.source.tests' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' -__version__ = '2022.6.16.dev1' +__version__ = '2022.6.16.dev2' from collections import namedtuple # imports: VersionInfo = namedtuple('VersionInfo', 'major minor micro') -version_info = VersionInfo(major='2022', minor='6', micro='16.dev1') +version_info = VersionInfo(major='2022', minor='6', micro='16.dev2') diff --git a/src/cpl_cli/_templates/publish/__init__.py b/src/cpl_cli/_templates/publish/__init__.py index 47b33d9d..2b81167c 100644 --- a/src/cpl_cli/_templates/publish/__init__.py +++ b/src/cpl_cli/_templates/publish/__init__.py @@ -15,11 +15,11 @@ __title__ = 'cpl_cli._templates.publish' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' -__version__ = '2022.6.16.dev1' +__version__ = '2022.6.16.dev2' from collections import namedtuple # imports: VersionInfo = namedtuple('VersionInfo', 'major minor micro') -version_info = VersionInfo(major='2022', minor='6', micro='16.dev1') +version_info = VersionInfo(major='2022', minor='6', micro='16.dev2') diff --git a/src/cpl_cli/command/__init__.py b/src/cpl_cli/command/__init__.py index 4e5021cc..57edb0da 100644 --- a/src/cpl_cli/command/__init__.py +++ b/src/cpl_cli/command/__init__.py @@ -15,7 +15,7 @@ __title__ = 'cpl_cli.command' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' -__version__ = '2022.6.16.dev1' +__version__ = '2022.6.16.dev2' from collections import namedtuple @@ -28,4 +28,4 @@ from .publish_service import PublishService from .version_service import VersionService VersionInfo = namedtuple('VersionInfo', 'major minor micro') -version_info = VersionInfo(major='2022', minor='6', micro='16.dev1') +version_info = VersionInfo(major='2022', minor='6', micro='16.dev2') diff --git a/src/cpl_cli/configuration/__init__.py b/src/cpl_cli/configuration/__init__.py index 3645711c..1661d5d3 100644 --- a/src/cpl_cli/configuration/__init__.py +++ b/src/cpl_cli/configuration/__init__.py @@ -15,7 +15,7 @@ __title__ = 'cpl_cli.configuration' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' -__version__ = '2022.6.16.dev1' +__version__ = '2022.6.16.dev2' from collections import namedtuple @@ -30,4 +30,4 @@ from .workspace_settings import WorkspaceSettings from .workspace_settings_name_enum import WorkspaceSettingsNameEnum VersionInfo = namedtuple('VersionInfo', 'major minor micro') -version_info = VersionInfo(major='2022', minor='6', micro='16.dev1') +version_info = VersionInfo(major='2022', minor='6', micro='16.dev2') diff --git a/src/cpl_cli/cpl-cli.json b/src/cpl_cli/cpl-cli.json index 9f26416f..c82b9c2d 100644 --- a/src/cpl_cli/cpl-cli.json +++ b/src/cpl_cli/cpl-cli.json @@ -4,7 +4,7 @@ "Version": { "Major": "2022", "Minor": "6", - "Micro": "16.dev1" + "Micro": "16.dev2" }, "Author": "Sven Heidemann", "AuthorEmail": "sven.heidemann@sh-edraft.de", @@ -16,7 +16,7 @@ "LicenseName": "MIT", "LicenseDescription": "MIT, see LICENSE for more details.", "Dependencies": [ - "cpl-core>=2022.6.16.dev1" + "cpl-core>=2022.6.16.dev2" ], "PythonVersion": ">=3.10", "PythonPath": {}, diff --git a/src/cpl_cli/live_server/__init__.py b/src/cpl_cli/live_server/__init__.py index 4fe50897..15e8c430 100644 --- a/src/cpl_cli/live_server/__init__.py +++ b/src/cpl_cli/live_server/__init__.py @@ -15,11 +15,11 @@ __title__ = 'cpl_cli.live_server' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' -__version__ = '2022.6.16.dev1' +__version__ = '2022.6.16.dev2' from collections import namedtuple # imports: VersionInfo = namedtuple('VersionInfo', 'major minor micro') -version_info = VersionInfo(major='2022', minor='6', micro='16.dev1') +version_info = VersionInfo(major='2022', minor='6', micro='16.dev2') diff --git a/src/cpl_cli/publish/__init__.py b/src/cpl_cli/publish/__init__.py index bf02c376..5e21f69d 100644 --- a/src/cpl_cli/publish/__init__.py +++ b/src/cpl_cli/publish/__init__.py @@ -15,7 +15,7 @@ __title__ = 'cpl_cli.publish' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' -__version__ = '2022.6.16.dev1' +__version__ = '2022.6.16.dev2' from collections import namedtuple @@ -24,4 +24,4 @@ from .publisher_abc import PublisherABC from .publisher_service import PublisherService VersionInfo = namedtuple('VersionInfo', 'major minor micro') -version_info = VersionInfo(major='2022', minor='6', micro='16.dev1') +version_info = VersionInfo(major='2022', minor='6', micro='16.dev2') diff --git a/src/cpl_cli/source_creator/__init__.py b/src/cpl_cli/source_creator/__init__.py index 67728896..c4195351 100644 --- a/src/cpl_cli/source_creator/__init__.py +++ b/src/cpl_cli/source_creator/__init__.py @@ -15,11 +15,11 @@ __title__ = 'cpl_cli.source_creator' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' -__version__ = '2022.6.16.dev1' +__version__ = '2022.6.16.dev2' from collections import namedtuple # imports: VersionInfo = namedtuple('VersionInfo', 'major minor micro') -version_info = VersionInfo(major='2022', minor='6', micro='16.dev1') +version_info = VersionInfo(major='2022', minor='6', micro='16.dev2') diff --git a/src/cpl_cli/validators/__init__.py b/src/cpl_cli/validators/__init__.py index cd5fdfd7..8d8bd93f 100644 --- a/src/cpl_cli/validators/__init__.py +++ b/src/cpl_cli/validators/__init__.py @@ -15,11 +15,11 @@ __title__ = 'cpl_cli.validators' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' -__version__ = '2022.6.16.dev1' +__version__ = '2022.6.16.dev2' from collections import namedtuple # imports: VersionInfo = namedtuple('VersionInfo', 'major minor micro') -version_info = VersionInfo(major='2022', minor='6', micro='16.dev1') +version_info = VersionInfo(major='2022', minor='6', micro='16.dev2') diff --git a/src/cpl_core/__init__.py b/src/cpl_core/__init__.py index f9937f9d..808bef50 100644 --- a/src/cpl_core/__init__.py +++ b/src/cpl_core/__init__.py @@ -15,11 +15,11 @@ __title__ = 'cpl_core' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' -__version__ = '2022.6.16.dev1' +__version__ = '2022.6.16.dev2' from collections import namedtuple # imports: VersionInfo = namedtuple('VersionInfo', 'major minor micro') -version_info = VersionInfo(major='2022', minor='6', micro='16.dev1') +version_info = VersionInfo(major='2022', minor='6', micro='16.dev2') diff --git a/src/cpl_core/application/__init__.py b/src/cpl_core/application/__init__.py index 644f203c..068828c5 100644 --- a/src/cpl_core/application/__init__.py +++ b/src/cpl_core/application/__init__.py @@ -15,7 +15,7 @@ __title__ = 'cpl_core.application' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' -__version__ = '2022.6.16.dev1' +__version__ = '2022.6.16.dev2' from collections import namedtuple @@ -28,4 +28,4 @@ from .startup_abc import StartupABC from .startup_extension_abc import StartupExtensionABC VersionInfo = namedtuple('VersionInfo', 'major minor micro') -version_info = VersionInfo(major='2022', minor='6', micro='16.dev1') +version_info = VersionInfo(major='2022', minor='6', micro='16.dev2') diff --git a/src/cpl_core/configuration/__init__.py b/src/cpl_core/configuration/__init__.py index b0a782cc..6942e603 100644 --- a/src/cpl_core/configuration/__init__.py +++ b/src/cpl_core/configuration/__init__.py @@ -15,7 +15,7 @@ __title__ = 'cpl_core.configuration' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' -__version__ = '2022.6.16.dev1' +__version__ = '2022.6.16.dev2' from collections import namedtuple @@ -34,4 +34,4 @@ from .validator_abc import ValidatorABC from .variable_argument import VariableArgument VersionInfo = namedtuple('VersionInfo', 'major minor micro') -version_info = VersionInfo(major='2022', minor='6', micro='16.dev1') +version_info = VersionInfo(major='2022', minor='6', micro='16.dev2') diff --git a/src/cpl_core/console/__init__.py b/src/cpl_core/console/__init__.py index 05da1fa2..563b63f7 100644 --- a/src/cpl_core/console/__init__.py +++ b/src/cpl_core/console/__init__.py @@ -15,7 +15,7 @@ __title__ = 'cpl_core.console' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' -__version__ = '2022.6.16.dev1' +__version__ = '2022.6.16.dev2' from collections import namedtuple @@ -27,4 +27,4 @@ from .foreground_color_enum import ForegroundColorEnum from .spinner_thread import SpinnerThread VersionInfo = namedtuple('VersionInfo', 'major minor micro') -version_info = VersionInfo(major='2022', minor='6', micro='16.dev1') +version_info = VersionInfo(major='2022', minor='6', micro='16.dev2') diff --git a/src/cpl_core/cpl-core.json b/src/cpl_core/cpl-core.json index 69ce23e7..572e5760 100644 --- a/src/cpl_core/cpl-core.json +++ b/src/cpl_core/cpl-core.json @@ -4,7 +4,7 @@ "Version": { "Major": "2022", "Minor": "6", - "Micro": "16.dev1" + "Micro": "16.dev2" }, "Author": "Sven Heidemann", "AuthorEmail": "sven.heidemann@sh-edraft.de", diff --git a/src/cpl_core/database/__init__.py b/src/cpl_core/database/__init__.py index 024f9624..0a98c239 100644 --- a/src/cpl_core/database/__init__.py +++ b/src/cpl_core/database/__init__.py @@ -15,7 +15,7 @@ __title__ = 'cpl_core.database' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' -__version__ = '2022.6.16.dev1' +__version__ = '2022.6.16.dev2' from collections import namedtuple @@ -25,4 +25,4 @@ from .database_settings import DatabaseSettings from .table_abc import TableABC VersionInfo = namedtuple('VersionInfo', 'major minor micro') -version_info = VersionInfo(major='2022', minor='6', micro='16.dev1') +version_info = VersionInfo(major='2022', minor='6', micro='16.dev2') diff --git a/src/cpl_core/database/connection/__init__.py b/src/cpl_core/database/connection/__init__.py index c8d296f2..fdce501a 100644 --- a/src/cpl_core/database/connection/__init__.py +++ b/src/cpl_core/database/connection/__init__.py @@ -15,7 +15,7 @@ __title__ = 'cpl_core.database.connection' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' -__version__ = '2022.6.16.dev1' +__version__ = '2022.6.16.dev2' from collections import namedtuple @@ -24,4 +24,4 @@ from .database_connection import DatabaseConnection from .database_connection_abc import DatabaseConnectionABC VersionInfo = namedtuple('VersionInfo', 'major minor micro') -version_info = VersionInfo(major='2022', minor='6', micro='16.dev1') +version_info = VersionInfo(major='2022', minor='6', micro='16.dev2') diff --git a/src/cpl_core/database/context/__init__.py b/src/cpl_core/database/context/__init__.py index 62610129..1be8611e 100644 --- a/src/cpl_core/database/context/__init__.py +++ b/src/cpl_core/database/context/__init__.py @@ -15,7 +15,7 @@ __title__ = 'cpl_core.database.context' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' -__version__ = '2022.6.16.dev1' +__version__ = '2022.6.16.dev2' from collections import namedtuple @@ -24,4 +24,4 @@ from .database_context import DatabaseContext from .database_context_abc import DatabaseContextABC VersionInfo = namedtuple('VersionInfo', 'major minor micro') -version_info = VersionInfo(major='2022', minor='6', micro='16.dev1') +version_info = VersionInfo(major='2022', minor='6', micro='16.dev2') diff --git a/src/cpl_core/dependency_injection/__init__.py b/src/cpl_core/dependency_injection/__init__.py index 8aa55f8e..4685b513 100644 --- a/src/cpl_core/dependency_injection/__init__.py +++ b/src/cpl_core/dependency_injection/__init__.py @@ -15,7 +15,7 @@ __title__ = 'cpl_core.dependency_injection' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' -__version__ = '2022.6.16.dev1' +__version__ = '2022.6.16.dev2' from collections import namedtuple @@ -30,4 +30,4 @@ from .service_provider import ServiceProvider from .service_provider_abc import ServiceProviderABC VersionInfo = namedtuple('VersionInfo', 'major minor micro') -version_info = VersionInfo(major='2022', minor='6', micro='16.dev1') +version_info = VersionInfo(major='2022', minor='6', micro='16.dev2') diff --git a/src/cpl_core/environment/__init__.py b/src/cpl_core/environment/__init__.py index 64dedcc3..327a383e 100644 --- a/src/cpl_core/environment/__init__.py +++ b/src/cpl_core/environment/__init__.py @@ -15,7 +15,7 @@ __title__ = 'cpl_core.environment' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' -__version__ = '2022.6.16.dev1' +__version__ = '2022.6.16.dev2' from collections import namedtuple @@ -25,4 +25,4 @@ from .environment_name_enum import EnvironmentNameEnum from .application_environment import ApplicationEnvironment VersionInfo = namedtuple('VersionInfo', 'major minor micro') -version_info = VersionInfo(major='2022', minor='6', micro='16.dev1') +version_info = VersionInfo(major='2022', minor='6', micro='16.dev2') diff --git a/src/cpl_core/logging/__init__.py b/src/cpl_core/logging/__init__.py index 90a17804..e25ff2ce 100644 --- a/src/cpl_core/logging/__init__.py +++ b/src/cpl_core/logging/__init__.py @@ -15,7 +15,7 @@ __title__ = 'cpl_core.logging' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' -__version__ = '2022.6.16.dev1' +__version__ = '2022.6.16.dev2' from collections import namedtuple @@ -27,4 +27,4 @@ from .logging_settings import LoggingSettings from .logging_settings_name_enum import LoggingSettingsNameEnum VersionInfo = namedtuple('VersionInfo', 'major minor micro') -version_info = VersionInfo(major='2022', minor='6', micro='16.dev1') +version_info = VersionInfo(major='2022', minor='6', micro='16.dev2') diff --git a/src/cpl_core/mailing/__init__.py b/src/cpl_core/mailing/__init__.py index efdab56b..36170fa8 100644 --- a/src/cpl_core/mailing/__init__.py +++ b/src/cpl_core/mailing/__init__.py @@ -15,7 +15,7 @@ __title__ = 'cpl_core.mailing' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' -__version__ = '2022.6.16.dev1' +__version__ = '2022.6.16.dev2' from collections import namedtuple @@ -27,4 +27,4 @@ from .email_client_settings import EMailClientSettings from .email_client_settings_name_enum import EMailClientSettingsNameEnum VersionInfo = namedtuple('VersionInfo', 'major minor micro') -version_info = VersionInfo(major='2022', minor='6', micro='16.dev1') +version_info = VersionInfo(major='2022', minor='6', micro='16.dev2') diff --git a/src/cpl_core/pipes/__init__.py b/src/cpl_core/pipes/__init__.py index f072cfe9..11fb1b38 100644 --- a/src/cpl_core/pipes/__init__.py +++ b/src/cpl_core/pipes/__init__.py @@ -15,7 +15,7 @@ __title__ = 'cpl_core.pipes' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' -__version__ = '2022.6.16.dev1' +__version__ = '2022.6.16.dev2' from collections import namedtuple @@ -29,4 +29,4 @@ from .to_camel_case_pipe import ToCamelCasePipe from .to_snake_case_pipe import ToSnakeCasePipe VersionInfo = namedtuple('VersionInfo', 'major minor micro') -version_info = VersionInfo(major='2022', minor='6', micro='16.dev1') +version_info = VersionInfo(major='2022', minor='6', micro='16.dev2') diff --git a/src/cpl_core/time/__init__.py b/src/cpl_core/time/__init__.py index 6ddaf4a5..7f72b984 100644 --- a/src/cpl_core/time/__init__.py +++ b/src/cpl_core/time/__init__.py @@ -15,7 +15,7 @@ __title__ = 'cpl_core.time' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' -__version__ = '2022.6.16.dev1' +__version__ = '2022.6.16.dev2' from collections import namedtuple @@ -24,4 +24,4 @@ from .time_format_settings import TimeFormatSettings from .time_format_settings_names_enum import TimeFormatSettingsNamesEnum VersionInfo = namedtuple('VersionInfo', 'major minor micro') -version_info = VersionInfo(major='2022', minor='6', micro='16.dev1') +version_info = VersionInfo(major='2022', minor='6', micro='16.dev2') diff --git a/src/cpl_core/utils/__init__.py b/src/cpl_core/utils/__init__.py index f56bb280..99a83653 100644 --- a/src/cpl_core/utils/__init__.py +++ b/src/cpl_core/utils/__init__.py @@ -15,7 +15,7 @@ __title__ = 'cpl_core.utils' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' -__version__ = '2022.6.16.dev1' +__version__ = '2022.6.16.dev2' from collections import namedtuple @@ -25,4 +25,4 @@ from .string import String from .pip import Pip VersionInfo = namedtuple('VersionInfo', 'major minor micro') -version_info = VersionInfo(major='2022', minor='6', micro='16.dev1') +version_info = VersionInfo(major='2022', minor='6', micro='16.dev2') diff --git a/src/cpl_query/__init__.py b/src/cpl_query/__init__.py index dace8581..4f131b8e 100644 --- a/src/cpl_query/__init__.py +++ b/src/cpl_query/__init__.py @@ -15,11 +15,11 @@ __title__ = 'cpl_query' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' -__version__ = '2022.6.16.dev1' +__version__ = '2022.6.16.dev2' from collections import namedtuple # imports: VersionInfo = namedtuple('VersionInfo', 'major minor micro') -version_info = VersionInfo(major='2022', minor='6', micro='16.dev1') +version_info = VersionInfo(major='2022', minor='6', micro='16.dev2') diff --git a/src/cpl_query/_query/__init__.py b/src/cpl_query/_query/__init__.py index b4ba4fe2..12ad2ee9 100644 --- a/src/cpl_query/_query/__init__.py +++ b/src/cpl_query/_query/__init__.py @@ -15,11 +15,11 @@ __title__ = 'cpl_query._query' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' -__version__ = '2022.6.16.dev1' +__version__ = '2022.6.16.dev2' from collections import namedtuple # imports: VersionInfo = namedtuple('VersionInfo', 'major minor micro') -version_info = VersionInfo(major='2022', minor='6', micro='16.dev1') +version_info = VersionInfo(major='2022', minor='6', micro='16.dev2') diff --git a/src/cpl_query/cpl-query.json b/src/cpl_query/cpl-query.json index 064204ac..8ab5fe70 100644 --- a/src/cpl_query/cpl-query.json +++ b/src/cpl_query/cpl-query.json @@ -4,7 +4,7 @@ "Version": { "Major": "2022", "Minor": "6", - "Micro": "16.dev1" + "Micro": "16.dev2" }, "Author": "Sven Heidemann", "AuthorEmail": "sven.heidemann@sh-edraft.de", @@ -16,7 +16,7 @@ "LicenseName": "MIT", "LicenseDescription": "MIT, see LICENSE for more details.", "Dependencies": [ - "cpl-core>=2022.6.16.dev1" + "cpl-core>=2022.6.16.dev2" ], "PythonVersion": ">=3.10", "PythonPath": {}, diff --git a/src/cpl_query/extension/__init__.py b/src/cpl_query/extension/__init__.py index 144b1ad9..8f8e4483 100644 --- a/src/cpl_query/extension/__init__.py +++ b/src/cpl_query/extension/__init__.py @@ -15,7 +15,7 @@ __title__ = 'cpl_query.extension' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' -__version__ = '2022.6.16.dev1' +__version__ = '2022.6.16.dev2' from collections import namedtuple @@ -27,4 +27,4 @@ from .ordered_iterable_abc import OrderedIterableABC from .ordered_iterable import OrderedIterable VersionInfo = namedtuple('VersionInfo', 'major minor micro') -version_info = VersionInfo(major='2022', minor='6', micro='16.dev1') +version_info = VersionInfo(major='2022', minor='6', micro='16.dev2') diff --git a/tools/set_pip_urls/application.py b/tools/set_pip_urls/application.py index d9f2fff0..edaacff2 100644 --- a/tools/set_pip_urls/application.py +++ b/tools/set_pip_urls/application.py @@ -1,7 +1,15 @@ +import json +import os +import sys +from typing import Optional + +from cpl_core.environment import EnvironmentNameEnum + from cpl_core.application import ApplicationABC from cpl_core.configuration import ConfigurationABC from cpl_core.console import Console from cpl_core.dependency_injection import ServiceProviderABC +from set_pip_urls.pip_settings import PIPSettings class Application(ApplicationABC): @@ -9,8 +17,32 @@ class Application(ApplicationABC): def __init__(self, config: ConfigurationABC, services: ServiceProviderABC): ApplicationABC.__init__(self, config, services) + self._pip_settings: Optional[PIPSettings] = config.get_configuration(PIPSettings) + def configure(self): - pass + self._configuration.parse_console_arguments(self._services) def main(self): - Console.write_line('Hello World', self._environment.environment_name) + if self._pip_settings is None: + Console.error('appsettings.json not found') + sys.exit() + + url = None + match self._environment.environment_name: + case EnvironmentNameEnum.production.value: + url = self._pip_settings.production + case EnvironmentNameEnum.staging.value: + url = self._pip_settings.staging + case EnvironmentNameEnum.development.value: + url = self._pip_settings.development + + cli_json = { + "CLI": { + "PipPath": url + } + } + file = os.path.abspath(os.path.join(self._environment.working_directory, '../../src/cpl_cli', 'appsettings.json')) + Console.write_line(f'Writing PipPath: {url} to {file}') + with open(file, 'w') as f: + f.write(json.dumps(cli_json, indent=2)) + f.close() diff --git a/tools/set_pip_urls/pip_settings.py b/tools/set_pip_urls/pip_settings.py new file mode 100644 index 00000000..4d4c5fb4 --- /dev/null +++ b/tools/set_pip_urls/pip_settings.py @@ -0,0 +1,37 @@ +import traceback + +from cpl_core.environment.environment_name_enum import EnvironmentNameEnum + +from cpl_core.configuration.configuration_model_abc import ConfigurationModelABC +from cpl_core.console import Console + + +class PIPSettings(ConfigurationModelABC): + + def __init__(self): + ConfigurationModelABC.__init__(self) + + self._production = '' + self._staging = '' + self._development = '' + + @property + def production(self): + return self._production + + @property + def staging(self): + return self._staging + + @property + def development(self): + return self._development + + def from_dict(self, settings: dict): + try: + self._production = settings[EnvironmentNameEnum.production.value] + self._staging = settings[EnvironmentNameEnum.staging.value] + self._development = settings[EnvironmentNameEnum.development.value] + except Exception as e: + Console.error(f'[ ERROR ] [ {__name__} ]: Reading error in {self.__name__} settings') + Console.error(f'[ EXCEPTION ] [ {__name__} ]: {e} -> {traceback.format_exc()}') diff --git a/tools/set_pip_urls/set-pip-urls.json b/tools/set_pip_urls/set-pip-urls.json index a401e0f3..d8140fbb 100644 --- a/tools/set_pip_urls/set-pip-urls.json +++ b/tools/set_pip_urls/set-pip-urls.json @@ -16,7 +16,7 @@ "LicenseName": "MIT", "LicenseDescription": "MIT, see LICENSE for more details.", "Dependencies": [ - "cpl-core>=2022.6.16.dev1" + "cpl-core>=2022.6.16.dev2" ], "PythonVersion": ">=3.10.4", "PythonPath": {}, diff --git a/tools/set_pip_urls/startup.py b/tools/set_pip_urls/startup.py index 359c03d2..b8a52f78 100644 --- a/tools/set_pip_urls/startup.py +++ b/tools/set_pip_urls/startup.py @@ -10,6 +10,8 @@ class Startup(StartupABC): StartupABC.__init__(self) def configure_configuration(self, configuration: ConfigurationABC, environment: ApplicationEnvironment) -> ConfigurationABC: + configuration.add_environment_variables('CPL_') + configuration.add_json_file('appsettings.json', optional=False, output=False) return configuration def configure_services(self, services: ServiceCollectionABC, environment: ApplicationEnvironment) -> ServiceProviderABC: diff --git a/tools/set_version/set-version.json b/tools/set_version/set-version.json index cfe95b51..bb37969d 100644 --- a/tools/set_version/set-version.json +++ b/tools/set_version/set-version.json @@ -16,7 +16,7 @@ "LicenseName": "MIT", "LicenseDescription": "MIT, see LICENSE for more details.", "Dependencies": [ - "cpl-core>=2022.6.16.dev1" + "cpl-core>=2022.6.16.dev2" ], "PythonVersion": ">=3.10.4", "PythonPath": {},