-
Notifications
You must be signed in to change notification settings - Fork 58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore(docs): add preview docstrings to v3 client #926
Merged
Merged
Changes from 59 commits
Commits
Show all changes
68 commits
Select commit
Hold shift + click to select a range
b5b62c8
feat!: add new v3.0.0 API skeleton (#745)
daniel-sanche 7d51eeb
chore: merge branch 'main' into v3
daniel-sanche 507da99
feat: improve rows filters (#751)
daniel-sanche 71b0312
feat: read rows query model class (#752)
daniel-sanche c55099f
feat: implement row and cell model classes (#753)
daniel-sanche f9a1907
feat: add pooled grpc transport (#748)
daniel-sanche 3de7a68
feat: implement read_rows (#762)
daniel-sanche 9b81289
feat: implement mutate rows (#769)
daniel-sanche ec3fd01
feat: literal value filter (#767)
daniel-sanche 5d65703
feat: row_exists and read_row (#778)
daniel-sanche 432d159
feat: read_modify_write and check_and_mutate_row (#780)
daniel-sanche ec2b983
feat: sharded read rows (#766)
daniel-sanche ceaf598
feat: ping and warm with metadata (#810)
daniel-sanche 1ecf65f
feat: mutate rows batching (#770)
daniel-sanche eedde1e
chore: restructure module paths (#816)
daniel-sanche 07438ca
feat: improve timeout structure (#819)
daniel-sanche 0d92a84
fix: api errors apply to all bulk mutations
daniel-sanche a8cdf7c
chore: reduce public api surface (#820)
daniel-sanche aa760b2
feat: improve error group tracebacks on < py11 (#825)
daniel-sanche 0323dde
feat: optimize read_rows (#852)
daniel-sanche 0b3606f
chore: add user agent suffix (#842)
daniel-sanche b6d232a
feat: optimize retries (#854)
daniel-sanche 8708a25
feat: add test proxy (#836)
daniel-sanche 1d3a7c1
chore(tests): add conformance tests to CI for v3 (#870)
daniel-sanche 50531e5
chore(tests): turn off fast fail for conformance tets (#882)
daniel-sanche 8ff1216
feat: add TABLE_DEFAULTS enum for table method arguments (#880)
daniel-sanche 94bfe66
fix: pass None for retry in gapic calls (#881)
daniel-sanche 3ac80a9
feat: replace internal dictionaries with protos in gapic calls (#875)
daniel-sanche b191451
chore: optimize gapic calls (#863)
daniel-sanche 285cdd3
feat: expose retryable error codes to users (#879)
daniel-sanche 9342e27
chore: update api_core submodule (#897)
daniel-sanche 858b93a
chore: merge main into experimental_v3 (#900)
daniel-sanche cc79d8c
chore: pin conformance tests to v0.0.2 (#903)
daniel-sanche f0d75de
fix: bulk mutation eventual success (#909)
daniel-sanche cdfcc2a
chore: merge branch 'main'
daniel-sanche 5e11180
chore: move batcher file
daniel-sanche 35996a8
chore: Merge branch 'main'
daniel-sanche 54dbc08
chore(tests): fixed failing test
daniel-sanche fd4fba3
chore: downgraded system_emulated
daniel-sanche f4ac54f
fix: use default project in emulator mode
daniel-sanche 79157c9
chore(tests): system tests support emulator
daniel-sanche b5c533b
chore(tests): use legacy client to spin up instance in system tests
daniel-sanche 54462e2
chore(tests): revert back to gapic clients
daniel-sanche aeea5c6
fixed support for system_emulated
daniel-sanche ef29512
chore: ran blacken
daniel-sanche 3b5b033
chore(tests): use emulator mode in github actions unit tests
daniel-sanche 73171eb
run unit tests in emulator mode by default
daniel-sanche 6fa49ab
iterating on tests
daniel-sanche 52ec52a
use the same client init function in unit tests
daniel-sanche b2bf56f
use _make_client in more places
daniel-sanche 7931069
iterating on tests
daniel-sanche 8b886b3
changed cover requirement
daniel-sanche c3ed5aa
updated README
daniel-sanche 158ceed
updated owlbot file
daniel-sanche 22e1947
updated api_core version in setup.py
daniel-sanche 9e60999
🦉 Updates from OwlBot post-processor
gcf-owl-bot[bot] 1a32de2
Revert "updated README"
daniel-sanche fb9a4e6
added note about new client to readme
daniel-sanche f32986e
added warning to method and class docstrings
daniel-sanche 968b539
Merge branch 'main' into document_v3
daniel-sanche 77f60ad
removed conformance tests from main session
daniel-sanche 48129c1
iterating on README text
daniel-sanche 653905e
added additional README
daniel-sanche 29709eb
experimental -> in preview
daniel-sanche 2d1ec99
moved section; added feedback links
daniel-sanche cf41160
removed happy base section
daniel-sanche 2ed86de
fixed version style
daniel-sanche 1aaeb4b
update readme wording
daniel-sanche File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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 |
---|---|---|
@@ -0,0 +1,56 @@ | ||
# Copyright 2023 Google LLC | ||
# | ||
# 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. | ||
# Github action job to test core java library features on | ||
# downstream client libraries before they are released. | ||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
name: Conformance | ||
jobs: | ||
conformance: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
test-version: [ "v0.0.2" ] | ||
py-version: [ 3.8 ] | ||
client-type: [ "Async v3", "Legacy" ] | ||
fail-fast: false | ||
name: "${{ matrix.client-type }} Client / Python ${{ matrix.py-version }} / Test Tag ${{ matrix.test-version }}" | ||
steps: | ||
- uses: actions/checkout@v3 | ||
name: "Checkout python-bigtable" | ||
- uses: actions/checkout@v3 | ||
name: "Checkout conformance tests" | ||
with: | ||
repository: googleapis/cloud-bigtable-clients-test | ||
ref: ${{ matrix.test-version }} | ||
path: cloud-bigtable-clients-test | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.py-version }} | ||
- uses: actions/setup-go@v4 | ||
with: | ||
go-version: '>=1.20.2' | ||
- run: chmod +x .kokoro/conformance.sh | ||
- run: pip install -e . | ||
name: "Install python-bigtable from HEAD" | ||
- run: go version | ||
- run: .kokoro/conformance.sh | ||
name: "Run tests" | ||
env: | ||
CLIENT_TYPE: ${{ matrix.client-type }} | ||
PYTHONUNBUFFERED: 1 | ||
|
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 |
---|---|---|
|
@@ -20,7 +20,7 @@ jobs: | |
python-version: '3.8' | ||
|
||
- name: Setup GCloud SDK | ||
uses: google-github-actions/[email protected].1 | ||
uses: google-github-actions/[email protected].0 | ||
|
||
- name: Install / run Nox | ||
run: | | ||
|
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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
[submodule "python-api-core"] | ||
path = python-api-core | ||
url = [email protected]:googleapis/python-api-core.git | ||
[submodule "gapic-generator-fork"] | ||
path = gapic-generator-fork | ||
url = [email protected]:googleapis/gapic-generator-python.git |
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,52 @@ | ||
#!/bin/bash | ||
|
||
# Copyright 2023 Google LLC | ||
# | ||
# 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. | ||
|
||
set -eo pipefail | ||
|
||
## cd to the parent directory, i.e. the root of the git repo | ||
cd $(dirname $0)/.. | ||
|
||
PROXY_ARGS="" | ||
TEST_ARGS="" | ||
if [[ "${CLIENT_TYPE^^}" == "LEGACY" ]]; then | ||
echo "Using legacy client" | ||
PROXY_ARGS="--legacy-client" | ||
# legacy client does not expose mutate_row. Disable those tests | ||
TEST_ARGS="-skip TestMutateRow_" | ||
fi | ||
|
||
# Build and start the proxy in a separate process | ||
PROXY_PORT=9999 | ||
pushd test_proxy | ||
nohup python test_proxy.py --port $PROXY_PORT $PROXY_ARGS & | ||
proxyPID=$! | ||
popd | ||
|
||
# Kill proxy on exit | ||
function cleanup() { | ||
echo "Cleanup testbench"; | ||
kill $proxyPID | ||
} | ||
trap cleanup EXIT | ||
|
||
# Run the conformance test | ||
pushd cloud-bigtable-clients-test/tests | ||
eval "go test -v -proxy_addr=:$PROXY_PORT $TEST_ARGS" | ||
RETURN_CODE=$? | ||
popd | ||
|
||
echo "exiting with ${RETURN_CODE}" | ||
exit ${RETURN_CODE} |
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,6 @@ | ||
# Format: //devtools/kokoro/config/proto/build.proto | ||
|
||
env_vars: { | ||
key: "NOX_SESSION" | ||
value: "conformance" | ||
} |
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
Submodule gapic-generator-fork
added at
b26cda
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,73 @@ | ||
# -*- coding: utf-8 -*- | ||
# Copyright 2023 Google LLC | ||
# | ||
# 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 google.cloud.bigtable import gapic_version as package_version | ||
|
||
from google.cloud.bigtable.data._async.client import BigtableDataClientAsync | ||
from google.cloud.bigtable.data._async.client import TableAsync | ||
|
||
from google.cloud.bigtable.data._async.mutations_batcher import MutationsBatcherAsync | ||
|
||
from google.cloud.bigtable.data.read_rows_query import ReadRowsQuery | ||
from google.cloud.bigtable.data.read_rows_query import RowRange | ||
from google.cloud.bigtable.data.row import Row | ||
from google.cloud.bigtable.data.row import Cell | ||
|
||
from google.cloud.bigtable.data.mutations import Mutation | ||
from google.cloud.bigtable.data.mutations import RowMutationEntry | ||
from google.cloud.bigtable.data.mutations import SetCell | ||
from google.cloud.bigtable.data.mutations import DeleteRangeFromColumn | ||
from google.cloud.bigtable.data.mutations import DeleteAllFromFamily | ||
from google.cloud.bigtable.data.mutations import DeleteAllFromRow | ||
|
||
from google.cloud.bigtable.data.exceptions import InvalidChunk | ||
from google.cloud.bigtable.data.exceptions import FailedMutationEntryError | ||
from google.cloud.bigtable.data.exceptions import FailedQueryShardError | ||
|
||
from google.cloud.bigtable.data.exceptions import RetryExceptionGroup | ||
from google.cloud.bigtable.data.exceptions import MutationsExceptionGroup | ||
from google.cloud.bigtable.data.exceptions import ShardedReadRowsExceptionGroup | ||
|
||
from google.cloud.bigtable.data._helpers import TABLE_DEFAULT | ||
from google.cloud.bigtable.data._helpers import RowKeySamples | ||
from google.cloud.bigtable.data._helpers import ShardedQuery | ||
|
||
|
||
__version__: str = package_version.__version__ | ||
|
||
__all__ = ( | ||
"BigtableDataClientAsync", | ||
"TableAsync", | ||
"RowKeySamples", | ||
"ReadRowsQuery", | ||
"RowRange", | ||
"MutationsBatcherAsync", | ||
"Mutation", | ||
"RowMutationEntry", | ||
"SetCell", | ||
"DeleteRangeFromColumn", | ||
"DeleteAllFromFamily", | ||
"DeleteAllFromRow", | ||
"Row", | ||
"Cell", | ||
"InvalidChunk", | ||
"FailedMutationEntryError", | ||
"FailedQueryShardError", | ||
"RetryExceptionGroup", | ||
"MutationsExceptionGroup", | ||
"ShardedReadRowsExceptionGroup", | ||
"ShardedQuery", | ||
"TABLE_DEFAULT", | ||
) |
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,25 @@ | ||
# Copyright 2023 Google LLC | ||
# | ||
# 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 google.cloud.bigtable.data._async.client import BigtableDataClientAsync | ||
from google.cloud.bigtable.data._async.client import TableAsync | ||
|
||
from google.cloud.bigtable.data._async.mutations_batcher import MutationsBatcherAsync | ||
|
||
|
||
__all__ = [ | ||
"BigtableDataClientAsync", | ||
"TableAsync", | ||
"MutationsBatcherAsync", | ||
] |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can point this README to a new README file under _async, and provide some examples there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point about the secondary README, I added another one in the
/data
folderBut we discussed offline adding the usage examples later, so for now it just includes some of the same content as this one. Let me know what you think
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup let's update examples later!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we move this section to the top of the document? (or at least above HappyBase) I don't think we want to advertise happybase anymore
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, moved to the top and removed the happybase section
I also added feedback links