Skip to content

Commit

Permalink
feat!: add new v3.0.0 API skeleton (#745)
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-sanche committed Mar 14, 2023
1 parent 77b5bcd commit b5b62c8
Show file tree
Hide file tree
Showing 76 changed files with 3,165 additions and 1,329 deletions.
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:

0 comments on commit b5b62c8

Please sign in to comment.