Compare commits

..

No commits in common. "master" and "experimental" have entirely different histories.

79 changed files with 346 additions and 347 deletions

View File

@ -6,7 +6,7 @@ cpl-cli CPL CLI
CPL Command Line Interface
:copyright: (c) 2020 - 2024 sh-edraft.de
:copyright: (c) 2020 - 2023 sh-edraft.de
:license: MIT, see LICENSE for more details.
"""
@ -14,8 +14,8 @@ CPL Command Line Interface
__title__ = "cpl_cli"
__author__ = "Sven Heidemann"
__license__ = "MIT"
__copyright__ = "Copyright (c) 2020 - 2024 sh-edraft.de"
__version__ = "2024.10.0"
__copyright__ = "Copyright (c) 2020 - 2023 sh-edraft.de"
__version__ = "2023.4.0.post3"
from collections import namedtuple
@ -23,4 +23,4 @@ from collections import namedtuple
# imports:
VersionInfo = namedtuple("VersionInfo", "major minor micro")
version_info = VersionInfo(major="2024", minor="10", micro="0")
version_info = VersionInfo(major="2023", minor="4", micro="0.post3")

View File

@ -6,7 +6,7 @@ cpl-cli CPL CLI
CPL Command Line Interface
:copyright: (c) 2020 - 2024 sh-edraft.de
:copyright: (c) 2020 - 2023 sh-edraft.de
:license: MIT, see LICENSE for more details.
"""
@ -14,8 +14,8 @@ CPL Command Line Interface
__title__ = "cpl_cli"
__author__ = "Sven Heidemann"
__license__ = "MIT"
__copyright__ = "Copyright (c) 2020 - 2024 sh-edraft.de"
__version__ = "2024.10.0"
__copyright__ = "Copyright (c) 2020 - 2023 sh-edraft.de"
__version__ = "2023.4.0.post3"
from collections import namedtuple
@ -28,4 +28,4 @@ from .main import main
from .startup import Startup
VersionInfo = namedtuple("VersionInfo", "major minor micro")
version_info = VersionInfo(major="2024", minor="10", micro="0")
version_info = VersionInfo(major="2023", minor="4", micro="0.post3")

View File

@ -6,7 +6,7 @@ cpl-cli CPL CLI
CPL Command Line Interface
:copyright: (c) 2020 - 2024 sh-edraft.de
:copyright: (c) 2020 - 2023 sh-edraft.de
:license: MIT, see LICENSE for more details.
"""
@ -14,8 +14,8 @@ CPL Command Line Interface
__title__ = "cpl_cli._templates"
__author__ = "Sven Heidemann"
__license__ = "MIT"
__copyright__ = "Copyright (c) 2020 - 2024 sh-edraft.de"
__version__ = "2024.10.0"
__copyright__ = "Copyright (c) 2020 - 2023 sh-edraft.de"
__version__ = "2023.4.0.post3"
from collections import namedtuple
@ -23,4 +23,4 @@ from collections import namedtuple
# imports:
VersionInfo = namedtuple("VersionInfo", "major minor micro")
version_info = VersionInfo(major="2024", minor="10", micro="0")
version_info = VersionInfo(major="2023", minor="4", micro="0.post3")

View File

@ -6,7 +6,7 @@ cpl-cli CPL CLI
CPL Command Line Interface
:copyright: (c) 2020 - 2024 sh-edraft.de
:copyright: (c) 2020 - 2023 sh-edraft.de
:license: MIT, see LICENSE for more details.
"""
@ -14,8 +14,8 @@ CPL Command Line Interface
__title__ = "cpl_cli._templates.build"
__author__ = "Sven Heidemann"
__license__ = "MIT"
__copyright__ = "Copyright (c) 2020 - 2024 sh-edraft.de"
__version__ = "2024.10.0"
__copyright__ = "Copyright (c) 2020 - 2023 sh-edraft.de"
__version__ = "2023.4.0.post3"
from collections import namedtuple
@ -23,4 +23,4 @@ from collections import namedtuple
# imports:
VersionInfo = namedtuple("VersionInfo", "major minor micro")
version_info = VersionInfo(major="2024", minor="10", micro="0")
version_info = VersionInfo(major="2023", minor="4", micro="0.post3")

View File

@ -19,19 +19,19 @@ class InitTemplate:
\"\"\"
__title__ = "$Title"
__author__ = "$Author"
__license__ = "$LicenseName"
__copyright__ = "Copyright (c) $CopyrightDate $CopyrightName"
__version__ = "$Version"
__title__ = '$Title'
__author__ = '$Author'
__license__ = '$LicenseName'
__copyright__ = 'Copyright (c) $CopyrightDate $CopyrightName'
__version__ = '$Version'
from collections import namedtuple
$Imports
VersionInfo = namedtuple("VersionInfo", "major minor micro")
version_info = VersionInfo(major="$Major", minor="$Minor", micro="$Micro")
VersionInfo = namedtuple('VersionInfo', 'major minor micro')
version_info = VersionInfo(major='$Major', minor='$Minor', micro='$Micro')
"""
)

View File

@ -6,7 +6,7 @@ cpl-cli CPL CLI
CPL Command Line Interface
:copyright: (c) 2020 - 2024 sh-edraft.de
:copyright: (c) 2020 - 2023 sh-edraft.de
:license: MIT, see LICENSE for more details.
"""
@ -14,8 +14,8 @@ CPL Command Line Interface
__title__ = "cpl_cli._templates.publish"
__author__ = "Sven Heidemann"
__license__ = "MIT"
__copyright__ = "Copyright (c) 2020 - 2024 sh-edraft.de"
__version__ = "2024.10.0"
__copyright__ = "Copyright (c) 2020 - 2023 sh-edraft.de"
__version__ = "2023.4.0.post3"
from collections import namedtuple
@ -23,4 +23,4 @@ from collections import namedtuple
# imports:
VersionInfo = namedtuple("VersionInfo", "major minor micro")
version_info = VersionInfo(major="2024", minor="10", micro="0")
version_info = VersionInfo(major="2023", minor="4", micro="0.post3")

View File

@ -6,7 +6,7 @@ cpl-cli CPL CLI
CPL Command Line Interface
:copyright: (c) 2020 - 2024 sh-edraft.de
:copyright: (c) 2020 - 2023 sh-edraft.de
:license: MIT, see LICENSE for more details.
"""
@ -14,8 +14,8 @@ CPL Command Line Interface
__title__ = "cpl_cli.abc"
__author__ = "Sven Heidemann"
__license__ = "MIT"
__copyright__ = "Copyright (c) 2020 - 2024 sh-edraft.de"
__version__ = "2024.10.0"
__copyright__ = "Copyright (c) 2020 - 2023 sh-edraft.de"
__version__ = "2023.4.0.post3"
from collections import namedtuple
@ -23,4 +23,4 @@ from collections import namedtuple
# imports
VersionInfo = namedtuple("VersionInfo", "major minor micro")
version_info = VersionInfo(major="2024", minor="10", micro="0")
version_info = VersionInfo(major="2023", minor="4", micro="0.post3")

View File

@ -6,7 +6,7 @@ cpl-cli CPL CLI
CPL Command Line Interface
:copyright: (c) 2020 - 2024 sh-edraft.de
:copyright: (c) 2020 - 2023 sh-edraft.de
:license: MIT, see LICENSE for more details.
"""
@ -14,8 +14,8 @@ CPL Command Line Interface
__title__ = "cpl_cli.command"
__author__ = "Sven Heidemann"
__license__ = "MIT"
__copyright__ = "Copyright (c) 2020 - 2024 sh-edraft.de"
__version__ = "2024.10.0"
__copyright__ = "Copyright (c) 2020 - 2023 sh-edraft.de"
__version__ = "2023.4.0.post3"
from collections import namedtuple
@ -29,4 +29,4 @@ from .publish_service import PublishService
from .version_service import VersionService
VersionInfo = namedtuple("VersionInfo", "major minor micro")
version_info = VersionInfo(major="2024", minor="10", micro="0")
version_info = VersionInfo(major="2023", minor="4", micro="0.post3")

View File

@ -6,7 +6,7 @@ cpl-cli CPL CLI
CPL Command Line Interface
:copyright: (c) 2020 - 2024 sh-edraft.de
:copyright: (c) 2020 - 2023 sh-edraft.de
:license: MIT, see LICENSE for more details.
"""
@ -14,8 +14,8 @@ CPL Command Line Interface
__title__ = "cpl_cli.configuration"
__author__ = "Sven Heidemann"
__license__ = "MIT"
__copyright__ = "Copyright (c) 2020 - 2024 sh-edraft.de"
__version__ = "2024.10.0"
__copyright__ = "Copyright (c) 2020 - 2023 sh-edraft.de"
__version__ = "2023.4.0.post3"
from collections import namedtuple
@ -31,4 +31,4 @@ from .workspace_settings import WorkspaceSettings
from .workspace_settings_name_enum import WorkspaceSettingsNameEnum
VersionInfo = namedtuple("VersionInfo", "major minor micro")
version_info = VersionInfo(major="2024", minor="10", micro="0")
version_info = VersionInfo(major="2023", minor="4", micro="0.post3")

View File

@ -2,24 +2,24 @@
"ProjectSettings": {
"Name": "cpl-cli",
"Version": {
"Major": "2024",
"Minor": "7",
"Micro": "0"
"Major": "2023",
"Minor": "4",
"Micro": "0.post3"
},
"Author": "Sven Heidemann",
"AuthorEmail": "sven.heidemann@sh-edraft.de",
"Description": "CPL CLI",
"LongDescription": "CPL Command Line Interface",
"URL": "https://www.sh-edraft.de",
"CopyrightDate": "2020 - 2024",
"CopyrightDate": "2020 - 2023",
"CopyrightName": "sh-edraft.de",
"LicenseName": "MIT",
"LicenseDescription": "MIT, see LICENSE for more details.",
"Dependencies": [
"cpl-core>=2024.6.2024.07.0"
"cpl-core>=2023.4.0"
],
"DevDependencies": [],
"PythonVersion": ">=3.12",
"PythonVersion": ">=3.10",
"PythonPath": {
"linux": "../../venv"
},

View File

@ -6,7 +6,7 @@ cpl-cli CPL CLI
CPL Command Line Interface
:copyright: (c) 2020 - 2024 sh-edraft.de
:copyright: (c) 2020 - 2023 sh-edraft.de
:license: MIT, see LICENSE for more details.
"""
@ -14,8 +14,8 @@ CPL Command Line Interface
__title__ = "cpl_cli.helper"
__author__ = "Sven Heidemann"
__license__ = "MIT"
__copyright__ = "Copyright (c) 2020 - 2024 sh-edraft.de"
__version__ = "2024.10.0"
__copyright__ = "Copyright (c) 2020 - 2023 sh-edraft.de"
__version__ = "2023.4.0.post3"
from collections import namedtuple
@ -23,4 +23,4 @@ from collections import namedtuple
# imports:
VersionInfo = namedtuple("VersionInfo", "major minor micro")
version_info = VersionInfo(major="2024", minor="10", micro="0")
version_info = VersionInfo(major="2023", minor="4", micro="0.post3")

View File

@ -6,7 +6,7 @@ cpl-cli CPL CLI
CPL Command Line Interface
:copyright: (c) 2020 - 2024 sh-edraft.de
:copyright: (c) 2020 - 2023 sh-edraft.de
:license: MIT, see LICENSE for more details.
"""
@ -14,8 +14,8 @@ CPL Command Line Interface
__title__ = "cpl_cli.live_server"
__author__ = "Sven Heidemann"
__license__ = "MIT"
__copyright__ = "Copyright (c) 2020 - 2024 sh-edraft.de"
__version__ = "2024.10.0"
__copyright__ = "Copyright (c) 2020 - 2023 sh-edraft.de"
__version__ = "2023.4.0.post3"
from collections import namedtuple
@ -23,4 +23,4 @@ from collections import namedtuple
# imports:
VersionInfo = namedtuple("VersionInfo", "major minor micro")
version_info = VersionInfo(major="2024", minor="10", micro="0")
version_info = VersionInfo(major="2023", minor="4", micro="0.post3")

View File

@ -1,6 +1,7 @@
import importlib.metadata
from typing import Type
import pkg_resources
from cpl_cli.cli import CLI
from cpl_cli.startup import Startup
from cpl_cli.startup_argument_extension import StartupArgumentExtension
@ -15,12 +16,13 @@ def get_startup_extensions() -> list[Type[StartupExtensionABC]]:
blacklisted_packages = ["cpl-cli"]
startup_extensions = []
installed_packages = importlib.metadata.distributions()
installed_packages = pkg_resources.working_set
for p in installed_packages:
if not p.name.startswith("cpl-") or p.name in blacklisted_packages:
package = str(p).split(" ")[0]
if not package.startswith("cpl-") or package in blacklisted_packages:
continue
package = p.name.replace("-", "_")
package = package.replace("-", "_")
loaded_package = __import__(package)
if "__cli_startup_extension__" not in dir(loaded_package):
continue

View File

@ -6,7 +6,7 @@ cpl-cli CPL CLI
CPL Command Line Interface
:copyright: (c) 2020 - 2024 sh-edraft.de
:copyright: (c) 2020 - 2023 sh-edraft.de
:license: MIT, see LICENSE for more details.
"""
@ -14,8 +14,8 @@ CPL Command Line Interface
__title__ = "cpl_cli.migrations"
__author__ = "Sven Heidemann"
__license__ = "MIT"
__copyright__ = "Copyright (c) 2020 - 2024 sh-edraft.de"
__version__ = "2024.10.0"
__copyright__ = "Copyright (c) 2020 - 2023 sh-edraft.de"
__version__ = "2023.4.0.post3"
from collections import namedtuple
@ -23,4 +23,4 @@ from collections import namedtuple
# imports
VersionInfo = namedtuple("VersionInfo", "major minor micro")
version_info = VersionInfo(major="2024", minor="10", micro="0")
version_info = VersionInfo(major="2023", minor="4", micro="0.post3")

View File

@ -6,7 +6,7 @@ cpl-cli CPL CLI
CPL Command Line Interface
:copyright: (c) 2020 - 2024 sh-edraft.de
:copyright: (c) 2020 - 2023 sh-edraft.de
:license: MIT, see LICENSE for more details.
"""
@ -14,8 +14,8 @@ CPL Command Line Interface
__title__ = "cpl_cli.migrations.base"
__author__ = "Sven Heidemann"
__license__ = "MIT"
__copyright__ = "Copyright (c) 2020 - 2024 sh-edraft.de"
__version__ = "2024.10.0"
__copyright__ = "Copyright (c) 2020 - 2023 sh-edraft.de"
__version__ = "2023.4.0.post3"
from collections import namedtuple
@ -23,4 +23,4 @@ from collections import namedtuple
# imports:
VersionInfo = namedtuple("VersionInfo", "major minor micro")
version_info = VersionInfo(major="2024", minor="10", micro="0")
version_info = VersionInfo(major="2023", minor="4", micro="0.post3")

View File

@ -6,7 +6,7 @@ cpl-cli CPL CLI
CPL Command Line Interface
:copyright: (c) 2020 - 2024 sh-edraft.de
:copyright: (c) 2020 - 2023 sh-edraft.de
:license: MIT, see LICENSE for more details.
"""
@ -14,8 +14,8 @@ CPL Command Line Interface
__title__ = "cpl_cli.migrations.service"
__author__ = "Sven Heidemann"
__license__ = "MIT"
__copyright__ = "Copyright (c) 2020 - 2024 sh-edraft.de"
__version__ = "2024.10.0"
__copyright__ = "Copyright (c) 2020 - 2023 sh-edraft.de"
__version__ = "2023.4.0.post3"
from collections import namedtuple
@ -23,4 +23,4 @@ from collections import namedtuple
# imports:
VersionInfo = namedtuple("VersionInfo", "major minor micro")
version_info = VersionInfo(major="2024", minor="10", micro="0")
version_info = VersionInfo(major="2023", minor="4", micro="0.post3")

View File

@ -6,7 +6,7 @@ cpl-cli CPL CLI
CPL Command Line Interface
:copyright: (c) 2020 - 2024 sh-edraft.de
:copyright: (c) 2020 - 2023 sh-edraft.de
:license: MIT, see LICENSE for more details.
"""
@ -14,8 +14,8 @@ CPL Command Line Interface
__title__ = "cpl_cli.publish"
__author__ = "Sven Heidemann"
__license__ = "MIT"
__copyright__ = "Copyright (c) 2020 - 2024 sh-edraft.de"
__version__ = "2024.10.0"
__copyright__ = "Copyright (c) 2020 - 2023 sh-edraft.de"
__version__ = "2023.4.0.post3"
from collections import namedtuple
@ -25,4 +25,4 @@ from .publisher_abc import PublisherABC
from .publisher_service import PublisherService
VersionInfo = namedtuple("VersionInfo", "major minor micro")
version_info = VersionInfo(major="2024", minor="10", micro="0")
version_info = VersionInfo(major="2023", minor="4", micro="0.post3")

View File

@ -6,7 +6,7 @@ cpl-cli CPL CLI
CPL Command Line Interface
:copyright: (c) 2020 - 2024 sh-edraft.de
:copyright: (c) 2020 - 2023 sh-edraft.de
:license: MIT, see LICENSE for more details.
"""
@ -14,8 +14,8 @@ CPL Command Line Interface
__title__ = "cpl_cli.source_creator"
__author__ = "Sven Heidemann"
__license__ = "MIT"
__copyright__ = "Copyright (c) 2020 - 2024 sh-edraft.de"
__version__ = "2024.10.0"
__copyright__ = "Copyright (c) 2020 - 2023 sh-edraft.de"
__version__ = "2023.4.0.post3"
from collections import namedtuple
@ -23,4 +23,4 @@ from collections import namedtuple
# imports:
VersionInfo = namedtuple("VersionInfo", "major minor micro")
version_info = VersionInfo(major="2024", minor="10", micro="0")
version_info = VersionInfo(major="2023", minor="4", micro="0.post3")

View File

@ -28,13 +28,10 @@ class StartupArgumentExtension(StartupExtensionABC):
config.create_console_argument(
ArgumentTypeEnum.Executable, "", "add", ["a", "A"], AddService, True, validators=[WorkspaceValidator]
).add_console_argument(ArgumentTypeEnum.Flag, "--", "simulate", ["s", "S"])
config.create_console_argument(
ArgumentTypeEnum.Executable, "", "build", ["b", "B"], BuildService, True, validators=[ProjectValidator]
)
config.create_console_argument(ArgumentTypeEnum.Executable, "", "generate", ["g", "G"], GenerateService, True)
config.create_console_argument(
ArgumentTypeEnum.Executable, "", "install", ["i", "I"], InstallService, True, validators=[ProjectValidator]
).add_console_argument(ArgumentTypeEnum.Flag, "--", "dev", ["d", "D"]).add_console_argument(
@ -48,7 +45,6 @@ class StartupArgumentExtension(StartupExtensionABC):
).add_console_argument(
ArgumentTypeEnum.Flag, "--", "cpl-dev", ["cd", "CD"]
)
config.create_console_argument(
ArgumentTypeEnum.Executable, "", "new", ["n", "N"], NewService, True
).add_console_argument(ArgumentTypeEnum.Flag, "--", "async", ["a", "A"]).add_console_argument(
@ -64,23 +60,18 @@ class StartupArgumentExtension(StartupExtensionABC):
).add_console_argument(
ArgumentTypeEnum.Flag, "--", "base", ["b", "B"]
)
config.create_console_argument(
ArgumentTypeEnum.Executable, "", "publish", ["p", "P"], PublishService, True, validators=[ProjectValidator]
)
config.create_console_argument(
ArgumentTypeEnum.Executable, "", "remove", ["r", "R"], RemoveService, True, validators=[WorkspaceValidator]
).add_console_argument(ArgumentTypeEnum.Flag, "--", "simulate", ["s", "S"])
config.create_console_argument(
ArgumentTypeEnum.Executable, "", "run", [], RunService, True, validators=[ProjectValidator]
).add_console_argument(ArgumentTypeEnum.Flag, "--", "dev", ["d", "D"])
config.create_console_argument(
ArgumentTypeEnum.Executable, "", "start", ["s", "S"], StartService, True, validators=[ProjectValidator]
).add_console_argument(ArgumentTypeEnum.Flag, "--", "dev", ["d", "D"])
config.create_console_argument(
ArgumentTypeEnum.Executable,
"",
@ -94,7 +85,6 @@ class StartupArgumentExtension(StartupExtensionABC):
).add_console_argument(
ArgumentTypeEnum.Flag, "--", "simulate", ["s", "S"]
)
config.create_console_argument(
ArgumentTypeEnum.Executable, "", "update", ["u", "U"], UpdateService, True, validators=[ProjectValidator]
).add_console_argument(ArgumentTypeEnum.Flag, "--", "simulate", ["s", "S"]).add_console_argument(
@ -104,7 +94,6 @@ class StartupArgumentExtension(StartupExtensionABC):
).add_console_argument(
ArgumentTypeEnum.Flag, "--", "cpl-dev", ["cd", "CD"]
)
config.create_console_argument(ArgumentTypeEnum.Executable, "", "version", ["v", "V"], VersionService, True)
config.for_each_argument(lambda a: a.add_console_argument(ArgumentTypeEnum.Flag, "--", "help", ["h", "H"]))

View File

@ -6,7 +6,7 @@ cpl-cli CPL CLI
CPL Command Line Interface
:copyright: (c) 2020 - 2024 sh-edraft.de
:copyright: (c) 2020 - 2023 sh-edraft.de
:license: MIT, see LICENSE for more details.
"""
@ -14,8 +14,8 @@ CPL Command Line Interface
__title__ = "cpl_cli.validators"
__author__ = "Sven Heidemann"
__license__ = "MIT"
__copyright__ = "Copyright (c) 2020 - 2024 sh-edraft.de"
__version__ = "2024.10.0"
__copyright__ = "Copyright (c) 2020 - 2023 sh-edraft.de"
__version__ = "2023.4.0.post3"
from collections import namedtuple
@ -23,4 +23,4 @@ from collections import namedtuple
# imports:
VersionInfo = namedtuple("VersionInfo", "major minor micro")
version_info = VersionInfo(major="2024", minor="10", micro="0")
version_info = VersionInfo(major="2023", minor="4", micro="0.post3")

View File

@ -6,7 +6,7 @@ cpl-core CPL core
CPL core package
:copyright: (c) 2020 - 2024 sh-edraft.de
:copyright: (c) 2020 - 2023 sh-edraft.de
:license: MIT, see LICENSE for more details.
"""
@ -14,8 +14,8 @@ CPL core package
__title__ = "cpl_core"
__author__ = "Sven Heidemann"
__license__ = "MIT"
__copyright__ = "Copyright (c) 2020 - 2024 sh-edraft.de"
__version__ = "2024.6.0"
__copyright__ = "Copyright (c) 2020 - 2023 sh-edraft.de"
__version__ = "2023.4.0.post2"
from collections import namedtuple
@ -23,4 +23,4 @@ from collections import namedtuple
# imports:
VersionInfo = namedtuple("VersionInfo", "major minor micro")
version_info = VersionInfo(major="2024", minor="6", micro="0")
version_info = VersionInfo(major="2023", minor="4", micro="0.post2")

View File

@ -6,7 +6,7 @@ cpl-core CPL core
CPL core package
:copyright: (c) 2020 - 2024 sh-edraft.de
:copyright: (c) 2020 - 2023 sh-edraft.de
:license: MIT, see LICENSE for more details.
"""
@ -14,8 +14,8 @@ CPL core package
__title__ = "cpl_core.application"
__author__ = "Sven Heidemann"
__license__ = "MIT"
__copyright__ = "Copyright (c) 2020 - 2024 sh-edraft.de"
__version__ = "2024.6.0"
__copyright__ = "Copyright (c) 2020 - 2023 sh-edraft.de"
__version__ = "2023.4.0.post2"
from collections import namedtuple
@ -29,4 +29,4 @@ from .startup_abc import StartupABC
from .startup_extension_abc import StartupExtensionABC
VersionInfo = namedtuple("VersionInfo", "major minor micro")
version_info = VersionInfo(major="2024", minor="6", micro="0")
version_info = VersionInfo(major="2023", minor="4", micro="0.post2")

View File

@ -6,7 +6,7 @@ cpl-core CPL core
CPL core package
:copyright: (c) 2020 - 2024 sh-edraft.de
:copyright: (c) 2020 - 2023 sh-edraft.de
:license: MIT, see LICENSE for more details.
"""
@ -14,8 +14,8 @@ CPL core package
__title__ = "cpl_core.configuration"
__author__ = "Sven Heidemann"
__license__ = "MIT"
__copyright__ = "Copyright (c) 2020 - 2024 sh-edraft.de"
__version__ = "2024.6.0"
__copyright__ = "Copyright (c) 2020 - 2023 sh-edraft.de"
__version__ = "2023.4.0.post2"
from collections import namedtuple
@ -35,4 +35,4 @@ from .validator_abc import ValidatorABC
from .variable_argument import VariableArgument
VersionInfo = namedtuple("VersionInfo", "major minor micro")
version_info = VersionInfo(major="2024", minor="6", micro="0")
version_info = VersionInfo(major="2023", minor="4", micro="0.post2")

View File

@ -24,7 +24,7 @@ from cpl_core.dependency_injection.service_provider_abc import ServiceProviderAB
from cpl_core.environment.application_environment import ApplicationEnvironment
from cpl_core.environment.application_environment_abc import ApplicationEnvironmentABC
from cpl_core.environment.environment_name_enum import EnvironmentNameEnum
from cpl_core.type import T, R
from cpl_core.type import T
from cpl_core.utils.json_processor import JSONProcessor
@ -278,25 +278,23 @@ class Configuration(ConfigurationABC):
config_from_file = self._load_json_file(file_path, output)
for sub in ConfigurationModelABC.__subclasses__():
for key, value in config_from_file.items():
if sub.__name__ != key and sub.__name__.replace("Settings", "") != key:
continue
if sub.__name__ == key or sub.__name__.replace("Settings", "") == key:
configuration = sub()
from_dict = getattr(configuration, "from_dict", None)
configuration = sub()
from_dict = getattr(configuration, "from_dict", None)
if from_dict is not None and not hasattr(from_dict, "is_base_func"):
Console.set_foreground_color(ForegroundColorEnum.yellow)
Console.write_line(
f"{sub.__name__}.from_dict is deprecated. Instead, set attributes as typed arguments in __init__. They can be None by default!"
)
Console.color_reset()
configuration.from_dict(value)
else:
configuration = JSONProcessor.process(sub, value)
if from_dict is not None and not hasattr(from_dict, "is_base_func"):
Console.set_foreground_color(ForegroundColorEnum.yellow)
Console.write_line(
f"{sub.__name__}.from_dict is deprecated. Instead, set attributes as typed arguments in __init__. They can be None by default!"
)
Console.color_reset()
configuration.from_dict(value)
else:
configuration = JSONProcessor.process(sub, value)
self.add_configuration(sub, configuration)
self.add_configuration(sub, configuration)
def add_configuration(self, key_type: T, value: any):
def add_configuration(self, key_type: Type[T], value: any):
self._config[key_type] = value
def create_console_argument(
@ -316,7 +314,7 @@ class Configuration(ConfigurationABC):
for arg in self._argument_types:
call(arg)
def get_configuration(self, search_type: T) -> Optional[R]:
def get_configuration(self, search_type: T) -> Optional[T]:
if type(search_type) is str:
if search_type == ConfigurationVariableNameEnum.environment.value:
return self._application_environment.environment_name
@ -345,7 +343,7 @@ class Configuration(ConfigurationABC):
executables: list[ExecutableArgument] = []
self._parse_arguments(executables, arg_list, self._argument_types)
except Exception as e:
Console.error("An error occurred while parsing arguments.", traceback.format_exc())
Console.error("An error occurred while parsing arguments.")
sys.exit()
try:
@ -357,7 +355,7 @@ class Configuration(ConfigurationABC):
if exe.validators is not None:
abort = False
for validator_type in exe.validators:
validator = services.get_service(validator_type)
validator: ValidatorABC = services.get_service(validator_type)
result = validator.validate()
abort = not result
if abort:
@ -366,7 +364,7 @@ class Configuration(ConfigurationABC):
if abort:
sys.exit()
cmd = services.get_service(exe.executable_type)
cmd: ArgumentExecutableABC = services.get_service(exe.executable_type)
self._handle_pre_or_post_executables(True, exe, services)
self._set_variable("ACTIVE_EXECUTABLE", exe.name)
args = self.get_configuration("ARGS")

View File

@ -6,7 +6,7 @@ from cpl_core.configuration.configuration_model_abc import ConfigurationModelABC
from cpl_core.configuration.argument_abc import ArgumentABC
from cpl_core.configuration.argument_type_enum import ArgumentTypeEnum
from cpl_core.environment.application_environment_abc import ApplicationEnvironmentABC
from cpl_core.type import T, R
from cpl_core.type import T
class ConfigurationABC(ABC):
@ -77,11 +77,11 @@ class ConfigurationABC(ABC):
pass
@abstractmethod
def add_configuration(self, key_type: T, value: any):
def add_configuration(self, key_type: Type[T], value: any):
r"""Add configuration object
Parameter:
key_type: :class:`cpl_core.type.T`
key_type: Union[:class:`str`, :class:`type`]
Type of the value
value: any
Object of the value
@ -124,11 +124,11 @@ class ConfigurationABC(ABC):
pass
@abstractmethod
def get_configuration(self, search_type: T) -> Optional[R]:
def get_configuration(self, search_type: Type[T]) -> Optional[T]:
r"""Returns value from configuration by given type
Parameter:
search_type: :class:`cpl_core.type.T`
search_type: Union[:class:`str`, Type[:class:`cpl_core.configuration.configuration_model_abc.ConfigurationModelABC`]]
Type to search for
Returns:

View File

@ -6,7 +6,7 @@ cpl-core CPL core
CPL core package
:copyright: (c) 2020 - 2024 sh-edraft.de
:copyright: (c) 2020 - 2023 sh-edraft.de
:license: MIT, see LICENSE for more details.
"""
@ -14,8 +14,8 @@ CPL core package
__title__ = "cpl_core.console"
__author__ = "Sven Heidemann"
__license__ = "MIT"
__copyright__ = "Copyright (c) 2020 - 2024 sh-edraft.de"
__version__ = "2024.6.0"
__copyright__ = "Copyright (c) 2020 - 2023 sh-edraft.de"
__version__ = "2023.4.0.post2"
from collections import namedtuple
@ -28,4 +28,4 @@ from .foreground_color_enum import ForegroundColorEnum
from .spinner_thread import SpinnerThread
VersionInfo = namedtuple("VersionInfo", "major minor micro")
version_info = VersionInfo(major="2024", minor="6", micro="0")
version_info = VersionInfo(major="2023", minor="4", micro="0.post2")

View File

@ -2,31 +2,31 @@
"ProjectSettings": {
"Name": "cpl-core",
"Version": {
"Major": "2024",
"Minor": "7",
"Micro": "0"
"Major": "2023",
"Minor": "4",
"Micro": "0.post2"
},
"Author": "Sven Heidemann",
"AuthorEmail": "sven.heidemann@sh-edraft.de",
"Description": "CPL core",
"LongDescription": "CPL core package",
"URL": "https://www.sh-edraft.de",
"CopyrightDate": "2020 - 2024",
"CopyrightDate": "2020 - 2023",
"CopyrightName": "sh-edraft.de",
"LicenseName": "MIT",
"LicenseDescription": "MIT, see LICENSE for more details.",
"Dependencies": [
"art>=6.2",
"art>=5.9",
"colorama>=0.4.6",
"psutil>=6.0.0",
"packaging>=24.1",
"mysql-connector>=2.2.9",
"psutil>=5.9.4",
"packaging>=23.0",
"pynput>=1.7.6",
"setuptools>=70.1.0",
"setuptools>=67.6.1",
"tabulate>=0.9.0",
"termcolor>=2.4.0",
"watchdog>=4.0.1",
"wheel>=0.43.0",
"mysql-connector-python>=8.4.0"
"termcolor>=2.2.0",
"watchdog>=3.0.0",
"wheel>=0.40.0"
],
"DevDependencies": [
"Sphinx==5.0.2",
@ -36,7 +36,7 @@
"sphinx-markdown-builder==0.5.5",
"pygount==1.5.1"
],
"PythonVersion": ">=3.12",
"PythonVersion": ">=3.10",
"PythonPath": {},
"Classifiers": []
},

View File

@ -6,7 +6,7 @@ cpl-core CPL core
CPL core package
:copyright: (c) 2020 - 2024 sh-edraft.de
:copyright: (c) 2020 - 2023 sh-edraft.de
:license: MIT, see LICENSE for more details.
"""
@ -14,8 +14,8 @@ CPL core package
__title__ = "cpl_core.database"
__author__ = "Sven Heidemann"
__license__ = "MIT"
__copyright__ = "Copyright (c) 2020 - 2024 sh-edraft.de"
__version__ = "2024.6.0"
__copyright__ = "Copyright (c) 2020 - 2023 sh-edraft.de"
__version__ = "2023.4.0.post2"
from collections import namedtuple
@ -26,4 +26,4 @@ from .database_settings import DatabaseSettings
from .table_abc import TableABC
VersionInfo = namedtuple("VersionInfo", "major minor micro")
version_info = VersionInfo(major="2024", minor="6", micro="0")
version_info = VersionInfo(major="2023", minor="4", micro="0.post2")

View File

@ -6,7 +6,7 @@ cpl-core CPL core
CPL core package
:copyright: (c) 2020 - 2024 sh-edraft.de
:copyright: (c) 2020 - 2023 sh-edraft.de
:license: MIT, see LICENSE for more details.
"""
@ -14,8 +14,8 @@ CPL core package
__title__ = "cpl_core.database.connection"
__author__ = "Sven Heidemann"
__license__ = "MIT"
__copyright__ = "Copyright (c) 2020 - 2024 sh-edraft.de"
__version__ = "2024.6.0"
__copyright__ = "Copyright (c) 2020 - 2023 sh-edraft.de"
__version__ = "2023.4.0.post2"
from collections import namedtuple
@ -25,4 +25,4 @@ from .database_connection import DatabaseConnection
from .database_connection_abc import DatabaseConnectionABC
VersionInfo = namedtuple("VersionInfo", "major minor micro")
version_info = VersionInfo(major="2024", minor="6", micro="0")
version_info = VersionInfo(major="2023", minor="4", micro="0.post2")

View File

@ -1,12 +1,11 @@
from typing import Optional
import mysql.connector as sql
from mysql.connector.abstracts import MySQLConnectionAbstract
from mysql.connector.cursor import MySQLCursorBuffered
from cpl_core.database.connection.database_connection_abc import DatabaseConnectionABC
from cpl_core.database.database_settings import DatabaseSettings
from cpl_core.utils.credential_manager import CredentialManager
from mysql.connector.abstracts import MySQLConnectionAbstract
from mysql.connector.cursor import MySQLCursorBuffered
class DatabaseConnection(DatabaseConnectionABC):
@ -26,29 +25,27 @@ class DatabaseConnection(DatabaseConnectionABC):
def cursor(self) -> MySQLCursorBuffered:
return self._cursor
def connect(self, settings: DatabaseSettings):
def connect(self, database_settings: DatabaseSettings):
connection = sql.connect(
host=settings.host,
port=settings.port,
user=settings.user,
passwd=CredentialManager.decrypt(settings.password),
charset=settings.charset,
use_unicode=settings.use_unicode,
buffered=settings.buffered,
auth_plugin=settings.auth_plugin,
ssl_disabled=settings.ssl_disabled,
host=database_settings.host,
port=database_settings.port,
user=database_settings.user,
passwd=CredentialManager.decrypt(database_settings.password),
charset=database_settings.charset,
use_unicode=database_settings.use_unicode,
buffered=database_settings.buffered,
auth_plugin=database_settings.auth_plugin,
)
connection.cursor().execute(f"CREATE DATABASE IF NOT EXISTS `{settings.database}`;")
connection.cursor().execute(f"CREATE DATABASE IF NOT EXISTS `{database_settings.database}`;")
self._database = sql.connect(
host=settings.host,
port=settings.port,
user=settings.user,
passwd=CredentialManager.decrypt(settings.password),
db=settings.database,
charset=settings.charset,
use_unicode=settings.use_unicode,
buffered=settings.buffered,
auth_plugin=settings.auth_plugin,
ssl_disabled=settings.ssl_disabled,
host=database_settings.host,
port=database_settings.port,
user=database_settings.user,
passwd=CredentialManager.decrypt(database_settings.password),
db=database_settings.database,
charset=database_settings.charset,
use_unicode=database_settings.use_unicode,
buffered=database_settings.buffered,
auth_plugin=database_settings.auth_plugin,
)
self._cursor = self._database.cursor()

View File

@ -6,7 +6,7 @@ cpl-core CPL core
CPL core package
:copyright: (c) 2020 - 2024 sh-edraft.de
:copyright: (c) 2020 - 2023 sh-edraft.de
:license: MIT, see LICENSE for more details.
"""
@ -14,8 +14,8 @@ CPL core package
__title__ = "cpl_core.database.context"
__author__ = "Sven Heidemann"
__license__ = "MIT"
__copyright__ = "Copyright (c) 2020 - 2024 sh-edraft.de"
__version__ = "2024.6.0"
__copyright__ = "Copyright (c) 2020 - 2023 sh-edraft.de"
__version__ = "2023.4.0.post2"
from collections import namedtuple
@ -25,4 +25,4 @@ from .database_context import DatabaseContext
from .database_context_abc import DatabaseContextABC
VersionInfo = namedtuple("VersionInfo", "major minor micro")
version_info = VersionInfo(major="2024", minor="6", micro="0")
version_info = VersionInfo(major="2023", minor="4", micro="0.post2")

View File

@ -21,6 +21,7 @@ class DatabaseContext(DatabaseContextABC):
DatabaseContextABC.__init__(self)
self._db: DatabaseConnectionABC = DatabaseConnection()
self._tables: list[TableABC] = TableABC.__subclasses__()
self._settings: Optional[DatabaseSettings] = None
@property
@ -31,7 +32,7 @@ class DatabaseContext(DatabaseContextABC):
def _ping_and_reconnect(self):
try:
self._db.server.ping(reconnect=True, attempts=3, delay=5)
except Exception as err:
except mysql.connector.Error as err:
# reconnect your cursor as you did in __init__ or wherever
if self._settings is None:
raise Exception("Call DatabaseContext.connect first")
@ -41,6 +42,8 @@ class DatabaseContext(DatabaseContextABC):
if self._settings is None:
self._settings = database_settings
self._db.connect(database_settings)
for table in self._tables:
self._db.cursor.execute(table.get_create_string())
self.save_changes()

View File

@ -13,11 +13,10 @@ class DatabaseSettings(ConfigurationModelABC):
user: str = None,
password: str = None,
database: str = None,
charset: str = "utf8mb4",
use_unicode: bool = False,
buffered: bool = False,
auth_plugin: str = "caching_sha2_password",
ssl_disabled: bool = False,
charset: str = None,
use_unicode: bool = None,
buffered: bool = None,
auth_plugin: str = None,
):
ConfigurationModelABC.__init__(self)
@ -25,12 +24,11 @@ class DatabaseSettings(ConfigurationModelABC):
self._port: Optional[int] = port
self._user: Optional[str] = user
self._password: Optional[str] = password
self._database: Optional[str] = database
self._databse: Optional[str] = database
self._charset: Optional[str] = charset
self._use_unicode: Optional[bool] = use_unicode
self._buffered: Optional[bool] = buffered
self._auth_plugin: Optional[str] = auth_plugin
self._ssl_disabled: Optional[bool] = ssl_disabled
@property
def host(self) -> Optional[str]:
@ -50,7 +48,7 @@ class DatabaseSettings(ConfigurationModelABC):
@property
def database(self) -> Optional[str]:
return self._database
return self._databse
@property
def charset(self) -> Optional[str]:
@ -67,7 +65,3 @@ class DatabaseSettings(ConfigurationModelABC):
@property
def auth_plugin(self) -> Optional[str]:
return self._auth_plugin
@property
def ssl_disabled(self) -> Optional[bool]:
return self._ssl_disabled

View File

@ -6,7 +6,7 @@ cpl-core CPL core
CPL core package
:copyright: (c) 2020 - 2024 sh-edraft.de
:copyright: (c) 2020 - 2023 sh-edraft.de
:license: MIT, see LICENSE for more details.
"""
@ -14,8 +14,8 @@ CPL core package
__title__ = "cpl_core.dependency_injection"
__author__ = "Sven Heidemann"
__license__ = "MIT"
__copyright__ = "Copyright (c) 2020 - 2024 sh-edraft.de"
__version__ = "2024.6.0"
__copyright__ = "Copyright (c) 2020 - 2023 sh-edraft.de"
__version__ = "2023.4.0.post2"
from collections import namedtuple
@ -31,4 +31,4 @@ from .service_provider import ServiceProvider
from .service_provider_abc import ServiceProviderABC
VersionInfo = namedtuple("VersionInfo", "major minor micro")
version_info = VersionInfo(major="2024", minor="6", micro="0")
version_info = VersionInfo(major="2023", minor="4", micro="0.post2")

View File

@ -61,15 +61,15 @@ class ServiceCollection(ServiceCollectionABC):
self.add_transient(PipeABC, pipe)
return self
def add_singleton(self, service_type: T, service: T = None):
def add_singleton(self, service_type: Type[T], service: T = None):
self._add_descriptor_by_lifetime(service_type, ServiceLifetimeEnum.singleton, service)
return self
def add_scoped(self, service_type: T, service: T = None):
def add_scoped(self, service_type: Type[T], service: Callable = None):
self._add_descriptor_by_lifetime(service_type, ServiceLifetimeEnum.scoped, service)
return self
def add_transient(self, service_type: T, service: T = None):
def add_transient(self, service_type: Type[T], service: T = None):
self._add_descriptor_by_lifetime(service_type, ServiceLifetimeEnum.transient, service)
return self

View File

@ -46,7 +46,7 @@ class ServiceCollectionABC(ABC):
pass
@abstractmethod
def add_transient(self, service_type: T, service: T = None) -> "ServiceCollectionABC":
def add_transient(self, service_type: Type[T], service: T = None) -> "ServiceCollectionABC":
r"""Adds a service with transient lifetime
Parameter:
@ -61,7 +61,7 @@ class ServiceCollectionABC(ABC):
pass
@abstractmethod
def add_scoped(self, service_type: T, service: T = None) -> "ServiceCollectionABC":
def add_scoped(self, service_type: Type[T], service: T = None) -> "ServiceCollectionABC":
r"""Adds a service with scoped lifetime
Parameter:
@ -76,7 +76,7 @@ class ServiceCollectionABC(ABC):
pass
@abstractmethod
def add_singleton(self, service_type: T, service: T = None) -> "ServiceCollectionABC":
def add_singleton(self, service_type: Type[T], service: T = None) -> "ServiceCollectionABC":
r"""Adds a service with singleton lifetime
Parameter:

View File

@ -12,7 +12,7 @@ from cpl_core.dependency_injection.service_descriptor import ServiceDescriptor
from cpl_core.dependency_injection.service_lifetime_enum import ServiceLifetimeEnum
from cpl_core.dependency_injection.service_provider_abc import ServiceProviderABC
from cpl_core.environment.application_environment_abc import ApplicationEnvironmentABC
from cpl_core.type import T, R
from cpl_core.type import T
class ServiceProvider(ServiceProviderABC):
@ -80,7 +80,7 @@ class ServiceProvider(ServiceProviderABC):
return implementations
def build_by_signature(self, sig: Signature) -> list[R]:
def build_by_signature(self, sig: Signature) -> list[T]:
params = []
for param in sig.parameters.items():
parameter = param[1]
@ -138,7 +138,7 @@ class ServiceProvider(ServiceProviderABC):
sb = ScopeBuilder(ServiceProvider(descriptors, self._configuration, self._database_context))
return sb.build()
def get_service(self, service_type: T, *args, **kwargs) -> Optional[R]:
def get_service(self, service_type: typing.Type[T], *args, **kwargs) -> Optional[T]:
result = self._find_service(service_type)
if result is None:
@ -157,12 +157,12 @@ class ServiceProvider(ServiceProviderABC):
return implementation
def get_services(self, service_type: T, *args, **kwargs) -> list[Optional[R]]:
def get_services(self, service_type: typing.Type[T], *args, **kwargs) -> list[Optional[T]]:
implementations = []
if typing.get_origin(service_type) == list:
raise Exception(f"Invalid type {service_type}! Expected single type not list of type")
if typing.get_origin(service_type) != list:
raise Exception(f"Invalid type {service_type}! Expected list of type")
implementations.extend(self._get_services(service_type))
implementations.extend(self._get_services(typing.get_args(service_type)[0]))
return implementations

View File

@ -4,7 +4,7 @@ from inspect import Signature, signature
from typing import Optional, Type
from cpl_core.dependency_injection.scope_abc import ScopeABC
from cpl_core.type import T, R
from cpl_core.type import T
class ServiceProviderABC(ABC):
@ -21,7 +21,7 @@ class ServiceProviderABC(ABC):
cls._provider = provider
@abstractmethod
def build_by_signature(self, sig: Signature) -> list[R]:
def build_by_signature(self, sig: Signature) -> list[T]:
pass
@abstractmethod
@ -61,7 +61,7 @@ class ServiceProviderABC(ABC):
pass
@abstractmethod
def get_service(self, instance_type: T, *args, **kwargs) -> Optional[R]:
def get_service(self, instance_type: Type[T], *args, **kwargs) -> Optional[T]:
r"""Returns instance of given type
Parameter
@ -76,12 +76,12 @@ class ServiceProviderABC(ABC):
pass
@abstractmethod
def get_services(self, service_type: T, *args, **kwargs) -> list[Optional[R]]:
def get_services(self, service_type: Type[T], *args, **kwargs) -> list[Optional[T]]:
r"""Returns instance of given type
Parameter
---------
service_type: :class:`cpl_core.type.T`
instance_type: :class:`cpl_core.type.T`
The type of the searched instance
Returns

View File

@ -6,7 +6,7 @@ cpl-core CPL core
CPL core package
:copyright: (c) 2020 - 2024 sh-edraft.de
:copyright: (c) 2020 - 2023 sh-edraft.de
:license: MIT, see LICENSE for more details.
"""
@ -14,8 +14,8 @@ CPL core package
__title__ = "cpl_core.environment"
__author__ = "Sven Heidemann"
__license__ = "MIT"
__copyright__ = "Copyright (c) 2020 - 2024 sh-edraft.de"
__version__ = "2024.6.0"
__copyright__ = "Copyright (c) 2020 - 2023 sh-edraft.de"
__version__ = "2023.4.0.post2"
from collections import namedtuple
@ -26,4 +26,4 @@ from .environment_name_enum import EnvironmentNameEnum
from .application_environment import ApplicationEnvironment
VersionInfo = namedtuple("VersionInfo", "major minor micro")
version_info = VersionInfo(major="2024", minor="6", micro="0")
version_info = VersionInfo(major="2023", minor="4", micro="0.post2")

View File

@ -6,7 +6,7 @@ cpl-core CPL core
CPL core package
:copyright: (c) 2020 - 2024 sh-edraft.de
:copyright: (c) 2020 - 2023 sh-edraft.de
:license: MIT, see LICENSE for more details.
"""
@ -14,8 +14,8 @@ CPL core package
__title__ = "cpl_core.logging"
__author__ = "Sven Heidemann"
__license__ = "MIT"
__copyright__ = "Copyright (c) 2020 - 2024 sh-edraft.de"
__version__ = "2024.6.0"
__copyright__ = "Copyright (c) 2020 - 2023 sh-edraft.de"
__version__ = "2023.4.0.post2"
from collections import namedtuple
@ -28,4 +28,4 @@ from .logging_settings import LoggingSettings
from .logging_settings_name_enum import LoggingSettingsNameEnum
VersionInfo = namedtuple("VersionInfo", "major minor micro")
version_info = VersionInfo(major="2024", minor="6", micro="0")
version_info = VersionInfo(major="2023", minor="4", micro="0.post2")

View File

@ -6,7 +6,7 @@ cpl-core CPL core
CPL core package
:copyright: (c) 2020 - 2024 sh-edraft.de
:copyright: (c) 2020 - 2023 sh-edraft.de
:license: MIT, see LICENSE for more details.
"""
@ -14,8 +14,8 @@ CPL core package
__title__ = "cpl_core.mailing"
__author__ = "Sven Heidemann"
__license__ = "MIT"
__copyright__ = "Copyright (c) 2020 - 2024 sh-edraft.de"
__version__ = "2024.6.0"
__copyright__ = "Copyright (c) 2020 - 2023 sh-edraft.de"
__version__ = "2023.4.0.post2"
from collections import namedtuple
@ -28,4 +28,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="2024", minor="6", micro="0")
version_info = VersionInfo(major="2023", minor="4", micro="0.post2")

View File

@ -6,7 +6,7 @@ cpl-core CPL core
CPL core package
:copyright: (c) 2020 - 2024 sh-edraft.de
:copyright: (c) 2020 - 2023 sh-edraft.de
:license: MIT, see LICENSE for more details.
"""
@ -14,8 +14,8 @@ CPL core package
__title__ = "cpl_core.pipes"
__author__ = "Sven Heidemann"
__license__ = "MIT"
__copyright__ = "Copyright (c) 2020 - 2024 sh-edraft.de"
__version__ = "2024.6.0"
__copyright__ = "Copyright (c) 2020 - 2023 sh-edraft.de"
__version__ = "2023.4.0.post2"
from collections import namedtuple
@ -26,4 +26,4 @@ from .ip_address_pipe import IPAddressPipe
from .pipe_abc import PipeABC
VersionInfo = namedtuple("VersionInfo", "major minor micro")
version_info = VersionInfo(major="2024", minor="6", micro="0")
version_info = VersionInfo(major="2023", minor="4", micro="0.post2")

View File

@ -6,7 +6,7 @@ cpl-core CPL core
CPL core package
:copyright: (c) 2020 - 2024 sh-edraft.de
:copyright: (c) 2020 - 2023 sh-edraft.de
:license: MIT, see LICENSE for more details.
"""
@ -14,8 +14,8 @@ CPL core package
__title__ = "cpl_core.time"
__author__ = "Sven Heidemann"
__license__ = "MIT"
__copyright__ = "Copyright (c) 2020 - 2024 sh-edraft.de"
__version__ = "2024.6.0"
__copyright__ = "Copyright (c) 2020 - 2023 sh-edraft.de"
__version__ = "2023.4.0.post2"
from collections import namedtuple
@ -25,4 +25,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="2024", minor="6", micro="0")
version_info = VersionInfo(major="2023", minor="4", micro="0.post2")

View File

@ -1,4 +1,3 @@
from typing import TypeVar
T = TypeVar("T")
R = TypeVar("R")

View File

@ -6,7 +6,7 @@ cpl-core CPL core
CPL core package
:copyright: (c) 2020 - 2024 sh-edraft.de
:copyright: (c) 2020 - 2023 sh-edraft.de
:license: MIT, see LICENSE for more details.
"""
@ -14,8 +14,8 @@ CPL core package
__title__ = "cpl_core.utils"
__author__ = "Sven Heidemann"
__license__ = "MIT"
__copyright__ = "Copyright (c) 2020 - 2024 sh-edraft.de"
__version__ = "2024.6.0"
__copyright__ = "Copyright (c) 2020 - 2023 sh-edraft.de"
__version__ = "2023.4.0.post2"
from collections import namedtuple
@ -26,4 +26,4 @@ from .string import String
from .pip import Pip
VersionInfo = namedtuple("VersionInfo", "major minor micro")
version_info = VersionInfo(major="2024", minor="6", micro="0")
version_info = VersionInfo(major="2023", minor="4", micro="0.post2")

View File

@ -8,7 +8,6 @@ class JSONProcessor:
@staticmethod
def process(_t: type, values: dict) -> object:
args = []
kwargs = {}
sig = signature(_t.__init__)
for param in sig.parameters.items():
@ -22,13 +21,10 @@ class JSONProcessor:
value = ""
if name in values:
value = values[name]
values.pop(name)
elif name_first_lower in values:
value = values[name_first_lower]
values.pop(name_first_lower)
else:
value = values[name.upper()]
values.pop(name.upper())
if isinstance(value, dict) and not issubclass(parameter.annotation, dict):
value = JSONProcessor.process(parameter.annotation, value)
@ -41,13 +37,10 @@ class JSONProcessor:
args.append(value)
elif parameter.name == "kwargs" and parameter.annotation == dict:
kwargs = values
elif parameter.default != Parameter.empty:
args.append(parameter.default)
else:
args.append(None)
return _t(*args, **kwargs)
return _t(*args)

View File

@ -15,7 +15,7 @@ __title__ = "cpl_discord"
__author__ = "Sven Heidemann"
__license__ = "MIT"
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
__version__ = "2023.10.0.post1"
__version__ = "2023.4.0.post3"
from collections import namedtuple
@ -23,4 +23,4 @@ from collections import namedtuple
# imports:
VersionInfo = namedtuple("VersionInfo", "major minor micro")
version_info = VersionInfo(major="2023", minor="10", micro="0.post1")
version_info = VersionInfo(major="2023", minor="4", micro="0.post3")

View File

@ -15,7 +15,7 @@ __title__ = "cpl_discord"
__author__ = "Sven Heidemann"
__license__ = "MIT"
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
__version__ = "2023.10.0.post1"
__version__ = "2023.4.0.post3"
from collections import namedtuple
@ -59,4 +59,4 @@ def get_discord_collection(services: "ServiceCollectionABC") -> "DiscordCollecti
# build-ignore-end
VersionInfo = namedtuple("VersionInfo", "major minor micro")
version_info = VersionInfo(major="2023", minor="10", micro="0.post1")
version_info = VersionInfo(major="2023", minor="4", micro="0.post3")

View File

@ -15,7 +15,7 @@ __title__ = "cpl_discord.application"
__author__ = "Sven Heidemann"
__license__ = "MIT"
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
__version__ = "2023.10.0.post1"
__version__ = "2023.4.0.post3"
from collections import namedtuple
@ -24,4 +24,4 @@ from collections import namedtuple
from .discord_bot_application_abc import DiscordBotApplicationABC
VersionInfo = namedtuple("VersionInfo", "major minor micro")
version_info = VersionInfo(major="2023", minor="10", micro="0.post1")
version_info = VersionInfo(major="2023", minor="4", micro="0.post3")

View File

@ -15,7 +15,7 @@ __title__ = "cpl_discord.command"
__author__ = "Sven Heidemann"
__license__ = "MIT"
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
__version__ = "2023.10.0.post1"
__version__ = "2023.4.0.post3"
from collections import namedtuple
@ -25,4 +25,4 @@ from .discord_command_abc import DiscordCommandABC
from .discord_commands_meta import DiscordCogMeta
VersionInfo = namedtuple("VersionInfo", "major minor micro")
version_info = VersionInfo(major="2023", minor="10", micro="0.post1")
version_info = VersionInfo(major="2023", minor="4", micro="0.post3")

View File

@ -15,7 +15,7 @@ __title__ = "cpl_discord.configuration"
__author__ = "Sven Heidemann"
__license__ = "MIT"
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
__version__ = "2023.10.0.post1"
__version__ = "2023.4.0.post3"
from collections import namedtuple
@ -24,4 +24,4 @@ from collections import namedtuple
from .discord_bot_settings import DiscordBotSettings
VersionInfo = namedtuple("VersionInfo", "major minor micro")
version_info = VersionInfo(major="2023", minor="10", micro="0.post1")
version_info = VersionInfo(major="2023", minor="4", micro="0.post3")

View File

@ -15,7 +15,7 @@ __title__ = "cpl_discord.container"
__author__ = "Sven Heidemann"
__license__ = "MIT"
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
__version__ = "2023.10.0.post1"
__version__ = "2023.4.0.post3"
from collections import namedtuple
@ -31,4 +31,4 @@ from .thread import Thread
from .voice_channel import VoiceChannel
VersionInfo = namedtuple("VersionInfo", "major minor micro")
version_info = VersionInfo(major="2023", minor="10", micro="0.post1")
version_info = VersionInfo(major="2023", minor="4", micro="0.post3")

View File

@ -2,9 +2,9 @@
"ProjectSettings": {
"Name": "cpl-discord",
"Version": {
"Major": "2024",
"Minor": "7",
"Micro": "0"
"Major": "2023",
"Minor": "4",
"Micro": "0.post3"
},
"Author": "Sven Heidemann",
"AuthorEmail": "sven.heidemann@sh-edraft.de",
@ -16,12 +16,12 @@
"LicenseName": "MIT",
"LicenseDescription": "MIT, see LICENSE for more details.",
"Dependencies": [
"cpl-core>=2024.6.2024.07.0",
"discord.py>=2.3.2",
"cpl-query>=2024.6.2024.07.0"
"cpl-core>=2023.4.0.post2",
"discord.py>=2.3.0",
"cpl-query>=2023.4.0.post1"
],
"DevDependencies": [
"cpl-cli>=2024.6.2024.07.0"
"cpl-cli>=2023.4.0.post3"
],
"PythonVersion": ">=3.10",
"PythonPath": {},

View File

@ -15,7 +15,7 @@ __title__ = "cpl_discord.events"
__author__ = "Sven Heidemann"
__license__ = "MIT"
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
__version__ = "2023.10.0.post1"
__version__ = "2023.4.0.post3"
from collections import namedtuple
@ -69,4 +69,4 @@ from .on_voice_state_update_abc import OnVoiceStateUpdateABC
from .on_webhooks_update_abc import OnWebhooksUpdateABC
VersionInfo = namedtuple("VersionInfo", "major minor micro")
version_info = VersionInfo(major="2023", minor="10", micro="0.post1")
version_info = VersionInfo(major="2023", minor="4", micro="0.post3")

View File

@ -15,7 +15,7 @@ __title__ = "cpl_discord.helper"
__author__ = "Sven Heidemann"
__license__ = "MIT"
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
__version__ = "2023.10.0.post1"
__version__ = "2023.4.0.post3"
from collections import namedtuple
@ -24,4 +24,4 @@ from collections import namedtuple
from .to_containers_converter import ToContainersConverter
VersionInfo = namedtuple("VersionInfo", "major minor micro")
version_info = VersionInfo(major="2023", minor="10", micro="0.post1")
version_info = VersionInfo(major="2023", minor="4", micro="0.post3")

View File

@ -15,7 +15,7 @@ __title__ = "cpl_discord.service"
__author__ = "Sven Heidemann"
__license__ = "MIT"
__copyright__ = "Copyright (c) 2022 - 2023 sh-edraft.de"
__version__ = "2023.10.0.post1"
__version__ = "2023.4.0.post3"
from collections import namedtuple
@ -29,4 +29,4 @@ from .discord_service import DiscordService
from .discord_service_abc import DiscordServiceABC
VersionInfo = namedtuple("VersionInfo", "major minor micro")
version_info = VersionInfo(major="2023", minor="10", micro="0.post1")
version_info = VersionInfo(major="2023", minor="4", micro="0.post3")

View File

@ -1,11 +1,11 @@
from typing import Type
from typing import Type, Optional
from cpl_core.console import Console, ForegroundColorEnum
from cpl_core.dependency_injection import ServiceCollectionABC
from cpl_discord.command.discord_command_abc import DiscordCommandABC
from cpl_discord.discord_event_types_enum import DiscordEventTypesEnum
from cpl_discord.service.command_error_handler_service import CommandErrorHandlerService
from cpl_discord.service.discord_collection_abc import DiscordCollectionABC
from cpl_query.extension.list import List
class DiscordCollection(DiscordCollectionABC):
@ -13,21 +13,26 @@ class DiscordCollection(DiscordCollectionABC):
DiscordCollectionABC.__init__(self)
self._services = service_collection
self._events: dict[str, List] = {}
self._commands = List(type(DiscordCommandABC))
self._services.add_transient(DiscordEventTypesEnum.on_command_error.value, CommandErrorHandlerService)
self.add_event(DiscordEventTypesEnum.on_command_error.value, CommandErrorHandlerService)
def add_command(self, _t: Type[DiscordCommandABC]):
Console.set_foreground_color(ForegroundColorEnum.yellow)
Console.write_line(
f"{type(self).__name__}.add_command is deprecated. Instead, use ServiceCollection.add_transient directly!"
)
Console.color_reset()
self._services.add_transient(DiscordCommandABC, _t)
self._commands.append(_t)
def get_commands(self) -> List[DiscordCommandABC]:
return self._commands
def add_event(self, _t_event: Type, _t: Type):
Console.set_foreground_color(ForegroundColorEnum.yellow)
Console.write_line(
f"{type(self).__name__}.add_event is deprecated. Instead, use ServiceCollection.add_transient directly!"
)
Console.color_reset()
self._services.add_transient(_t_event, _t)
if _t_event not in self._events:
self._events[_t_event] = List(type(_t_event))
self._events[_t_event].append(_t)
def get_events_by_base(self, _t_event: Type) -> Optional[List]:
if _t_event not in self._events:
return None
return self._events[_t_event]

View File

@ -13,6 +13,14 @@ class DiscordCollectionABC(ABC):
def add_command(self, _t: Type[DiscordCommandABC]):
pass
@abstractmethod
def get_commands(self) -> List[DiscordCommandABC]:
pass
@abstractmethod
def add_event(self, _t_event: Type, _t: Type):
pass
@abstractmethod
def get_events_by_base(self, _t_event: Type):
pass

View File

@ -4,12 +4,11 @@ from typing import Optional, Sequence, Union, Type
import discord
from discord import RawReactionActionEvent
from discord.ext import commands
from discord.ext.commands import Context, CommandError, Cog
from discord.ext.commands import Context, CommandError, Cog, Command
from cpl_core.dependency_injection import ServiceProviderABC
from cpl_core.logging import LoggerABC
from cpl_core.utils import String
from cpl_discord.command import DiscordCommandABC
from cpl_discord.command.discord_commands_meta import DiscordCogMeta
from cpl_discord.events.on_bulk_message_delete_abc import OnBulkMessageDeleteABC
from cpl_discord.events.on_command_abc import OnCommandABC
@ -67,17 +66,25 @@ from cpl_discord.events.on_typing_abc import OnTypingABC
from cpl_discord.events.on_user_update_abc import OnUserUpdateABC
from cpl_discord.events.on_voice_state_update_abc import OnVoiceStateUpdateABC
from cpl_discord.events.on_webhooks_update_abc import OnWebhooksUpdateABC
from cpl_discord.service.discord_collection_abc import DiscordCollectionABC
from cpl_discord.service.discord_service_abc import DiscordServiceABC
class DiscordService(DiscordServiceABC, commands.Cog, metaclass=DiscordCogMeta):
def __init__(self, logger: LoggerABC, services: ServiceProviderABC):
def __init__(self, logger: LoggerABC, dc_collection: DiscordCollectionABC, services: ServiceProviderABC):
DiscordServiceABC.__init__(self)
self._logger = logger
self._collection = dc_collection
self._services = services
async def _handle_event(self, event: Type, *args, **kwargs):
for event_instance in self._services.get_services(event):
event_collection = self._collection.get_events_by_base(event)
if event_collection is None:
return
for event_type in event_collection:
event_instance = self._services.get_service(event_type)
func_name = event.__name__
if func_name.endswith("ABC"):
func_name = func_name.replace("ABC", "")
@ -97,10 +104,11 @@ class DiscordService(DiscordServiceABC, commands.Cog, metaclass=DiscordCogMeta):
self._logger.error(__name__, f"{type(self).__name__} initialization failed", e)
try:
for command in self._services.get_services(DiscordCommandABC):
self._logger.trace(__name__, f"Register command {type(command).__name__}")
for command_type in self._collection.get_commands():
self._logger.trace(__name__, f"Register command {command_type.__name__}")
command: Cog = self._services.get_service(command_type)
if command is None:
self._logger.warn(__name__, f"Instance of {type(command).__name__} not found")
self._logger.warn(__name__, f"Instance of {command_type.__name__} not found")
continue
await bot.add_cog(command)
except Exception as e:

View File

@ -15,7 +15,7 @@ __title__ = "cpl_query"
__author__ = "Sven Heidemann"
__license__ = "MIT"
__copyright__ = "Copyright (c) 2021 - 2023 sh-edraft.de"
__version__ = "2023.10.0"
__version__ = "2023.4.0.post1"
from collections import namedtuple
@ -23,4 +23,4 @@ from collections import namedtuple
# imports:
VersionInfo = namedtuple("VersionInfo", "major minor micro")
version_info = VersionInfo(major="2023", minor="10", micro="0")
version_info = VersionInfo(major="2023", minor="4", micro="0.post1")

View File

@ -15,7 +15,7 @@ __title__ = "cpl_query.base"
__author__ = "Sven Heidemann"
__license__ = "MIT"
__copyright__ = "Copyright (c) 2021 - 2023 sh-edraft.de"
__version__ = "2023.10.0"
__version__ = "2023.4.0.post1"
from collections import namedtuple
@ -28,4 +28,4 @@ from .queryable_abc import QueryableABC
from .sequence import Sequence
VersionInfo = namedtuple("VersionInfo", "major minor micro")
version_info = VersionInfo(major="2023", minor="10", micro="0")
version_info = VersionInfo(major="2023", minor="4", micro="0.post1")

View File

@ -2,9 +2,9 @@
"ProjectSettings": {
"Name": "cpl-query",
"Version": {
"Major": "2024",
"Minor": "7",
"Micro": "0"
"Major": "2023",
"Minor": "4",
"Micro": "0.post1"
},
"Author": "Sven Heidemann",
"AuthorEmail": "sven.heidemann@sh-edraft.de",

View File

@ -15,7 +15,7 @@ __title__ = "cpl_query.enumerable"
__author__ = "Sven Heidemann"
__license__ = "MIT"
__copyright__ = "Copyright (c) 2021 - 2023 sh-edraft.de"
__version__ = "2023.10.0"
__version__ = "2023.4.0.post1"
from collections import namedtuple
@ -25,4 +25,4 @@ from .enumerable import Enumerable
from .enumerable_abc import EnumerableABC
VersionInfo = namedtuple("VersionInfo", "major minor micro")
version_info = VersionInfo(major="2023", minor="10", micro="0")
version_info = VersionInfo(major="2023", minor="4", micro="0.post1")

View File

@ -15,7 +15,7 @@ __title__ = "cpl_query.extension"
__author__ = "Sven Heidemann"
__license__ = "MIT"
__copyright__ = "Copyright (c) 2021 - 2023 sh-edraft.de"
__version__ = "2023.10.0"
__version__ = "2023.4.0.post1"
from collections import namedtuple
@ -24,4 +24,4 @@ from collections import namedtuple
from .list import List
VersionInfo = namedtuple("VersionInfo", "major minor micro")
version_info = VersionInfo(major="2023", minor="10", micro="0")
version_info = VersionInfo(major="2023", minor="4", micro="0.post1")

View File

@ -1,10 +1,12 @@
from typing import Iterator
from cpl_query.iterable.iterable import Iterable
class List(Iterable):
r"""Implementation of :class: `cpl_query.extension.iterable.Iterable`"""
def __init__(self, t: type = None, values: Iterable = None):
def __init__(self, t: type = None, values: Iterator = None):
Iterable.__init__(self, t, values)
def __getitem__(self, *args):

View File

@ -15,7 +15,7 @@ __title__ = "cpl_query.iterable"
__author__ = "Sven Heidemann"
__license__ = "MIT"
__copyright__ = "Copyright (c) 2021 - 2023 sh-edraft.de"
__version__ = "2023.10.0"
__version__ = "2023.4.0.post1"
from collections import namedtuple
@ -25,4 +25,4 @@ from .iterable_abc import IterableABC
from .iterable import Iterable
VersionInfo = namedtuple("VersionInfo", "major minor micro")
version_info = VersionInfo(major="2023", minor="10", micro="0")
version_info = VersionInfo(major="2023", minor="4", micro="0.post1")

View File

@ -2,9 +2,9 @@
"ProjectSettings": {
"Name": "cpl-translation",
"Version": {
"Major": "2024",
"Minor": "7",
"Micro": "0"
"Major": "2023",
"Minor": "4",
"Micro": "0.post1"
},
"Author": "Sven Heidemann",
"AuthorEmail": "sven.heidemann@sh-edraft.de",
@ -16,10 +16,10 @@
"LicenseName": "MIT",
"LicenseDescription": "MIT, see LICENSE for more details.",
"Dependencies": [
"cpl-core>=2024.6.2024.07.0"
"cpl-core>=2023.4.0"
],
"DevDependencies": [
"cpl-cli>=2024.6.2024.07.0"
"cpl-cli>=2023.4.0"
],
"PythonVersion": ">=3.10",
"PythonPath": {},

View File

@ -20,6 +20,7 @@
"Database": "sh_cpl",
"Charset": "utf8mb4",
"UseUnicode": "true",
"Buffered": "true"
"Buffered": "true",
"AuthPlugin": "mysql_native_password"
}
}

View File

@ -3,5 +3,5 @@ from cpl_core.database.context import DatabaseContext
class DBContext(DatabaseContext):
def __init__(self):
DatabaseContext.__init__(self)
def __init__(self, db_settings: DatabaseSettings):
DatabaseContext.__init__(self, db_settings)

View File

@ -21,6 +21,7 @@ class Startup(StartupABC):
) -> ConfigurationABC:
configuration.add_environment_variables("PYTHON_")
configuration.add_environment_variables("CPL_")
configuration.parse_console_arguments()
configuration.add_json_file(f"appsettings.json")
configuration.add_json_file(f"appsettings.{configuration.environment.environment_name}.json")
configuration.add_json_file(f"appsettings.{configuration.environment.host_name}.json", optional=True)
@ -33,7 +34,6 @@ class Startup(StartupABC):
self, services: ServiceCollectionABC, environment: ApplicationEnvironmentABC
) -> ServiceProviderABC:
# Create and connect to database
self._configuration.parse_console_arguments(services)
db_settings: DatabaseSettings = self._configuration.get_configuration(DatabaseSettings)
services.add_db_context(DBContext, db_settings)

View File

@ -8,7 +8,7 @@ from cpl_core.dependency_injection import ServiceProviderABC
from cpl_core.logging import LoggerABC
from cpl_core.mailing import EMailClientABC, EMail
from cpl_core.pipes import IPAddressPipe
from test_settings import TestSettings
from general.test_settings import TestSettings
from test_service import TestService

View File

@ -2,8 +2,8 @@
"ProjectSettings": {
"Name": "set-pip-urls",
"Version": {
"Major": "2024",
"Minor": "7",
"Major": "2022",
"Minor": "12",
"Micro": "0"
},
"Author": "Sven Heidemann",

View File

@ -2,8 +2,8 @@
"ProjectSettings": {
"Name": "set-version",
"Version": {
"Major": "2024",
"Minor": "7",
"Major": "2022",
"Minor": "12",
"Micro": "0"
},
"Author": "Sven Heidemann",
@ -16,7 +16,7 @@
"LicenseName": "MIT",
"LicenseDescription": "MIT, see LICENSE for more details.",
"Dependencies": [
"cpl-core>=2024.6.2024.07.0",
"cpl-core>=2022.12.0",
"GitPython>=3.1.29"
],
"DevDependencies": [],

View File

@ -2,8 +2,8 @@
"ProjectSettings": {
"Name": "unittests",
"Version": {
"Major": "2024",
"Minor": "7",
"Major": "2023",
"Minor": "2",
"Micro": "0"
},
"Author": "",
@ -16,7 +16,7 @@
"LicenseName": "",
"LicenseDescription": "",
"Dependencies": [
"cpl-core>=2024.6.2024.07.0"
"cpl-core>=2023.2.0"
],
"PythonVersion": ">=3.10.4",
"PythonPath": {},

View File

@ -2,8 +2,8 @@
"ProjectSettings": {
"Name": "unittest_cli",
"Version": {
"Major": "2024",
"Minor": "7",
"Major": "2023",
"Minor": "2",
"Micro": "0"
},
"Author": "",
@ -16,8 +16,8 @@
"LicenseName": "",
"LicenseDescription": "",
"Dependencies": [
"cpl-core>=2024.6.2024.07.0",
"cpl-cli>=2024.6.2024.07.0"
"cpl-core>=2023.2.0",
"cpl-cli>=2023.2.0"
],
"PythonVersion": ">=3.10.4",
"PythonPath": {},

View File

@ -2,8 +2,8 @@
"ProjectSettings": {
"Name": "unittest_core",
"Version": {
"Major": "2024",
"Minor": "7",
"Major": "2023",
"Minor": "2",
"Micro": "0"
},
"Author": "",
@ -16,7 +16,7 @@
"LicenseName": "",
"LicenseDescription": "",
"Dependencies": [
"cpl-core>=2024.6.2024.07.0"
"cpl-core>=2023.2.0"
],
"PythonVersion": ">=3.10.4",
"PythonPath": {},

View File

@ -2,8 +2,8 @@
"ProjectSettings": {
"Name": "unittest_query",
"Version": {
"Major": "2024",
"Minor": "7",
"Major": "2023",
"Minor": "2",
"Micro": "0"
},
"Author": "",
@ -16,8 +16,8 @@
"LicenseName": "",
"LicenseDescription": "",
"Dependencies": [
"cpl-core>=2024.6.2024.07.0",
"cpl-query>=2024.6.2024.07.0"
"cpl-core>=2023.2.0",
"cpl-query>=2023.2.0"
],
"PythonVersion": ">=3.10.4",
"PythonPath": {},

View File

@ -2,8 +2,8 @@
"ProjectSettings": {
"Name": "unittest_shared",
"Version": {
"Major": "2024",
"Minor": "7",
"Major": "2023",
"Minor": "2",
"Micro": "0"
},
"Author": "",
@ -16,7 +16,7 @@
"LicenseName": "",
"LicenseDescription": "",
"Dependencies": [
"cpl-core>=2024.6.2024.07.0"
"cpl-core>=2023.2.0"
],
"PythonVersion": ">=3.10.4",
"PythonPath": {},

View File

@ -2,8 +2,8 @@
"ProjectSettings": {
"Name": "unittests_translation",
"Version": {
"Major": "2024",
"Minor": "7",
"Major": "2023",
"Minor": "2",
"Micro": "0"
},
"Author": "",
@ -16,11 +16,11 @@
"LicenseName": "",
"LicenseDescription": "",
"Dependencies": [
"cpl-core>=2024.6.2024.07.0",
"cpl-translation>=2024.6.2024.07.0"
"cpl-core>=2023.2.0",
"cpl-translation>=2023.2.0"
],
"DevDependencies": [
"cpl-cli>=2024.6.2024.07.0"
"cpl-cli>=2023.2.0"
],
"PythonVersion": ">=3.10.4",
"PythonPath": {},