Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from io import TextIOBase
from typing import TYPE_CHECKING

import pkg_resources
from importlib.metadata import version as _get_version

from digitalpy.core.component_management.configuration.component_management_constants import (
DIGITALPY,
Expand Down Expand Up @@ -116,7 +116,7 @@ def check_version(self, required_version: "str") -> "bool":
bool: True if the version is valid, False otherwise
"""
# retrieve the current digitalpy version based on the setup.py
digitalpy_version = pkg_resources.require(DIGITALPY)[0].version
digitalpy_version = _get_version(DIGITALPY)
required_version_sections = required_version.split(VERSION_DELIMITER)
# iterate the delimited version number and compare it to the digitalpy version
for i, _ in enumerate(required_version_sections):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import os
from pathlib import PurePath
from typing import Dict, List
import pkg_resources
from importlib.metadata import version as _get_version

from digitalpy.core.main.registration_handler import RegistrationHandler
from digitalpy.core.component_management.impl.default_facade import DefaultFacade
Expand Down Expand Up @@ -136,7 +136,7 @@ def validate_manifest(manifest: Configuration, component_name: str, component_fa
tuple[bool, bool]: whether the component is compatible with the current digitalpy installation and whether the component has any pending dependencies
"""
# retrieve the current digitalpy version based on the setup.py
digitalpy_version = pkg_resources.require(DIGITALPY)[0].version
digitalpy_version = _get_version(DIGITALPY)

try:
# get the manifest section from the configuration
Expand Down
2 changes: 1 addition & 1 deletion digitalpy/core/main/object_factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
class ObjectFactory:
"""ObjectFactory class to create and retrieve instances."""

__factory: Factory
__factory: Factory = None

@staticmethod
def configure(factory: Factory):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import os
from pathlib import PurePath
from typing import List
import pkg_resources
from importlib.metadata import version as _get_version

from digitalpy.core.main.registration_handler import RegistrationHandler
from digitalpy.core.component_management.impl.default_facade import DefaultFacade
Expand Down Expand Up @@ -118,7 +118,7 @@ def validate_manifest(manifest: Configuration, service_name: str) -> bool:
bool: whether the service is compatible with the current digitalpy installation
"""
# retrieve the current digitalpy version based on the setup.py
digitalpy_version = pkg_resources.require(DIGITALPY)[0].version
digitalpy_version = _get_version(DIGITALPY)

try:
# get the manifest section from the configuration
Expand Down
Loading