Skip to content

Commit

Permalink
merge dev
Browse files Browse the repository at this point in the history
  • Loading branch information
PeterChung241 committed Jan 24, 2022
2 parents 0b8a53b + f92dd65 commit 81b4ea2
Show file tree
Hide file tree
Showing 45 changed files with 752 additions and 425 deletions.
12 changes: 0 additions & 12 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -150,15 +150,3 @@ repos:
"--install-types",
"--non-interactive",
]
- repo: local
hooks:
- id: flynt
always_run: true
name: flynt
entry: flynt
exclude: ^(packages/grid/ansible)
args: [--fail-on-change]
types: [python]
language: python
additional_dependencies:
- flynt
File renamed without changes.
1 change: 1 addition & 0 deletions notebooks/course3/mock_api_notebooks/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
These notebooks represent Mock APIs for the syft library. Actual implementation of the API may slightly differ from the mock ones.
5 changes: 5 additions & 0 deletions notebooks/trade_demo/mock_notebooks/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
**Note**

These notebooks represent only mock APIs. They represent a vision on how we want to drive the user experience of the syft library in the notebooks in the near future.

The functionalities presented here may or may not be present in the current or future versions of the syft library.
12 changes: 6 additions & 6 deletions packages/grid/backend/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
alembic==1.6.5; (python_version >= "2.7" and python_full_version < "3.0.0") or (python_full_version >= "3.6.0")
amqp==5.0.6; python_version >= "3.6"
amqp==5.0.9; python_version >= "3.6"
anyio==3.3.0; python_full_version >= "3.6.2" and python_version >= "3.6"
appdirs==1.4.4; python_version >= "3.6"
asgi-lifespan==1.0.1; python_version >= "3.6"
Expand All @@ -11,13 +11,13 @@ bcrypt==3.2.0; python_version >= "3.6"
billiard==3.6.4.0; python_version >= "2.7" and python_full_version < "3.0.0" or python_full_version >= "3.5.0"
black==19.10b0; python_version >= "3.6"
cachetools==4.2.2; python_version >= "3.5" and python_version < "4.0"
celery==5.1.2; python_version >= "3.6"
celery==5.2.3; python_version >= "3.6"
certifi==2021.5.30; python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.6.0" and python_version >= "3.6"
cffi==1.14.6
chardet==4.0.0; python_version >= "2.7" and python_full_version < "3.0.0" or python_full_version >= "3.5.0"
charset-normalizer==2.0.4; python_full_version >= "3.6.0" and python_version >= "3"
checksumdir==1.2.0; python_version >= "3.6" and python_version < "4.0"
click==7.1.2; python_version >= "3.6"
click==8.0.3; python_version >= "3.6"
colorama==0.4.4; python_version >= "3.6" and python_full_version < "3.0.0" and sys_platform == "win32" and platform_system == "Windows" and (python_version >= "3.5" and python_full_version < "3.0.0" or python_full_version >= "3.5.0" and python_version >= "3.5") or sys_platform == "win32" and python_version >= "3.6" and python_full_version >= "3.5.0" and platform_system == "Windows" and (python_version >= "3.5" and python_full_version < "3.0.0" or python_full_version >= "3.5.0" and python_version >= "3.5")
coverage==5.5; python_version >= "2.7" and python_full_version < "3.0.0" or python_full_version >= "3.5.0" and python_version < "4"
cryptography==3.4.7; python_version >= "3.6"
Expand All @@ -39,9 +39,9 @@ idna==3.2; python_full_version >= "3.6.2" and python_version >= "3.6"
importlib-metadata==4.6.4; python_version >= "3.6" and python_full_version < "3.0.0" and python_version < "3.8" and (python_version >= "3.5" and python_full_version < "3.0.0" or python_full_version >= "3.5.0" and python_version >= "3.5") or python_full_version >= "3.6.0" and python_version < "3.8" and python_version >= "3.6" and (python_version >= "3.5" and python_full_version < "3.0.0" or python_full_version >= "3.5.0" and python_version >= "3.5")
isort==4.3.21; (python_version >= "2.7" and python_full_version < "3.0.0") or (python_full_version >= "3.4.0")
jinja2==2.11.3; (python_version >= "2.7" and python_full_version < "3.0.0") or (python_full_version >= "3.5.0")
kombu==5.1.0; python_version >= "3.6"
kombu==5.2.3; python_version >= "3.6"
loguru==0.5.3; python_version >= "3.5"
lxml==4.6.3; python_version >= "2.7" and python_full_version < "3.0.0" or python_full_version >= "3.5.0"
lxml==4.7.1; python_version >= "2.7" and python_full_version < "3.0.0" or python_full_version >= "3.5.0"
mako==1.1.5; python_version >= "2.7" and python_full_version < "3.0.0" or python_full_version >= "3.6.0"
markupsafe==2.0.1; python_version >= "3.6" and python_full_version < "3.0.0" or python_full_version >= "3.6.0" and python_version >= "3.6"
mccabe==0.6.1; python_version >= "2.7" and python_full_version < "3.0.0" or python_full_version >= "3.5.0"
Expand Down Expand Up @@ -69,7 +69,7 @@ python-dateutil==2.8.2; python_version >= "2.7" and python_full_version < "3.0.0
python-editor==1.0.4; python_version >= "2.7" and python_full_version < "3.0.0" or python_full_version >= "3.6.0"
python-jose==3.3.0
python-multipart==0.0.5
pytz==2021.1; python_version >= "2.7" and python_full_version < "3.0.0" or python_full_version >= "3.5.0"
pytz==2021.3; python_version >= "2.7" and python_full_version < "3.0.0" or python_full_version >= "3.5.0"
raven==6.10.0
regex==2021.8.21; python_version >= "3.6"
requests==2.26.0; (python_version >= "2.7" and python_full_version < "3.0.0") or (python_full_version >= "3.6.0")
Expand Down
8 changes: 4 additions & 4 deletions packages/grid/frontend/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4671,10 +4671,10 @@ json-schema-traverse@^1.0.0:
resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz#ae7bcb3656ab77a73ba5c49bf654f38e6b6860e2"
integrity sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==

json-schema@0.2.3:
version "0.2.3"
resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.2.3.tgz#b480c892e59a2f05954ce727bd3f2a4e882f9e13"
integrity sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=
json-schema@0.4.0:
version "0.4.0"
resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.4.0.tgz#f7de4cf6efab838ebaeb3236474cbba5a1930ab5"
integrity sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==

json-stable-stringify-without-jsonify@^1.0.1:
version "1.0.1"
Expand Down
2 changes: 1 addition & 1 deletion packages/grid/vpn/tailscale.dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM shaynesweeney/tailscale:latest
FROM tailscale/tailscale:v1.16

RUN --mount=type=cache,target=/var/cache/apk \
apk add --no-cache python3 py3-pip ca-certificates
Expand Down

This file was deleted.

14 changes: 14 additions & 0 deletions packages/syft/proto/grid/messages/request_messages.proto
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ package syft.grid.messages;
import "proto/core/common/common_object.proto";
import "proto/core/io/address.proto";
import "proto/lib/python/dict.proto";
import "proto/core/node/domain/service/request_message.proto";


// CREATE Request
Expand Down Expand Up @@ -105,3 +106,16 @@ message UpdateRequestResponse {
string request_id = 4;
syft.core.io.Address address = 5;
}


message GetAllRequestsMessage {
syft.core.common.UID msg_id = 1;
syft.core.io.Address address = 2;
syft.core.io.Address reply_to = 3;
}

message GetAllRequestsResponseMessage {
syft.core.common.UID msg_id = 1;
syft.core.io.Address address = 2;
repeated syft.core.node.domain.service.RequestMessage requests = 3;
}
12 changes: 4 additions & 8 deletions packages/syft/src/syft/core/adp/entity.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,9 +119,7 @@ class DataSubjectGroup:
def __init__(self, list_of_entities: Optional[Union[list, set]] = None):
self.entity_set: set = set()
# Ensure each entity being tracked is unique
if isinstance(list_of_entities, list):
self.entity_set = self.entity_set.union(set(list_of_entities))
elif isinstance(list_of_entities, set):
if isinstance(list_of_entities, (list, set)):
self.entity_set = self.entity_set.union(list_of_entities)
elif isinstance(list_of_entities, Entity):
self.entity_set.add(list_of_entities) # type: ignore
Expand All @@ -143,10 +141,8 @@ def __contains__(self, item: Entity) -> bool:
return item in self.entity_set

def to_string(self) -> str:
output_string = ""
for item in self.entity_set:
output_string += item.to_string() + ";"
return output_string[:-1]
output_string = ";".join(item.to_string() for item in self.entity_set)
return output_string

@staticmethod
def from_string(blob: str) -> DataSubjectGroup:
Expand All @@ -155,7 +151,7 @@ def from_string(blob: str) -> DataSubjectGroup:
entity_set = set()
for entity_blob in entity_list:
entity_set.add(Entity.from_string(entity_blob))
return DataSubjectGroup(list[entity_set]) # type: ignore
return DataSubjectGroup(entity_set) # type: ignore

def __add__(
self, other: Union[DataSubjectGroup, Entity, int, float]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ def max_lipschitz_via_explicit_search(

r2_diffs = np.array(
[
GammaScalar(x.min_val, x.value, x.max_val, entity=x.entity).poly # type: ignore
GammaScalar(x.min_val, x.value, x.max_val, entity=x.entity, prime=x.prime).poly # type: ignore
for x in self.input_scalars
]
)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# stdlib
from enum import Enum


class UserApplicationStatus(Enum):
PENDING = "pending"
ACCEPTED = "accepted"
REJECTED = "rejected"
Loading

0 comments on commit 81b4ea2

Please sign in to comment.