Skip to content
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

feat!: add new v3.0.0 API skeleton #745

Merged
merged 27 commits into from Mar 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
8c5fd7d
moved previous client to deprecated, added files for new client
daniel-sanche Mar 3, 2023
393860c
added table api skeleton
daniel-sanche Mar 3, 2023
11b3493
fixed missing files
daniel-sanche Mar 3, 2023
1ac0b7a
updated import paths
daniel-sanche Mar 3, 2023
cf981d8
updated unit tests
daniel-sanche Mar 3, 2023
5ea2bc3
updated system tests
daniel-sanche Mar 3, 2023
84fd9c3
ran blacken
daniel-sanche Mar 3, 2023
43b17dd
added additional unimplemented files
daniel-sanche Mar 3, 2023
32e8e45
improved __init__
daniel-sanche Mar 3, 2023
65cb219
stricter type checks
daniel-sanche Mar 3, 2023
c8b8a5a
ran blacken
daniel-sanche Mar 3, 2023
ff835ec
removed sample implementation from BigtableExceptionGroup
daniel-sanche Mar 3, 2023
3207ef5
fixed circular import issues
daniel-sanche Mar 4, 2023
3b3d720
added deprecation warning
daniel-sanche Mar 4, 2023
fa29ba1
updated warning messages
daniel-sanche Mar 4, 2023
4e792a5
fixed lint issues
daniel-sanche Mar 4, 2023
05e10cd
added comments
daniel-sanche Mar 8, 2023
895093f
removed TypeAlis annotation
daniel-sanche Mar 8, 2023
1684274
changed sequence import
daniel-sanche Mar 8, 2023
75d276a
updated warning tests
daniel-sanche Mar 8, 2023
92752c0
updated doc snippet imports
daniel-sanche Mar 8, 2023
79c82c3
updated docs
daniel-sanche Mar 8, 2023
f3b7fbd
disabled coverage for skeleton code
daniel-sanche Mar 8, 2023
aa37a31
fixed cover change
daniel-sanche Mar 8, 2023
17d731f
adjusted coverage setup
daniel-sanche Mar 9, 2023
a0a5c57
ran blacken
daniel-sanche Mar 9, 2023
64a05d8
changed cover value in noxfile
daniel-sanche Mar 9, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion .coveragerc
Expand Up @@ -24,7 +24,7 @@ omit =
google/cloud/bigtable_admin/gapic_version.py

[report]
fail_under = 100
fail_under = 99
show_missing = True
exclude_lines =
# Re-enable the standard pragma
Expand Down
2 changes: 1 addition & 1 deletion docs/app-profile.rst
@@ -1,6 +1,6 @@
App Profile
~~~~~~~~~~~

.. automodule:: google.cloud.bigtable.app_profile
.. automodule:: google.cloud.bigtable.deprecated.app_profile
:members:
:show-inheritance:
2 changes: 1 addition & 1 deletion docs/backup.rst
@@ -1,6 +1,6 @@
Backup
~~~~~~~~

.. automodule:: google.cloud.bigtable.backup
.. automodule:: google.cloud.bigtable.deprecated.backup
:members:
:show-inheritance:
18 changes: 9 additions & 9 deletions docs/client-intro.rst
@@ -1,21 +1,21 @@
Base for Everything
===================

To use the API, the :class:`Client <google.cloud.bigtable.client.Client>`
To use the API, the :class:`Client <google.cloud.bigtable.deprecated.client.Client>`
class defines a high-level interface which handles authorization
and creating other objects:

.. code:: python

from google.cloud.bigtable.client import Client
from google.cloud.bigtable.deprecated.client import Client
client = Client()

Long-lived Defaults
-------------------

When creating a :class:`Client <google.cloud.bigtable.client.Client>`, the
When creating a :class:`Client <google.cloud.bigtable.deprecated.client.Client>`, the
``user_agent`` argument has sensible a default
(:data:`DEFAULT_USER_AGENT <google.cloud.bigtable.client.DEFAULT_USER_AGENT>`).
(:data:`DEFAULT_USER_AGENT <google.cloud.bigtable.deprecated.client.DEFAULT_USER_AGENT>`).
However, you may over-ride it and the value will be used throughout all API
requests made with the ``client`` you create.

Expand All @@ -38,14 +38,14 @@ Configuration

.. code::

>>> from google.cloud import bigtable
>>> import google.cloud.deprecated as bigtable
>>> client = bigtable.Client()

or pass in ``credentials`` and ``project`` explicitly

.. code::

>>> from google.cloud import bigtable
>>> import google.cloud.deprecated as bigtable
>>> client = bigtable.Client(project='my-project', credentials=creds)

.. tip::
Expand Down Expand Up @@ -73,15 +73,15 @@ you can pass the ``read_only`` argument:
client = bigtable.Client(read_only=True)

This will ensure that the
:data:`READ_ONLY_SCOPE <google.cloud.bigtable.client.READ_ONLY_SCOPE>` is used
:data:`READ_ONLY_SCOPE <google.cloud.bigtable.deprecated.client.READ_ONLY_SCOPE>` is used
for API requests (so any accidental requests that would modify data will
fail).

Next Step
---------

After a :class:`Client <google.cloud.bigtable.client.Client>`, the next highest-level
object is an :class:`Instance <google.cloud.bigtable.instance.Instance>`. You'll need
After a :class:`Client <google.cloud.bigtable.deprecated.client.Client>`, the next highest-level
object is an :class:`Instance <google.cloud.bigtable.deprecated.instance.Instance>`. You'll need
one before you can interact with tables or data.

Head next to learn about the :doc:`instance-api`.
Expand Down
2 changes: 1 addition & 1 deletion docs/client.rst
@@ -1,6 +1,6 @@
Client
~~~~~~

.. automodule:: google.cloud.bigtable.client
.. automodule:: google.cloud.bigtable.deprecated.client
:members:
:show-inheritance:
2 changes: 1 addition & 1 deletion docs/cluster.rst
@@ -1,6 +1,6 @@
Cluster
~~~~~~~

.. automodule:: google.cloud.bigtable.cluster
.. automodule:: google.cloud.bigtable.deprecated.cluster
:members:
:show-inheritance:
22 changes: 11 additions & 11 deletions docs/column-family.rst
Expand Up @@ -2,27 +2,27 @@ Column Families
===============

When creating a
:class:`ColumnFamily <google.cloud.bigtable.column_family.ColumnFamily>`, it is
:class:`ColumnFamily <google.cloud.bigtable.deprecated.column_family.ColumnFamily>`, it is
possible to set garbage collection rules for expired data.

By setting a rule, cells in the table matching the rule will be deleted
during periodic garbage collection (which executes opportunistically in the
background).

The types
:class:`MaxAgeGCRule <google.cloud.bigtable.column_family.MaxAgeGCRule>`,
:class:`MaxVersionsGCRule <google.cloud.bigtable.column_family.MaxVersionsGCRule>`,
:class:`GarbageCollectionRuleUnion <google.cloud.bigtable.column_family.GarbageCollectionRuleUnion>` and
:class:`GarbageCollectionRuleIntersection <google.cloud.bigtable.column_family.GarbageCollectionRuleIntersection>`
:class:`MaxAgeGCRule <google.cloud.bigtable.deprecated.column_family.MaxAgeGCRule>`,
:class:`MaxVersionsGCRule <google.cloud.bigtable.deprecated.column_family.MaxVersionsGCRule>`,
:class:`GarbageCollectionRuleUnion <google.cloud.bigtable.deprecated.column_family.GarbageCollectionRuleUnion>` and
:class:`GarbageCollectionRuleIntersection <google.cloud.bigtable.deprecated.column_family.GarbageCollectionRuleIntersection>`
can all be used as the optional ``gc_rule`` argument in the
:class:`ColumnFamily <google.cloud.bigtable.column_family.ColumnFamily>`
:class:`ColumnFamily <google.cloud.bigtable.deprecated.column_family.ColumnFamily>`
constructor. This value is then used in the
:meth:`create() <google.cloud.bigtable.column_family.ColumnFamily.create>` and
:meth:`update() <google.cloud.bigtable.column_family.ColumnFamily.update>` methods.
:meth:`create() <google.cloud.bigtable.deprecated.column_family.ColumnFamily.create>` and
:meth:`update() <google.cloud.bigtable.deprecated.column_family.ColumnFamily.update>` methods.

These rules can be nested arbitrarily, with a
:class:`MaxAgeGCRule <google.cloud.bigtable.column_family.MaxAgeGCRule>` or
:class:`MaxVersionsGCRule <google.cloud.bigtable.column_family.MaxVersionsGCRule>`
:class:`MaxAgeGCRule <google.cloud.bigtable.deprecated.column_family.MaxAgeGCRule>` or
:class:`MaxVersionsGCRule <google.cloud.bigtable.deprecated.column_family.MaxVersionsGCRule>`
at the lowest level of the nesting:

.. code:: python
Expand All @@ -44,6 +44,6 @@ at the lowest level of the nesting:

----

.. automodule:: google.cloud.bigtable.column_family
.. automodule:: google.cloud.bigtable.deprecated.column_family
:members:
:show-inheritance: