From dcb3c1eb5cf206594499f35512f1e7ec09e827fd Mon Sep 17 00:00:00 2001 From: Yong Tang Date: Thu, 13 May 2021 18:55:47 -0700 Subject: [PATCH] Rename tensorflow-io-plugin-gs to tensorflow-io-gcs-filesystem (#1419) As was discussed in our SIG IO meeting, this PR renames tensorflow-io-plugin-gs to tensorflow-io-gcs-filesystem Signed-off-by: Yong Tang --- .github/workflows/api.yml | 6 +- .github/workflows/benchmarks.yml | 12 ++-- .github/workflows/build.bazel.sh | 4 +- .github/workflows/build.wheel.sh | 2 +- .github/workflows/build.yml | 60 +++++++++---------- docs/development.md | 4 +- setup.py | 2 +- .../__init__.py | 4 +- .../core/BUILD | 4 +- .../core/__init__.py | 0 .../core/cleanup.h | 0 .../core/expiring_lru_cache.h | 0 .../core/file_system_plugin_gs.cc | 2 +- .../core/file_system_plugin_gs.h | 0 .../core/gcs_filesystem.cc | 8 +-- .../core/gcs_helper.cc | 2 +- .../core/gcs_helper.h | 0 .../core/python/__init__.py | 0 .../core/python/ops/__init__.py | 6 +- .../core/ram_file_block_cache.cc | 4 +- .../core/ram_file_block_cache.h | 0 tests/test_filesystem.py | 2 +- tests/test_gcs.py | 2 +- tools/lint/lint.tpl | 6 +- 24 files changed, 65 insertions(+), 65 deletions(-) rename {tensorflow_io_plugin_gs => tensorflow_io_gcs_filesystem}/__init__.py (87%) rename {tensorflow_io_plugin_gs => tensorflow_io_gcs_filesystem}/core/BUILD (90%) rename {tensorflow_io_plugin_gs => tensorflow_io_gcs_filesystem}/core/__init__.py (100%) rename {tensorflow_io_plugin_gs => tensorflow_io_gcs_filesystem}/core/cleanup.h (100%) rename {tensorflow_io_plugin_gs => tensorflow_io_gcs_filesystem}/core/expiring_lru_cache.h (100%) rename {tensorflow_io_plugin_gs => tensorflow_io_gcs_filesystem}/core/file_system_plugin_gs.cc (95%) rename {tensorflow_io_plugin_gs => tensorflow_io_gcs_filesystem}/core/file_system_plugin_gs.h (100%) rename {tensorflow_io_plugin_gs => tensorflow_io_gcs_filesystem}/core/gcs_filesystem.cc (99%) rename {tensorflow_io_plugin_gs => tensorflow_io_gcs_filesystem}/core/gcs_helper.cc (96%) rename {tensorflow_io_plugin_gs => tensorflow_io_gcs_filesystem}/core/gcs_helper.h (100%) rename {tensorflow_io_plugin_gs => tensorflow_io_gcs_filesystem}/core/python/__init__.py (100%) rename {tensorflow_io_plugin_gs => tensorflow_io_gcs_filesystem}/core/python/ops/__init__.py (92%) rename {tensorflow_io_plugin_gs => tensorflow_io_gcs_filesystem}/core/ram_file_block_cache.cc (98%) rename {tensorflow_io_plugin_gs => tensorflow_io_gcs_filesystem}/core/ram_file_block_cache.h (100%) diff --git a/.github/workflows/api.yml b/.github/workflows/api.yml index 449dd3e6f..680dcce30 100644 --- a/.github/workflows/api.yml +++ b/.github/workflows/api.yml @@ -42,7 +42,7 @@ jobs: rm -rf tensorflow_io echo ${{ matrix.version }} | awk -F: '{print $1}' | xargs python -m pip install -U echo ${{ matrix.version }} | awk -F: '{print $2}' | xargs python -m pip install --no-deps -U - if [[ "${{ matrix.version }}" == *"tensorflow-io-nightly"* ]]; then python -m pip install tensorflow-io-plugin-gs-nightly ; fi + if [[ "${{ matrix.version }}" == *"tensorflow-io-nightly"* ]]; then python -m pip install tensorflow-io-gcs-filesystem-nightly ; fi python -m pip install pytest-benchmark boto3 google-cloud-storage==1.32.0 azure-storage-blob==12.7.1 python -m pip freeze python -c 'import tensorflow as tf; print(tf.version.VERSION)' @@ -82,7 +82,7 @@ jobs: rm -rf tensorflow_io echo ${{ matrix.version }} | awk -F: '{print $1}' | xargs python -m pip install -U echo ${{ matrix.version }} | awk -F: '{print $2}' | xargs python -m pip install --no-deps -U - if [[ "${{ matrix.version }}" == *"tensorflow-io-nightly"* ]]; then python -m pip install tensorflow-io-plugin-gs-nightly ; fi + if [[ "${{ matrix.version }}" == *"tensorflow-io-nightly"* ]]; then python -m pip install tensorflow-io-gcs-filesystem-nightly ; fi python -m pip install pytest-benchmark boto3 google-cloud-storage==1.32.0 azure-storage-blob==12.7.1 python -m pip freeze python -c 'import tensorflow as tf; print(tf.version.VERSION)' @@ -123,7 +123,7 @@ jobs: rm -rf tensorflow_io echo ${{ matrix.version }} | awk -F: '{print $1}' | xargs python -m pip install -U echo ${{ matrix.version }} | awk -F: '{print $2}' | xargs python -m pip install --no-deps -U - if [[ "${{ matrix.version }}" == *"tensorflow-io-nightly"* ]]; then python -m pip install tensorflow-io-plugin-gs-nightly ; fi + if [[ "${{ matrix.version }}" == *"tensorflow-io-nightly"* ]]; then python -m pip install tensorflow-io-gcs-filesystem-nightly ; fi python -m pip install pytest-benchmark python -m pip freeze python -c 'import tensorflow as tf; print(tf.version.VERSION)' diff --git a/.github/workflows/benchmarks.yml b/.github/workflows/benchmarks.yml index d6028ed5c..c269e5180 100644 --- a/.github/workflows/benchmarks.yml +++ b/.github/workflows/benchmarks.yml @@ -31,15 +31,15 @@ jobs: python --version df -h rm -rf tensorflow_io - rm -rf tensorflow_io_plugin_gs + rm -rf tensorflow_io_gcs_filesystem echo ${{ matrix.version }} | awk -F: '{print $1}' | xargs python -m pip install -U echo ${{ matrix.version }} | awk -F: '{print $2}' | xargs python -m pip install --no-deps -U - if [[ "${{ matrix.version }}" == *"tensorflow-io-nightly"* ]]; then python -m pip install tensorflow-io-plugin-gs-nightly ; fi + if [[ "${{ matrix.version }}" == *"tensorflow-io-nightly"* ]]; then python -m pip install tensorflow-io-gcs-filesystem-nightly ; fi python -m pip install -q scikit-image pytest pytest-benchmark boto3 fastavro avro-python3 scikit-image pandas pyarrow==2.0.0 google-cloud-pubsub==2.1.0 google-cloud-bigquery-storage==1.1.0 google-cloud-bigquery==2.3.1 google-cloud-storage==1.32.0 azure-storage-blob==12.7.1 python -m pip freeze python -c 'import tensorflow as tf; print(tf.version.VERSION)' python -c 'import tensorflow_io as tfio; print(tfio.version.VERSION)' - python -c 'from tensorflow_io_plugin_gs.core.python.ops import plugin_gs; print(plugin_gs)' + python -c 'from tensorflow_io_gcs_filesystem.core.python.ops import plugin_gs; print(plugin_gs)' python -m pytest --benchmark-only -v --import-mode=append $(find . -type f \( -iname "test_*.py" ! \( -iname "test_*_v1.py" -o -iname "test_bigquery.py" \) \)) linux: @@ -69,15 +69,15 @@ jobs: python --version df -h rm -rf tensorflow_io - rm -rf tensorflow_io_plugin_gs + rm -rf tensorflow_io_gcs_filesystem echo ${{ matrix.version }} | awk -F: '{print $1}' | xargs python -m pip install -U echo ${{ matrix.version }} | awk -F: '{print $2}' | xargs python -m pip install --no-deps -U - if [[ "${{ matrix.version }}" == *"tensorflow-io-nightly"* ]]; then python -m pip install tensorflow-io-plugin-gs-nightly ; fi + if [[ "${{ matrix.version }}" == *"tensorflow-io-nightly"* ]]; then python -m pip install tensorflow-io-gcs-filesystem-nightly ; fi python -m pip install -q scikit-image pytest pytest-benchmark boto3 fastavro avro-python3 scikit-image pandas pyarrow==2.0.0 google-cloud-pubsub==2.1.0 google-cloud-bigquery-storage==1.1.0 google-cloud-bigquery==2.3.1 google-cloud-storage==1.32.0 azure-storage-blob==12.7.1 python -m pip freeze python -c 'import tensorflow as tf; print(tf.version.VERSION)' python -c 'import tensorflow_io as tfio; print(tfio.version.VERSION)' - python -c 'from tensorflow_io_plugin_gs.core.python.ops import plugin_gs; print(plugin_gs)' + python -c 'from tensorflow_io_gcs_filesystem.core.python.ops import plugin_gs; print(plugin_gs)' python -m pytest --benchmark-only --benchmark-json benchmark.json -v --import-mode=append $(find . -type f \( -iname "test_*.py" ! \( -iname "test_*_v1.py" -o -iname "test_bigquery.py" \) \)) - name: Store benchmark result uses: rhysd/github-action-benchmark@v1 diff --git a/.github/workflows/build.bazel.sh b/.github/workflows/build.bazel.sh index 44ec7e76f..70dba95f3 100755 --- a/.github/workflows/build.bazel.sh +++ b/.github/workflows/build.bazel.sh @@ -41,11 +41,11 @@ bazel build \ --noshow_loading_progress \ --verbose_failures \ --test_output=errors \ - -- //tensorflow_io/... //tensorflow_io_plugin_gs/... + -- //tensorflow_io/... //tensorflow_io_gcs_filesystem/... rm -rf build && mkdir -p build cp -r bazel-bin/tensorflow_io build/tensorflow_io -cp -r bazel-bin/tensorflow_io_plugin_gs build/tensorflow_io_plugin_gs +cp -r bazel-bin/tensorflow_io_gcs_filesystem build/tensorflow_io_gcs_filesystem exit 0 diff --git a/.github/workflows/build.wheel.sh b/.github/workflows/build.wheel.sh index 71b8e4a9b..5a7948412 100755 --- a/.github/workflows/build.wheel.sh +++ b/.github/workflows/build.wheel.sh @@ -6,7 +6,7 @@ export TF_USE_MODULAR_FILESYSTEM=1 run_test() { entry=$1 CPYTHON_VERSION=$($entry -c 'import sys; print(str(sys.version_info[0])+str(sys.version_info[1]))') - (cd wheelhouse && $entry -m pip install tensorflow_io_plugin_gs-*-cp${CPYTHON_VERSION}-*.whl) + (cd wheelhouse && $entry -m pip install tensorflow_io_gcs_filesystem-*-cp${CPYTHON_VERSION}-*.whl) (cd wheelhouse && $entry -m pip install tensorflow_io-*-cp${CPYTHON_VERSION}-*.whl) $entry -m pip install -q pytest pytest-benchmark pytest-xdist boto3 fastavro avro-python3 scikit-image pandas pyarrow==3.0.0 google-cloud-pubsub==2.1.0 google-cloud-bigtable==1.6.0 google-cloud-bigquery-storage==1.1.0 google-cloud-bigquery==2.3.1 google-cloud-storage==1.32.0 PyYAML==5.3.1 azure-storage-blob==12.8.1 (cd tests && $entry -m pytest --benchmark-disable -v --import-mode=append --forked --numprocesses=auto --dist loadfile $(find . -type f \( -iname "test_*.py" \))) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9df8cd6ce..5326395af 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -120,16 +120,16 @@ jobs: --noshow_loading_progress \ --verbose_failures \ --test_output=errors \ - //tensorflow_io/... //tensorflow_io_plugin_gs/... + //tensorflow_io/... //tensorflow_io_gcs_filesystem/... mkdir build cp -r bazel-bin/tensorflow_io build - cp -r bazel-bin/tensorflow_io_plugin_gs build + cp -r bazel-bin/tensorflow_io_gcs_filesystem build - uses: actions/upload-artifact@v2 with: name: ${{ runner.os }}-bazel-bin path: | build/tensorflow_io - build/tensorflow_io_plugin_gs + build/tensorflow_io_gcs_filesystem macos-wheel: name: Wheel ${{ matrix.python }} macOS @@ -153,7 +153,7 @@ jobs: python -m pip install -U wheel setuptools python --version python setup.py --project tensorflow-io --data bazel-bin -q bdist_wheel --plat-name macosx_10_14_x86_64 - python setup.py --project tensorflow-io-plugin-gs --data bazel-bin -q bdist_wheel --plat-name macosx_10_14_x86_64 + python setup.py --project tensorflow-io-gcs-filesystem --data bazel-bin -q bdist_wheel --plat-name macosx_10_14_x86_64 - name: Auditwheel ${{ matrix.python }} macOS run: | set -x -e @@ -201,7 +201,7 @@ jobs: set -x -e python --version df -h - (cd wheelhouse && python -m pip install tensorflow_io_plugin_gs-*.whl) + (cd wheelhouse && python -m pip install tensorflow_io_gcs_filesystem-*.whl) (cd wheelhouse && python -m pip install tensorflow_io-*.whl) - name: Test ${{ matrix.python }} macOS run: | @@ -232,14 +232,14 @@ jobs: gcr.io/tensorflow-testing/nosla-ubuntu16.04-manylinux2010@sha256:3a9b4820021801b1fa7d0592c1738483ac7abc209fc6ee8c9ef06cf2eab2d170 /v/.github/workflows/build.bazel.sh sudo chown -R $(id -nu):$(id -ng) . sudo find build/tensorflow_io -name '*runfiles*' | sudo xargs rm -rf - sudo find build/tensorflow_io_plugin_gs -name '*runfiles*' | sudo xargs rm -rf + sudo find build/tensorflow_io_gcs_filesystem -name '*runfiles*' | sudo xargs rm -rf sudo cp .bazelrc build/tensorflow_io/ - uses: actions/upload-artifact@v2 with: name: ${{ runner.os }}-bazel-bin path: | build/tensorflow_io - build/tensorflow_io_plugin_gs + build/tensorflow_io_gcs_filesystem linux-wheel: name: Wheel ${{ matrix.python }} Linux @@ -259,7 +259,7 @@ jobs: set -x -e mv bazel-bin/tensorflow_io/.bazelrc . docker run -i --rm --user $(id -u):$(id -g) -v /etc/password:/etc/password -v $PWD:/v -w /v --net=host python:${{ matrix.python }}-slim python setup.py --project tensorflow-io --data bazel-bin -q bdist_wheel - docker run -i --rm --user $(id -u):$(id -g) -v /etc/password:/etc/password -v $PWD:/v -w /v --net=host python:${{ matrix.python }}-slim python setup.py --project tensorflow-io-plugin-gs --data bazel-bin -q bdist_wheel + docker run -i --rm --user $(id -u):$(id -g) -v /etc/password:/etc/password -v $PWD:/v -w /v --net=host python:${{ matrix.python }}-slim python setup.py --project tensorflow-io-gcs-filesystem --data bazel-bin -q bdist_wheel - name: Auditwheel ${{ matrix.python }} Linux run: | set -x -e @@ -348,16 +348,16 @@ jobs: python3 setup.py --install-require | xargs python3 -m pip install python3 tools/build/configure.py cat .bazelrc - bazel build -s --verbose_failures %BAZEL_OPTIMIZATION% //tensorflow_io/core:python/ops/libtensorflow_io.so //tensorflow_io/core:python/ops/libtensorflow_io_plugins.so //tensorflow_io_plugin_gs/... + bazel build -s --verbose_failures %BAZEL_OPTIMIZATION% //tensorflow_io/core:python/ops/libtensorflow_io.so //tensorflow_io/core:python/ops/libtensorflow_io_plugins.so //tensorflow_io_gcs_filesystem/... mkdir build cp -r bazel-bin/tensorflow_io build - cp -r bazel-bin/tensorflow_io_plugin_gs build + cp -r bazel-bin/tensorflow_io_gcs_filesystem build - uses: actions/upload-artifact@v2 with: name: ${{ runner.os }}-bazel-bin path: | build/tensorflow_io - build/tensorflow_io_plugin_gs + build/tensorflow_io_gcs_filesystem windows-wheel: name: Wheel ${{ matrix.python }} Windows @@ -382,7 +382,7 @@ jobs: python --version python -m pip install -U wheel setuptools python setup.py --project tensorflow-io --data bazel-bin -q bdist_wheel - python setup.py --project tensorflow-io-plugin-gs --data bazel-bin -q bdist_wheel + python setup.py --project tensorflow-io-gcs-filesystem --data bazel-bin -q bdist_wheel ls -la dist - uses: actions/upload-artifact@v2 with: @@ -418,7 +418,7 @@ jobs: run: | @echo on python --version - (cd wheel && ls tensorflow_io_plugin_gs-*.whl | xargs python -m pip install && cd ..) + (cd wheel && ls tensorflow_io_gcs_filesystem-*.whl | xargs python -m pip install && cd ..) (cd wheel && ls tensorflow_io-*.whl | xargs python -m pip install && cd ..) - name: Test ${{ matrix.python }} Windows shell: cmd @@ -426,7 +426,7 @@ jobs: @echo on python --version python -m pip install -U pytest-benchmark - rm -rf tensorflow_io tensorflow_io_plugin_gs + rm -rf tensorflow_io tensorflow_io_gcs_filesystem (cd tests && python -m pytest -s -v test_lmdb.py) (python -m pytest -s -v test_image.py -k "webp or ppm or bmp or bounding or exif or hdr or openexr or tiff or avif") (python -m pytest -s -v test_serialization.py) @@ -576,7 +576,7 @@ jobs: python -m pip install -U wheel setuptools python --version python setup.py --project tensorflow-io --data bazel-bin -q bdist_wheel --plat-name macosx_10_14_x86_64 --nightly $BUILD_NUMBER - python setup.py --project tensorflow-io-plugin-gs --data bazel-bin -q bdist_wheel --plat-name macosx_10_14_x86_64 --nightly $BUILD_NUMBER + python setup.py --project tensorflow-io-gcs-filesystem --data bazel-bin -q bdist_wheel --plat-name macosx_10_14_x86_64 --nightly $BUILD_NUMBER - name: Auditwheel ${{ matrix.python }} macOS run: | set -x -e @@ -616,7 +616,7 @@ jobs: set -x -e mv bazel-bin/tensorflow_io/.bazelrc . docker run -i --rm --user $(id -u):$(id -g) -v /etc/password:/etc/password -v $PWD:/v -w /v --net=host python:${{ matrix.python }}-slim python setup.py --project tensorflow-io --data bazel-bin -q bdist_wheel --nightly $BUILD_NUMBER - docker run -i --rm --user $(id -u):$(id -g) -v /etc/password:/etc/password -v $PWD:/v -w /v --net=host python:${{ matrix.python }}-slim python setup.py --project tensorflow-io-plugin-gs --data bazel-bin -q bdist_wheel --nightly $BUILD_NUMBER + docker run -i --rm --user $(id -u):$(id -g) -v /etc/password:/etc/password -v $PWD:/v -w /v --net=host python:${{ matrix.python }}-slim python setup.py --project tensorflow-io-gcs-filesystem --data bazel-bin -q bdist_wheel --nightly $BUILD_NUMBER - name: Auditwheel ${{ matrix.python }} Linux run: | set -x -e @@ -660,7 +660,7 @@ jobs: python --version python -m pip install -U wheel setuptools python setup.py --project tensorflow-io --data bazel-bin -q bdist_wheel --nightly %BUILD_NUMBER% - python setup.py --project tensorflow-io-plugin-gs --data bazel-bin -q bdist_wheel --nightly %BUILD_NUMBER% + python setup.py --project tensorflow-io-gcs-filesystem --data bazel-bin -q bdist_wheel --nightly %BUILD_NUMBER% ls -la dist - uses: actions/upload-artifact@v2 with: @@ -746,24 +746,24 @@ jobs: set -e -x rm -rf dist mkdir -p dist - cp macOS-3.6-nightly/tensorflow_io_plugin_gs_nightly*.whl dist/ - cp macOS-3.7-nightly/tensorflow_io_plugin_gs_nightly*.whl dist/ - cp macOS-3.8-nightly/tensorflow_io_plugin_gs_nightly*.whl dist/ - cp macOS-3.9-nightly/tensorflow_io_plugin_gs_nightly*.whl dist/ - cp Linux-3.6-nightly/tensorflow_io_plugin_gs_nightly*.whl dist/ - cp Linux-3.7-nightly/tensorflow_io_plugin_gs_nightly*.whl dist/ - cp Linux-3.8-nightly/tensorflow_io_plugin_gs_nightly*.whl dist/ - cp Linux-3.9-nightly/tensorflow_io_plugin_gs_nightly*.whl dist/ - cp Windows-3.6-nightly/tensorflow_io_plugin_gs_nightly*.whl dist/ - cp Windows-3.7-nightly/tensorflow_io_plugin_gs_nightly*.whl dist/ - cp Windows-3.8-nightly/tensorflow_io_plugin_gs_nightly*.whl dist/ - cp Windows-3.9-nightly/tensorflow_io_plugin_gs_nightly*.whl dist/ + cp macOS-3.6-nightly/tensorflow_io_gcs_filesystem_nightly*.whl dist/ + cp macOS-3.7-nightly/tensorflow_io_gcs_filesystem_nightly*.whl dist/ + cp macOS-3.8-nightly/tensorflow_io_gcs_filesystem_nightly*.whl dist/ + cp macOS-3.9-nightly/tensorflow_io_gcs_filesystem_nightly*.whl dist/ + cp Linux-3.6-nightly/tensorflow_io_gcs_filesystem_nightly*.whl dist/ + cp Linux-3.7-nightly/tensorflow_io_gcs_filesystem_nightly*.whl dist/ + cp Linux-3.8-nightly/tensorflow_io_gcs_filesystem_nightly*.whl dist/ + cp Linux-3.9-nightly/tensorflow_io_gcs_filesystem_nightly*.whl dist/ + cp Windows-3.6-nightly/tensorflow_io_gcs_filesystem_nightly*.whl dist/ + cp Windows-3.7-nightly/tensorflow_io_gcs_filesystem_nightly*.whl dist/ + cp Windows-3.8-nightly/tensorflow_io_gcs_filesystem_nightly*.whl dist/ + cp Windows-3.9-nightly/tensorflow_io_gcs_filesystem_nightly*.whl dist/ ls -la dist/ sha256sum dist/*.whl - uses: pypa/gh-action-pypi-publish@master with: user: __token__ - password: ${{ secrets.tensorflow_io_plugin_gs_nightly }} + password: ${{ secrets.tensorflow_io_gcs_filesystem_nightly }} docker-nightly: name: Docker Nightly diff --git a/docs/development.md b/docs/development.md index bdd32c488..a65ff48de 100644 --- a/docs/development.md +++ b/docs/development.md @@ -82,7 +82,7 @@ sudo ./configure.sh # export BAZEL_OPTIMIZATION= # Build shared libraries -bazel build -s --verbose_failures $BAZEL_OPTIMIZATION //tensorflow_io/... //tensorflow_io_plugin_gs/... +bazel build -s --verbose_failures $BAZEL_OPTIMIZATION //tensorflow_io/... //tensorflow_io_gcs_filesystem/... # Once build is complete, shared libraries will be available in # `bazel-bin/tensorflow_io/core/python/ops/` and it is possible @@ -141,7 +141,7 @@ sudo ./configure.sh # export BAZEL_OPTIMIZATION= # Build shared libraries -bazel build -s --verbose_failures $BAZEL_OPTIMIZATION //tensorflow_io/... //tensorflow_io_plugin_gs/... +bazel build -s --verbose_failures $BAZEL_OPTIMIZATION //tensorflow_io/... //tensorflow_io_gcs_filesystem/... # Once build is complete, shared libraries will be available in # `bazel-bin/tensorflow_io/core/python/ops/` and it is possible diff --git a/setup.py b/setup.py index 10062366c..5fecdf450 100644 --- a/setup.py +++ b/setup.py @@ -42,7 +42,7 @@ print(require) sys.exit(0) -subpackages = ["tensorflow-io-plugin-gs"] +subpackages = ["tensorflow-io-gcs-filesystem"] assert "--project" in sys.argv, "--project ({} or {}) must be provided".format( "tensorflow-io", ", ".join(subpackages) diff --git a/tensorflow_io_plugin_gs/__init__.py b/tensorflow_io_gcs_filesystem/__init__.py similarity index 87% rename from tensorflow_io_plugin_gs/__init__.py rename to tensorflow_io_gcs_filesystem/__init__.py index ae1119e52..e975da43a 100644 --- a/tensorflow_io_plugin_gs/__init__.py +++ b/tensorflow_io_gcs_filesystem/__init__.py @@ -12,6 +12,6 @@ # See the License for the specific language governing permissions and # limitations under the License. # ============================================================================== -"""tensorflow_io_plugin_gs""" +"""tensorflow_io_gcs_filesystem""" -from tensorflow_io_plugin_gs.core.python.ops import plugin_gs +from tensorflow_io_gcs_filesystem.core.python.ops import plugin_gs diff --git a/tensorflow_io_plugin_gs/core/BUILD b/tensorflow_io_gcs_filesystem/core/BUILD similarity index 90% rename from tensorflow_io_plugin_gs/core/BUILD rename to tensorflow_io_gcs_filesystem/core/BUILD index 83677c2c3..76b7ba732 100644 --- a/tensorflow_io_plugin_gs/core/BUILD +++ b/tensorflow_io_gcs_filesystem/core/BUILD @@ -35,10 +35,10 @@ cc_library( ) cc_binary( - name = "python/ops/libtensorflow_io_plugin_gs.so", + name = "python/ops/libtensorflow_io_gcs_filesystem.so", copts = tf_io_copts(), linkshared = 1, deps = [ - "//tensorflow_io_plugin_gs/core:gs", + "//tensorflow_io_gcs_filesystem/core:gs", ], ) diff --git a/tensorflow_io_plugin_gs/core/__init__.py b/tensorflow_io_gcs_filesystem/core/__init__.py similarity index 100% rename from tensorflow_io_plugin_gs/core/__init__.py rename to tensorflow_io_gcs_filesystem/core/__init__.py diff --git a/tensorflow_io_plugin_gs/core/cleanup.h b/tensorflow_io_gcs_filesystem/core/cleanup.h similarity index 100% rename from tensorflow_io_plugin_gs/core/cleanup.h rename to tensorflow_io_gcs_filesystem/core/cleanup.h diff --git a/tensorflow_io_plugin_gs/core/expiring_lru_cache.h b/tensorflow_io_gcs_filesystem/core/expiring_lru_cache.h similarity index 100% rename from tensorflow_io_plugin_gs/core/expiring_lru_cache.h rename to tensorflow_io_gcs_filesystem/core/expiring_lru_cache.h diff --git a/tensorflow_io_plugin_gs/core/file_system_plugin_gs.cc b/tensorflow_io_gcs_filesystem/core/file_system_plugin_gs.cc similarity index 95% rename from tensorflow_io_plugin_gs/core/file_system_plugin_gs.cc rename to tensorflow_io_gcs_filesystem/core/file_system_plugin_gs.cc index 5afcd0891..df8bfb52c 100644 --- a/tensorflow_io_plugin_gs/core/file_system_plugin_gs.cc +++ b/tensorflow_io_gcs_filesystem/core/file_system_plugin_gs.cc @@ -13,7 +13,7 @@ See the License for the specific language governing permissions and limitations under the License. ==============================================================================*/ -#include "tensorflow_io_plugin_gs/core/file_system_plugin_gs.h" +#include "tensorflow_io_gcs_filesystem/core/file_system_plugin_gs.h" #include "absl/strings/ascii.h" diff --git a/tensorflow_io_plugin_gs/core/file_system_plugin_gs.h b/tensorflow_io_gcs_filesystem/core/file_system_plugin_gs.h similarity index 100% rename from tensorflow_io_plugin_gs/core/file_system_plugin_gs.h rename to tensorflow_io_gcs_filesystem/core/file_system_plugin_gs.h diff --git a/tensorflow_io_plugin_gs/core/gcs_filesystem.cc b/tensorflow_io_gcs_filesystem/core/gcs_filesystem.cc similarity index 99% rename from tensorflow_io_plugin_gs/core/gcs_filesystem.cc rename to tensorflow_io_gcs_filesystem/core/gcs_filesystem.cc index 4d0d6699a..30a05504a 100644 --- a/tensorflow_io_plugin_gs/core/gcs_filesystem.cc +++ b/tensorflow_io_gcs_filesystem/core/gcs_filesystem.cc @@ -22,10 +22,10 @@ limitations under the License. #include "google/cloud/storage/client.h" #include "tensorflow/c/logging.h" #include "tensorflow/c/tf_status.h" -#include "tensorflow_io_plugin_gs/core/expiring_lru_cache.h" -#include "tensorflow_io_plugin_gs/core/file_system_plugin_gs.h" -#include "tensorflow_io_plugin_gs/core/gcs_helper.h" -#include "tensorflow_io_plugin_gs/core/ram_file_block_cache.h" +#include "tensorflow_io_gcs_filesystem/core/expiring_lru_cache.h" +#include "tensorflow_io_gcs_filesystem/core/file_system_plugin_gs.h" +#include "tensorflow_io_gcs_filesystem/core/gcs_helper.h" +#include "tensorflow_io_gcs_filesystem/core/ram_file_block_cache.h" namespace tensorflow { namespace io { diff --git a/tensorflow_io_plugin_gs/core/gcs_helper.cc b/tensorflow_io_gcs_filesystem/core/gcs_helper.cc similarity index 96% rename from tensorflow_io_plugin_gs/core/gcs_helper.cc rename to tensorflow_io_gcs_filesystem/core/gcs_helper.cc index d569a0535..487b90102 100644 --- a/tensorflow_io_plugin_gs/core/gcs_helper.cc +++ b/tensorflow_io_gcs_filesystem/core/gcs_helper.cc @@ -12,7 +12,7 @@ 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. ==============================================================================*/ -#include "tensorflow_io_plugin_gs/core/gcs_helper.h" +#include "tensorflow_io_gcs_filesystem/core/gcs_helper.h" #include diff --git a/tensorflow_io_plugin_gs/core/gcs_helper.h b/tensorflow_io_gcs_filesystem/core/gcs_helper.h similarity index 100% rename from tensorflow_io_plugin_gs/core/gcs_helper.h rename to tensorflow_io_gcs_filesystem/core/gcs_helper.h diff --git a/tensorflow_io_plugin_gs/core/python/__init__.py b/tensorflow_io_gcs_filesystem/core/python/__init__.py similarity index 100% rename from tensorflow_io_plugin_gs/core/python/__init__.py rename to tensorflow_io_gcs_filesystem/core/python/__init__.py diff --git a/tensorflow_io_plugin_gs/core/python/ops/__init__.py b/tensorflow_io_gcs_filesystem/core/python/ops/__init__.py similarity index 92% rename from tensorflow_io_plugin_gs/core/python/ops/__init__.py rename to tensorflow_io_gcs_filesystem/core/python/ops/__init__.py index caa1458ca..204aed12b 100644 --- a/tensorflow_io_plugin_gs/core/python/ops/__init__.py +++ b/tensorflow_io_gcs_filesystem/core/python/ops/__init__.py @@ -38,11 +38,11 @@ def _load_library(filename): if datapath is not None: # Build filename from: # `datapath` + `tensorflow_io_package` + `package_name` + `relpath_to_library` - rootpath = os.path.dirname(sys.modules["tensorflow_io_plugin_gs"].__file__) + rootpath = os.path.dirname(sys.modules["tensorflow_io_gcs_filesystem"].__file__) filename = sys.modules[__name__].__file__ f = os.path.join( datapath, - "tensorflow_io_plugin_gs", + "tensorflow_io_gcs_filesystem", os.path.relpath(os.path.dirname(filename), rootpath), os.path.relpath(f, os.path.dirname(filename)), ) @@ -66,6 +66,6 @@ def _load_library(filename): try: - plugin_gs = _load_library("libtensorflow_io_plugin_gs.so") + plugin_gs = _load_library("libtensorflow_io_gcs_filesystem.so") except NotImplementedError as e: warnings.warn("file system plugin for gs are not loaded: {}".format(e)) diff --git a/tensorflow_io_plugin_gs/core/ram_file_block_cache.cc b/tensorflow_io_gcs_filesystem/core/ram_file_block_cache.cc similarity index 98% rename from tensorflow_io_plugin_gs/core/ram_file_block_cache.cc rename to tensorflow_io_gcs_filesystem/core/ram_file_block_cache.cc index 3f3432f78..106df0aa3 100644 --- a/tensorflow_io_plugin_gs/core/ram_file_block_cache.cc +++ b/tensorflow_io_gcs_filesystem/core/ram_file_block_cache.cc @@ -12,7 +12,7 @@ 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. ==============================================================================*/ -#include "tensorflow_io_plugin_gs/core/ram_file_block_cache.h" +#include "tensorflow_io_gcs_filesystem/core/ram_file_block_cache.h" #include #include @@ -20,7 +20,7 @@ limitations under the License. #include #include "absl/synchronization/mutex.h" -#include "tensorflow_io_plugin_gs/core/cleanup.h" +#include "tensorflow_io_gcs_filesystem/core/cleanup.h" namespace tensorflow { namespace io { diff --git a/tensorflow_io_plugin_gs/core/ram_file_block_cache.h b/tensorflow_io_gcs_filesystem/core/ram_file_block_cache.h similarity index 100% rename from tensorflow_io_plugin_gs/core/ram_file_block_cache.h rename to tensorflow_io_gcs_filesystem/core/ram_file_block_cache.h diff --git a/tests/test_filesystem.py b/tests/test_filesystem.py index 31a250e23..7b3b1b146 100644 --- a/tests/test_filesystem.py +++ b/tests/test_filesystem.py @@ -234,7 +234,7 @@ def gcs_fs(): yield [None] * NUM_ATR_FS return - import tensorflow_io_plugin_gs + import tensorflow_io_gcs_filesystem from google.cloud import storage monkeypatch = pytest.MonkeyPatch() diff --git a/tests/test_gcs.py b/tests/test_gcs.py index ebf02048e..6830340d1 100644 --- a/tests/test_gcs.py +++ b/tests/test_gcs.py @@ -19,7 +19,7 @@ import time import requests import tensorflow as tf -import tensorflow_io_plugin_gs +import tensorflow_io_gcs_filesystem import pytest diff --git a/tools/lint/lint.tpl b/tools/lint/lint.tpl index f63cd0c39..de00afe3d 100644 --- a/tools/lint/lint.tpl +++ b/tools/lint/lint.tpl @@ -118,7 +118,7 @@ else cd "$BUILD_WORKSPACE_DIRECTORY" && \ for i in \ $( \ - find tensorflow_io tensorflow_io_plugin_gs tests -type f \ + find tensorflow_io tensorflow_io_gcs_filesystem tests -type f \ \( -name '*.py' \) \ ) ; do \ black_func $mode "$i" ; \ @@ -182,7 +182,7 @@ else cd "$BUILD_WORKSPACE_DIRECTORY" && \ for i in \ $( \ - find tensorflow_io tensorflow_io_plugin_gs -type f \ + find tensorflow_io tensorflow_io_gcs_filesystem -type f \ \( \ -name '*.cc' \ -o -name '*.h' \ @@ -210,7 +210,7 @@ else cd "$BUILD_WORKSPACE_DIRECTORY" && \ for i in \ $( \ - find tensorflow_io tensorflow_io_plugin_gs tests -type f \ + find tensorflow_io tensorflow_io_gcs_filesystem tests -type f \ \( -name '*.py' \) \ ) ; do \ pyupgrade_func $mode "$i" ; \