From d54a95e0f9c689f2bbaaea90a3a16a855a408823 Mon Sep 17 00:00:00 2001 From: Wojtek Kosior Date: Wed, 17 Aug 2022 13:50:34 +0200 Subject: allow loading packages from zip files through web UI and listing installed mappings --- src/hydrilla/item_infos.py | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) (limited to 'src/hydrilla/item_infos.py') diff --git a/src/hydrilla/item_infos.py b/src/hydrilla/item_infos.py index 0bdc95e..a26e57a 100644 --- a/src/hydrilla/item_infos.py +++ b/src/hydrilla/item_infos.py @@ -185,10 +185,10 @@ class ItemInfoBase(ABC, ItemIdentity, Categorizable): # identifier = self.identifier # ) - # @property - # def versioned_identifier(self): - # """....""" - # return f'{self.identifier}-{versions.version_string(self.version)}' + @property + def versioned_identifier(self): + """....""" + return f'{self.identifier}-{versions.version_string(self.version)}' @staticmethod def _get_base_init_kwargs( @@ -358,10 +358,19 @@ class MappingInfo(ItemInfoBase): repo_iteration ) - # def __lt__(self, other: 'MappingInfo') -> bool: - # """....""" - # return (self.identifier, self.version, self.repository) < \ - # (other.identifier, other.version, other.repository) + def __lt__(self, other: 'MappingInfo') -> bool: + """....""" + return ( + self.identifier, + other.version, + self.repo, + other.repo_iteration + ) < ( + other.identifier, + self.version, + other.repo, + self.repo_iteration + ) AnyInfo = t.Union[ResourceInfo, MappingInfo] -- cgit v1.2.3