Skip to content

Commit

Permalink
chore(license): add license
Browse files Browse the repository at this point in the history
Signed-off-by: weiwee <wbwmat@gmail.com>
  • Loading branch information
sagewe committed Jan 9, 2023
1 parent 7c01fe8 commit f1bfdb7
Show file tree
Hide file tree
Showing 19 changed files with 197 additions and 148 deletions.
24 changes: 14 additions & 10 deletions python/fate/interface/__init__.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,21 @@
from ._anonymous import Anonymous
from ._cache import Cache
from ._checkpoint import CheckpointManager
#
# Copyright 2019 The FATE Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from ._cipher import CipherKit, PHECipher
from ._computing import ComputingEngine
from ._consts import T_ARBITER, T_GUEST, T_HOST, T_ROLE
from ._context import Context
from ._cpn_io import CpnOutput
from ._data_io import Dataframe
from ._federation import FederationEngine, FederationWrapper
from ._gc import GarbageCollector
Expand All @@ -14,23 +24,17 @@
from ._module import Module
from ._param import Params
from ._party import Parties, Party, PartyMeta
from ._summary import Summary

__all__ = [
"Module",
"Context",
"Dataframe",
"Params",
"CpnOutput",
"Summary",
"Cache",
"MetricsHandler",
"MetricsWrap",
"Metrics",
"InCompleteMetrics",
"Metric",
"Anonymous",
"CheckpointManager",
"Logger",
"LOGMSG",
"Party",
Expand Down
94 changes: 0 additions & 94 deletions python/fate/interface/_anonymous.py

This file was deleted.

8 changes: 0 additions & 8 deletions python/fate/interface/_cache.py

This file was deleted.

7 changes: 0 additions & 7 deletions python/fate/interface/_checkpoint.py

This file was deleted.

18 changes: 15 additions & 3 deletions python/fate/interface/_cipher.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
#
# Copyright 2019 The FATE Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from enum import Enum
from typing import Protocol, Tuple

Expand All @@ -12,9 +26,7 @@ class PHEKind(Enum):


class PHECipher(Protocol):
def keygen(
self, kind: PHEKind = PHEKind.AUTO, options={}
) -> Tuple["PHEEncryptor", "PHEDecryptor"]:
def keygen(self, kind: PHEKind = PHEKind.AUTO, options={}) -> Tuple["PHEEncryptor", "PHEDecryptor"]:
...


Expand Down
14 changes: 14 additions & 0 deletions python/fate/interface/_computing.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
#
# Copyright 2019 The FATE Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from typing import Protocol


Expand Down
14 changes: 14 additions & 0 deletions python/fate/interface/_consts.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
#
# Copyright 2019 The FATE Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from typing import Literal

T_GUEST = Literal["guest"]
Expand Down
19 changes: 14 additions & 5 deletions python/fate/interface/_context.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,25 @@
#
# Copyright 2019 The FATE Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from contextlib import contextmanager
from typing import Iterable, Iterator, Protocol, Tuple, TypeVar

from ._anonymous import Anonymous
from ._cache import Cache
from ._checkpoint import CheckpointManager
from ._cipher import CipherKit
from ._computing import ComputingEngine
from ._federation import FederationEngine
from ._log import Logger
from ._metric import MetricsWrap
from ._party import Parties, Party
from ._summary import Summary

T = TypeVar("T")

Expand Down
7 changes: 0 additions & 7 deletions python/fate/interface/_cpn_io.py

This file was deleted.

14 changes: 14 additions & 0 deletions python/fate/interface/_data_io.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
#
# Copyright 2019 The FATE Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from typing import Protocol


Expand Down
14 changes: 14 additions & 0 deletions python/fate/interface/_federation.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
#
# Copyright 2019 The FATE Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from typing import List, Optional, Protocol

from ._gc import GarbageCollector
Expand Down
14 changes: 14 additions & 0 deletions python/fate/interface/_gc.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
#
# Copyright 2019 The FATE Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from typing import Protocol


Expand Down
14 changes: 14 additions & 0 deletions python/fate/interface/_log.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
#
# Copyright 2019 The FATE Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from typing import Callable, Protocol, Union

LOGMSG = Union[str, Callable[[], str]]
Expand Down
14 changes: 14 additions & 0 deletions python/fate/interface/_metric.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
#
# Copyright 2019 The FATE Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from typing import List, Protocol, Tuple, Union


Expand Down
14 changes: 14 additions & 0 deletions python/fate/interface/_module.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
#
# Copyright 2019 The FATE Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from typing import List, Optional, Protocol, Union

from ._context import Context
Expand Down
14 changes: 14 additions & 0 deletions python/fate/interface/_param.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,17 @@
#
# Copyright 2019 The FATE Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from typing import Protocol


Expand Down
Loading

0 comments on commit f1bfdb7

Please sign in to comment.