Skip to content

Commit

Permalink
linting
Browse files Browse the repository at this point in the history
  • Loading branch information
kboroszko committed Nov 26, 2021
1 parent 9fb5a99 commit 16b6197
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 6 deletions.
6 changes: 3 additions & 3 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,9 @@ http_archive(
name = "com_google_googleapis",
build_file = "@com_github_googleapis_google_cloud_cpp//bazel:googleapis.BUILD",
patch_cmds = [
"""sed -i.bak 's/OPTIONAL/OPIONAL/g' google/api/field_behavior.proto""",
"""sed -i.bak 's/OPTIONAL/OPIONAL/g' google/pubsub/v1beta2/pubsub.proto""",
"""sed -i.bak 's/OPTIONAL/OPIONAL/g' google/pubsub/v1/pubsub.proto""",
"""sed -i.bak 's/OPTIONAL/OPIONAL/g' google/api/field_behavior.proto""",
"""sed -i.bak 's/OPTIONAL/OPIONAL/g' google/pubsub/v1beta2/pubsub.proto""",
"""sed -i.bak 's/OPTIONAL/OPIONAL/g' google/pubsub/v1/pubsub.proto""",
],
sha256 = "a53e15405f81d5a32594d7f6486e649131fadda5431cf28377dff4ae54d45d16",
strip_prefix = "googleapis-d4d09eb3aec152015f35717102f9b423988b94f7",
Expand Down
9 changes: 9 additions & 0 deletions bld.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/usr/bin/env bash

ls dist/*
for f in dist/*.whl; do
docker run -i --rm -v $PWD:/v -w /v --net=host quay.io/pypa/manylinux2010_x86_64 bash -x -e /v/tools/build/auditwheel repair --plat manylinux2010_x86_64 $f
done
sudo chown -R $(id -nu):$(id -ng) .
ls wheelhouse/*

6 changes: 3 additions & 3 deletions tensorflow_io/core/kernels/bigtable/serialization.cc
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ namespace {

#include <winsock.h>

inline StatusOr<bool> BytesToBool(const std::string &bytes) {
inline StatusOr<bool> BytesToBool(const std::string& bytes) {
union {
char byte;
bool res;
Expand All @@ -38,7 +38,7 @@ inline StatusOr<bool> BytesToBool(const std::string &bytes) {
return u.res;
}

inline StatusOr<uint32_t> BytesToInt32(const std::string &bytes) {
inline StatusOr<uint32_t> BytesToInt32(const std::string& bytes) {
union {
char bytes[4];
uint32_t res;
Expand All @@ -50,7 +50,7 @@ inline StatusOr<uint32_t> BytesToInt32(const std::string &bytes) {
return ntohl(u.res);
}

inline StatusOr<uint64_t> BytesToInt64(const std::string &bytes) {
inline StatusOr<uint64_t> BytesToInt64(const std::string& bytes) {
union {
char bytes[8];
uint32_t res;
Expand Down
14 changes: 14 additions & 0 deletions test.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import tensorflow_io as tfio
from tensorflow_io import bigtable as bt

_=[print(x) for x in dir(bt)]

c = bt.BigtableClient("test-project", "test-instance")
t = c.get_table("t1")
row_s = row_set.from_rows_or_ranges(row_range.closed_range("row000", "row009"))

read_rows = [
r for r in t.read_rows(["cf1:c1"], row_set=row_s)
]
print(read_rows)

0 comments on commit 16b6197

Please sign in to comment.