Skip to content

Commit e43794c

Browse files
committed
final touches
1 parent d51bacb commit e43794c

File tree

3 files changed

+14
-11
lines changed

3 files changed

+14
-11
lines changed

packages/notifications-library/src/notifications_library/_models.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,13 @@ class SharerData:
3030

3131
@dataclass(frozen=True)
3232
class ProductUIData:
33-
logo_url: str
34-
strong_color: str
3533
project_alias: str
34+
logo_url: str | None = (
35+
None # default_logo = "https://raw.githubusercontent.com/ITISFoundation/osparc-simcore/refs/heads/master/services/static-webserver/client/source/resource/osparc/osparc-white.svg" in base.html
36+
)
37+
strong_color: str | None = (
38+
None # default_strong_color = "rgb(131, 0, 191)" in base.html
39+
)
3640

3741

3842
@dataclass(frozen=True)
@@ -41,5 +45,5 @@ class ProductData:
4145
display_name: str
4246
vendor_display_inline: str
4347
support_email: str
44-
homepage_url: str
48+
homepage_url: str | None # default_homepage = "https://osparc.io/" in base.html
4549
ui: ProductUIData

packages/notifications-library/tests/conftest.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -61,21 +61,20 @@ def product_data(
6161
) -> ProductData:
6262
vendor: Vendor = product["vendor"]
6363

64+
vendor_ui = vendor.get("ui", {})
65+
6466
product_ui = ProductUIData(
65-
logo_url=vendor.get("ui", {}).get(
66-
"logo_url",
67-
"https://raw.githubusercontent.com/ITISFoundation/osparc-simcore/refs/heads/master/services/static-webserver/client/source/resource/osparc/osparc-white.svg",
68-
),
69-
strong_color=vendor.get("ui", {}).get("strong_color", "rgb(131, 0, 191)"),
70-
project_alias=vendor.get("ui", {}).get("project_alias", "project"),
67+
logo_url=vendor_ui.get("logo_url"),
68+
strong_color=vendor_ui.get("strong_color"),
69+
project_alias=vendor_ui["project_alias"],
7170
)
7271

7372
return ProductData( # type: ignore
7473
product_name=product_name,
7574
display_name=product["display_name"],
7675
vendor_display_inline=f"{vendor.get('name','')}, {vendor.get('address','')}",
7776
support_email=product["support_email"],
78-
homepage_url=vendor.get("url", "https://osparc.io/"),
77+
homepage_url=vendor.get("url"),
7978
ui=product_ui,
8079
)
8180

packages/pytest-simcore/src/pytest_simcore/helpers/faker_factories.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ def random_product(
263263
invitation_form=fake.boolean(),
264264
address=fake.address().replace("\n", ". "),
265265
ui=VendorUI(
266-
logo_url=fake.url(),
266+
logo_url="https://raw.githubusercontent.com/ITISFoundation/osparc-simcore/refs/heads/master/services/static-webserver/client/source/resource/osparc/osparc-black.svg",
267267
strong_color=fake.color(),
268268
project_alias=fake.random_element(elements=["project", "study"]),
269269
),

0 commit comments

Comments
 (0)