From 4d817c28fbdd5ef78adc0d962f812f9f07227acd Mon Sep 17 00:00:00 2001 From: m-j-hofmann <139861272+m-j-hofmann@users.noreply.github.com> Date: Mon, 3 Nov 2025 17:00:17 +0100 Subject: [PATCH 1/3] add: inventory to_mention method --- src/albert/resources/inventory.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/albert/resources/inventory.py b/src/albert/resources/inventory.py index 3905c412..a77d4152 100644 --- a/src/albert/resources/inventory.py +++ b/src/albert/resources/inventory.py @@ -252,6 +252,12 @@ def validate_formula_fields(self) -> "InventoryItem": raise ValueError("A project_id must be supplied for all formulas.") return self + def to_mention(self) -> str: + """Convert the inventory informatio to an @-mention string to be used in notebooks""" + to_mention = f'@{self.id[3:]} | {self.name}' + # return string + return to_mention + class InventorySpecValue(BaseAlbertModel): min: str | None = Field(default=None) From 47f7d45827dca4b07c9942f0fc3c0b70b9f49d56 Mon Sep 17 00:00:00 2001 From: m-j-hofmann <139861272+m-j-hofmann@users.noreply.github.com> Date: Mon, 3 Nov 2025 17:00:50 +0100 Subject: [PATCH 2/3] Update __init__.py --- src/albert/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/albert/__init__.py b/src/albert/__init__.py index 859627f7..5607f65a 100644 --- a/src/albert/__init__.py +++ b/src/albert/__init__.py @@ -4,4 +4,4 @@ __all__ = ["Albert", "AlbertClientCredentials", "AlbertSSOClient"] -__version__ = "1.7.6" +__version__ = "1.7.7" From b051dbee0b36c663e8873bc67bf7e37719c054aa Mon Sep 17 00:00:00 2001 From: m-j-hofmann <139861272+m-j-hofmann@users.noreply.github.com> Date: Wed, 5 Nov 2025 06:34:16 +0100 Subject: [PATCH 3/3] rename method to meet naming convention --- src/albert/__init__.py | 2 +- src/albert/resources/inventory.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/albert/__init__.py b/src/albert/__init__.py index 5607f65a..e21b0dec 100644 --- a/src/albert/__init__.py +++ b/src/albert/__init__.py @@ -4,4 +4,4 @@ __all__ = ["Albert", "AlbertClientCredentials", "AlbertSSOClient"] -__version__ = "1.7.7" +__version__ = "1.7.8" diff --git a/src/albert/resources/inventory.py b/src/albert/resources/inventory.py index a77d4152..c47ce24c 100644 --- a/src/albert/resources/inventory.py +++ b/src/albert/resources/inventory.py @@ -252,7 +252,7 @@ def validate_formula_fields(self) -> "InventoryItem": raise ValueError("A project_id must be supplied for all formulas.") return self - def to_mention(self) -> str: + def to_note_mention(self) -> str: """Convert the inventory informatio to an @-mention string to be used in notebooks""" to_mention = f'@{self.id[3:]} | {self.name}' # return string