-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add github actions * add licenserc * python format * format * fix lincenserc * add copyright header * update template
- Loading branch information
Showing
22 changed files
with
443 additions
and
85 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
--- | ||
name: Python Linter | ||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
permissions: | ||
contents: read | ||
jobs: | ||
python-linter: | ||
uses: secretflow/.github/.github/workflows/python-linter.yml@main |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
--- | ||
name: Bazel files linter | ||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
jobs: | ||
bazel-formatting-check: | ||
uses: secretflow/.github/.github/workflows/bazel-linter.yml@main |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
--- | ||
name: Run clang-format Linter | ||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
jobs: | ||
run-clang-format: | ||
uses: secretflow/.github/.github/workflows/clang-format.yml@main |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
--- | ||
name: License Check | ||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
permissions: | ||
contents: read | ||
jobs: | ||
license-checker: | ||
uses: secretflow/.github/.github/workflows/license-check.yml@main |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
--- | ||
name: Yaml Lint | ||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
jobs: | ||
yaml-linter: | ||
uses: secretflow/.github/.github/workflows/yaml-linter.yml@main |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
# Copyright 2024 Ant Group Co., Ltd. | ||
# | ||
# 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. | ||
|
||
header: # <1> | ||
license: | ||
spdx-id: Apache-2.0 # <2> | ||
copyright-owner: Ant Group Co., Ltd. # <3> | ||
copyright-year: '2024' # <25> | ||
software-name: secretflow # <4> | ||
|
||
pattern: | # <6> | ||
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[s]?://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. | ||
paths: # <7> | ||
- '**' | ||
|
||
paths-ignore: # <8> | ||
- '.circleci' | ||
- '.github' | ||
- '**/*.md' | ||
- '**/*.json' | ||
- '**/*.yaml' | ||
- '**/*.yml' | ||
- '**/*.ipynb' | ||
- '**/*.txt' | ||
- '**/*.Dockerfile' | ||
- '**/Dockerfile' | ||
- '**/*.po' | ||
- '**/*.svg' | ||
- '**/*.rst' | ||
- '**/*.rst_t' | ||
- '**/*.lds' | ||
- '**/*.patch' | ||
- '**/*.mlir' | ||
- '**/*.csv' | ||
- '**/*.tmpl' | ||
- '**/*.config' | ||
- '**/*.conf' | ||
- '**/*.xml' | ||
- 'LICENSE' | ||
- 'NOTICE' | ||
- 'Makefile' | ||
- '.bazelversion' | ||
- '.clang-format' | ||
- '.clang-tidy' | ||
- '.gitattributes' | ||
- '.gitignore' | ||
- '.gitmodules' | ||
- 'pyproject.toml' | ||
- 'setup.cfg' | ||
- 'dataproxy-manager/src/main/java/org/secretflow/dataproxy/manager/connector/rdbms/adaptor' | ||
|
||
comment: never # <9> | ||
|
||
license-location-threshold: 80 # <10> | ||
|
||
language: # <11> | ||
Starlark: # <12> | ||
extensions: #<13> | ||
- ".bazel" | ||
- ".bazelrc" | ||
- "BUILD" | ||
- ".bzl" | ||
- "WORKSPACE" | ||
comment_style_id: PythonStyle # <15> | ||
Cpp: | ||
extensions: | ||
- ".cc" | ||
- ".h" | ||
- ".cu" | ||
comment_style_id: DoubleSlash | ||
Java: | ||
extensions: | ||
- ".java" | ||
comment_style_id: SlashAsterisk |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
...n/src/main/java/org/secretflow/dataproxy/common/model/datasource/conn/OdpsConnConfig.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
...rc/main/java/org/secretflow/dataproxy/common/model/datasource/location/OdpsTableInfo.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
...mon/src/main/java/org/secretflow/dataproxy/common/serializer/SensitiveDataSerializer.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
dataproxy-common/src/main/java/org/secretflow/dataproxy/common/serializer/package-info.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,22 @@ | ||
# Copyright 2024 Ant Group Co., Ltd. | ||
# | ||
# 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 . import dp_pb2 as proto | ||
from .dp_file_adapter import * | ||
|
||
__all__ = [ | ||
"DataProxyFileAdapter", | ||
"proto", | ||
] | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,39 @@ | ||
# Copyright 2024 Ant Group Co., Ltd. | ||
# | ||
# 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 . import libdataproxy | ||
from . import dp_pb2 as proto | ||
|
||
|
||
class DataProxyFileAdapter: | ||
def __init__(self, config: proto.DataProxyConfig): | ||
self.data_proxy_file = libdataproxy.DataProxyFile(config.SerializeToString()) | ||
|
||
def close(self): | ||
self.data_proxy_file.close() | ||
|
||
def download_file(self, info: proto.DownloadInfo, file_path: str, file_format: proto.FileFormat): | ||
self.data_proxy_file.download_file(info.SerializeToString(), file_path, file_format) | ||
def download_file( | ||
self, info: proto.DownloadInfo, file_path: str, file_format: proto.FileFormat | ||
): | ||
self.data_proxy_file.download_file( | ||
info.SerializeToString(), file_path, file_format | ||
) | ||
|
||
def upload_file(self, info: proto.UploadInfo, file_path: str, file_format: proto.FileFormat): | ||
self.data_proxy_file.upload_file(info.SerializeToString(), file_path, file_format) | ||
def upload_file( | ||
self, info: proto.UploadInfo, file_path: str, file_format: proto.FileFormat | ||
): | ||
self.data_proxy_file.upload_file( | ||
info.SerializeToString(), file_path, file_format | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,16 @@ | ||
from dataproxy_sdk.proto.data_proxy_pb_pb2 import * | ||
# Copyright 2024 Ant Group Co., Ltd. | ||
# | ||
# 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 dataproxy_sdk.proto.data_proxy_pb_pb2 import * |
Oops, something went wrong.