Skip to content

Commit

Permalink
Merge pull request googleapis#129 from jgeewax/koss-master-merge
Browse files Browse the repository at this point in the history
Merge upstream/master into firestore-master branch.
  • Loading branch information
mckoss authored Dec 7, 2016
2 parents 41cd0fe + 63c35a4 commit 513c9c7
Show file tree
Hide file tree
Showing 284 changed files with 10,450 additions and 6,790 deletions.
2 changes: 2 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ omit =
*/_generated/*.py
# Packages in the "google.cloud" package that we don't own.
*/google/cloud/gapic/*
*/google/cloud/grpc/*
show_missing = True
exclude_lines =
# Re-enable the standard pragma
pragma: NO COVER
Expand Down
10 changes: 9 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,28 @@
language: python
sudo: false

addons:
apt:
sources:
- deadsnakes
packages:
- python3.5

install:
- pip install --upgrade pip tox

script:
- python2.7 scripts/run_unit_tests.py
- python3.4 scripts/run_unit_tests.py
- python3.5 scripts/run_unit_tests.py
- python scripts/run_unit_tests.py --tox-env cover
- tox -e lint
- tox -e system-tests
- tox -e system-tests3
- scripts/update_docs.sh

after_success:
- scripts/travis_coveralls.sh
- scripts/coveralls.sh

cache:
directories:
Expand Down
67 changes: 42 additions & 25 deletions CONTRIBUTING.rst
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
############
Contributing
============================
############

#. **Please sign one of the contributor license agreements below.**
#. Fork the repo, develop and test your code changes, add docs.
#. Make sure that your commit messages clearly describe the changes.
#. Send a pull request.
#. Send a pull request. (Please Read: `Faster Pull Request Reviews`_)

Here are some guidelines for hacking on ``google-cloud-python``.
.. _Faster Pull Request Reviews: https://github.com/kubernetes/kubernetes/blob/master/docs/devel/faster_reviews.md

.. contents:: Here are some guidelines for hacking on ``google-cloud-python``.

***************
Adding Features
---------------
***************

In order to add a feature to ``google-cloud-python``:

Expand All @@ -23,8 +27,9 @@ In order to add a feature to ``google-cloud-python``:
"unnecessary" is of course subjective, but new dependencies should
be discussed).

****************************
Using a Development Checkout
----------------------------
****************************

You'll have to create a development environment to hack on
``google-cloud-python``, using a Git checkout:
Expand Down Expand Up @@ -58,7 +63,7 @@ but you can also use a ``virtualenv`` of your own creation.
.. _repo: https://github.com/GoogleCloudPlatform/google-cloud-python

Using a custom ``virtualenv``
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
=============================

- To create a virtualenv in which to install ``google-cloud-python``::

Expand Down Expand Up @@ -87,7 +92,7 @@ Using a custom ``virtualenv``
project, because it uses `namespace packages`_.

Using ``tox``
~~~~~~~~~~~~~
=============

- To test your changes, run unit tests with ``tox``::

Expand Down Expand Up @@ -125,7 +130,7 @@ Using ``tox``
$ tox -e py27

Note on Editable Installs / Develop Mode
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
========================================

- As mentioned previously, using ``setuptools`` in `develop mode`_
or a ``pip`` `editable install`_ is not possible with this
Expand All @@ -143,17 +148,19 @@ Note on Editable Installs / Develop Mode
.. _develop mode: https://setuptools.readthedocs.io/en/latest/setuptools.html#development-mode
.. _editable install: https://pip.pypa.io/en/stable/reference/pip_install/#editable-installs

*****************************************
I'm getting weird errors... Can you help?
-----------------------------------------
*****************************************

If the error mentions ``Python.h`` not being found,
install ``python-dev`` and try again.
On Debian/Ubuntu::

$ sudo apt-get install python-dev

************
Coding Style
------------
************

- PEP8 compliance, with exceptions defined in ``tox.ini``.
If you have ``tox`` installed, you can test that you have not introduced
Expand All @@ -174,12 +181,13 @@ Coding Style

Exceptions to PEP8:

- Many unit tests use a helper method, ``_callFUT`` ("FUT" is short for
- Many unit tests use a helper method, ``_call_fut`` ("FUT" is short for
"Function-Under-Test"), which is PEP8-incompliant, but more readable.
Some also use a local variable, ``MUT`` (short for "Module-Under-Test").

*************
Running Tests
--------------
*************

- To run all tests for ``google-cloud-python`` on a single Python version, run
``py.test`` from your development virtualenv (See
Expand All @@ -202,8 +210,9 @@ Running Tests

.. _Using a Development Checkout: #using-a-development-checkout

********************
Running System Tests
--------------------
********************

- To run system tests you can execute::

Expand Down Expand Up @@ -235,8 +244,6 @@ Running System Tests
`docs <https://cloud.google.com/storage/docs/authentication#generating-a-private-key>`__
for more details. In order for Logging system tests to work, the Service Account
will also have to be made a project Owner. This can be changed under "IAM & Admin".
- ``GOOGLE_CLOUD_TESTS_API_KEY``: The API key for your project with
the Google Translate API (and others) enabled.

- Examples of these can be found in ``system_tests/local_test_setup.sample``. We
recommend copying this to ``system_tests/local_test_setup``, editing the
Expand Down Expand Up @@ -271,6 +278,9 @@ Running System Tests

$ python system_tests/clear_datastore.py

System Test Emulators
=====================

- System tests can also be run against local `emulators`_ that mock
the production services. To run the system tests with the
``datastore`` emulator::
Expand Down Expand Up @@ -338,14 +348,16 @@ Running System Tests

$ kill -- -44444

*************
Test Coverage
-------------
*************

- The codebase *must* have 100% test statement coverage after each commit.
You can test coverage via ``tox -e cover``.

******************************************************
Documentation Coverage and Building HTML Documentation
------------------------------------------------------
******************************************************

If you fix a bug, and the bug requires an API or behavior modification, all
documentation in this package which references that API or behavior must be
Expand All @@ -355,13 +367,13 @@ or adds the feature.
To build and review docs (where ``${VENV}`` refers to the virtualenv you're
using to develop ``google-cloud-python``):

1. After following the steps above in "Using a Development Checkout", install
#. After following the steps above in "Using a Development Checkout", install
Sphinx and all development requirements in your virtualenv::

$ cd ${HOME}/hack-on-google-cloud-python
$ ${VENV}/bin/pip install Sphinx

2. Change into the ``docs`` directory within your ``google-cloud-python`` checkout and
#. Change into the ``docs`` directory within your ``google-cloud-python`` checkout and
execute the ``make`` command with some flags::

$ cd ${HOME}/hack-on-google-cloud-python/google-cloud-python/docs
Expand All @@ -371,16 +383,17 @@ using to develop ``google-cloud-python``):
which will have both Sphinx and ``google-cloud-python`` (for API documentation
generation) installed.

3. Open the ``docs/_build/html/index.html`` file to see the resulting HTML
#. Open the ``docs/_build/html/index.html`` file to see the resulting HTML
rendering.

As an alternative to 1. and 2. above, if you have ``tox`` installed, you
can build the docs via::

$ tox -e docs

********************************************
Note About ``README`` as it pertains to PyPI
--------------------------------------------
********************************************

The `description on PyPI`_ for the project comes directly from the
``README``. Due to the reStructuredText (``rst``) parser used by
Expand All @@ -391,8 +404,9 @@ may cause problems creating links or rendering the description.

.. _description on PyPI: https://pypi.python.org/pypi/google-cloud

********************************************
Travis Configuration and Build Optimizations
--------------------------------------------
********************************************

All build scripts in the ``.travis.yml`` configuration file which have
Python dependencies are specified in the ``tox.ini`` configuration.
Expand All @@ -412,8 +426,9 @@ way, we'll always get the latest versions of our dependencies and any
caching or wheel optimization to be done will be handled automatically
by ``pip``.

*************************
Supported Python Versions
-------------------------
*************************

We support:

Expand Down Expand Up @@ -452,8 +467,9 @@ We also explicitly decided to support Python 3 beginning with version
.. _Unicode literal support: https://www.python.org/dev/peps/pep-0414/
.. _dropped 2.6: https://github.com/GoogleCloudPlatform/google-cloud-python/issues/995

**********
Versioning
----------
**********

This library follows `Semantic Versioning`_.

Expand All @@ -463,8 +479,9 @@ It is currently in major version zero (``0.y.z``), which means that anything
may change at any time and the public API should not be considered
stable.

******************************
Contributor License Agreements
------------------------------
******************************

Before we can accept your pull requests you'll need to sign a Contributor License Agreement (CLA):

Expand Down
19 changes: 17 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ Google Cloud Python Client

.. _Google Cloud Platform: https://cloud.google.com/

|pypi| |build| |appveyor| |coverage| |versions|
|pypi| |circleci| |build| |appveyor| |coverage| |versions|

- `Homepage`_
- `API Documentation`_
- `Read The Docs Documentation`_

.. _Homepage: https://googlecloudplatform.github.io/google-cloud-python/
.. _API Documentation: https://googlecloudplatform.github.io/google-cloud-python/stable/
.. _Read The Docs Documentation: https://google-cloud-python.readthedocs.io/en/stable/
.. _Read The Docs Documentation: https://google-cloud-python.readthedocs.io/en/latest/

This client supports the following Google Cloud Platform services:

Expand All @@ -31,6 +31,7 @@ This client supports the following Google Cloud Platform services:
- `Google Translate`_ (`Translate README`_)
- `Google Cloud Vision`_ (`Vision README`_)
- `Google Cloud Bigtable - HappyBase`_ (`HappyBase README`_)
- `Google Cloud Runtime Configuration`_ (`Runtime Config README`_)

.. _Google Cloud Datastore: https://pypi.python.org/pypi/google-cloud-datastore
.. _Datastore README: https://github.com/GoogleCloudPlatform/google-cloud-python/tree/master/datastore
Expand Down Expand Up @@ -60,6 +61,8 @@ This client supports the following Google Cloud Platform services:
.. _Vision README: https://github.com/GoogleCloudPlatform/google-cloud-python/tree/master/vision
.. _Google Cloud Bigtable - HappyBase: https://pypi.python.org/pypi/google-cloud-happybase/
.. _HappyBase README: https://github.com/GoogleCloudPlatform/google-cloud-python-happybase
.. _Google Cloud Runtime Configuration: https://cloud.google.com/deployment-manager/runtime-configurator/
.. _Runtime Config README: https://github.com/GoogleCloudPlatform/google-cloud-python/tree/master/runtimeconfig

If you need support for other Google APIs, check out the
`Google APIs Python Client library`_.
Expand Down Expand Up @@ -103,6 +106,16 @@ See `CONTRIBUTING`_ for more information on how to get started.

.. _CONTRIBUTING: https://github.com/GoogleCloudPlatform/google-cloud-python/blob/master/CONTRIBUTING.rst

Community
---------

Google Cloud Platform Python developers hang out in `Slack`_ in the ``#python``
channel, click here to `get an invitation`_.


.. _Slack: https://googlecloud-community.slack.com
.. _get an invitation: https://gcp-slack.appspot.com/

License
-------

Expand All @@ -112,6 +125,8 @@ Apache 2.0 - See `LICENSE`_ for more information.

.. |build| image:: https://travis-ci.org/GoogleCloudPlatform/google-cloud-python.svg?branch=master
:target: https://travis-ci.org/GoogleCloudPlatform/google-cloud-python
.. |circleci| image:: https://circleci.com/gh/GoogleCloudPlatform/google-cloud-python.svg?style=shield
:target: https://circleci.com/gh/GoogleCloudPlatform/google-cloud-python
.. |appveyor| image:: https://ci.appveyor.com/api/projects/status/github/googlecloudplatform/google-cloud-python?branch=master&svg=true
:target: https://ci.appveyor.com/project/GoogleCloudPlatform/google-cloud-python
.. |coverage| image:: https://coveralls.io/repos/GoogleCloudPlatform/google-cloud-python/badge.png?branch=master
Expand Down
3 changes: 3 additions & 0 deletions bigquery/google/cloud/bigquery/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@
"""


from google.cloud.bigquery._helpers import ArrayQueryParameter
from google.cloud.bigquery._helpers import ScalarQueryParameter
from google.cloud.bigquery._helpers import StructQueryParameter
from google.cloud.bigquery.client import Client
from google.cloud.bigquery.dataset import AccessGrant
from google.cloud.bigquery.dataset import Dataset
Expand Down
Loading

0 comments on commit 513c9c7

Please sign in to comment.