Skip to content

Commit

Permalink
Merge branch 'dev' into fix/dataset_assets_contributor_uploader
Browse files Browse the repository at this point in the history
  • Loading branch information
tcp authored Oct 2, 2023
2 parents 4d77c1e + c0d3000 commit 48396cb
Show file tree
Hide file tree
Showing 9 changed files with 32 additions and 12 deletions.
2 changes: 1 addition & 1 deletion packages/hagrid/.bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 0.3.72
current_version = 0.3.73
tag = False
tag_name = {new_version}
commit = True
Expand Down
4 changes: 2 additions & 2 deletions packages/hagrid/hagrid/manifest_template.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
manifestVersion: 0.1
hagrid_version: 0.3.72
hagrid_version: 0.3.73
syft_version: 0.8.2-beta.32
dockerTag: 0.8.2-beta.32
baseUrl: https://raw.githubusercontent.com/OpenMined/PySyft/
hash: ba2289479262a742b1df2b7c8548e024b237594a
hash: b302854af24261d62149ee89769c83ba57fae6bd
target_dir: ~/.hagrid/PySyft/
files:
grid:
Expand Down
2 changes: 1 addition & 1 deletion packages/hagrid/hagrid/version.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env python3
# HAGrid Version
__version__ = "0.3.72"
__version__ = "0.3.73"

if __name__ == "__main__":
print(__version__)
2 changes: 1 addition & 1 deletion packages/hagrid/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from setuptools import find_packages
from setuptools import setup

__version__ = "0.3.72"
__version__ = "0.3.73"

DATA_FILES = {"img": ["hagrid/img/*.png"], "hagrid": ["*.yml"]}

Expand Down
5 changes: 1 addition & 4 deletions packages/syft/src/syft/client/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -357,10 +357,7 @@ def __getitem__(self, key: Union[str, int]) -> Any:
def _repr_html_(self) -> Any:
if not hasattr(self, "get_all"):
return NotImplementedError
if hasattr(self, "get_all_unread"):
results = self.get_all_unread()
else:
results = self.get_all()
results = self.get_all()
return results._repr_html_()


Expand Down
18 changes: 18 additions & 0 deletions packages/syft/src/syft/service/notification/notifications.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
from ...types.transforms import generate_id
from ...types.transforms import transform
from ...types.uid import UID
from ...util import options
from ...util.colors import SURFACE


@serializable()
Expand Down Expand Up @@ -67,6 +69,22 @@ class Notification(SyftObject):
]
__repr_attrs__ = ["subject", "status", "created_at", "linked_obj"]

def _repr_html_(self) -> str:
return f"""
<style>
.syft-request {{color: {SURFACE[options.color_theme]}; line-height: 1;}}
</style>
<div class='syft-request'>
<h3>Notification</h3>
<p><strong>ID: </strong>{self.id}</p>
<p><strong>Subject: </strong>{self.subject}</p>
<p><strong>Status: </strong>{self.status.name}</p>
<p><strong>Created at: </strong>{self.created_at}</p>
<p><strong>Linked object: </strong>{self.linked_obj}</p>
<p>
</div>
"""

@property
def link(self) -> Optional[SyftObject]:
if self.linked_obj:
Expand Down
5 changes: 4 additions & 1 deletion packages/syft/src/syft/store/linked_obj.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,10 @@ class LinkedObject(SyftObject):
object_uid: UID

def __str__(self) -> str:
return f"<{self.object_type}: {self.object_uid}@<Node: {self.node_uid}>"
resolved_obj_type = (
type(self.resolve) if self.object_type is None else self.object_type
)
return f"{resolved_obj_type.__name__}: {self.object_uid} @ Node {self.node_uid}"

@property
def resolve(self) -> SyftObject:
Expand Down
2 changes: 1 addition & 1 deletion scripts/hagrid_hash
Original file line number Diff line number Diff line change
@@ -1 +1 @@
8cfc7ab679fc789a602f5d694f35b37f
01540763af422a51e1521994f8c2c5b6
4 changes: 3 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,9 @@ deps =
commands =
pip install --upgrade pip
bandit -r src
safety check -i 42923 -i 54229 -i 54230
# ansible 8.4.0
# restrictedpython 6.2
safety check -i 60840 -i 54229 -i 54230 -i 42923

[testenv:syft.test.unit]
description = Syft Unit Tests
Expand Down

0 comments on commit 48396cb

Please sign in to comment.