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

Add docs session to nox configuration for BigQuery #7541

Merged
merged 2 commits into from Mar 22, 2019

Conversation

tswast
Copy link
Contributor

@tswast tswast commented Mar 21, 2019

  • Run with nox -s docs. This allows us to just build the BigQuery docs
    to preview changes more quickly.

  • Moves the magics module documentation to the top level. I found it
    impossible to debug the autosummary errors with generating the docs
    for the magics module, so I move those docs to our more standard
    automodule pattern. With automodule, the error messages were more
    clear (the IPython package was missing in my original implementation).
    Since this module is referenced in documentation and elsewhere, add a
    redirect to the new magics module documentation from the old generated
    location.

* Run with `nox -s docs`. This allows us to just build the BigQuery docs
  to preview changes more quickly.

* Moves the magics module documentation to the top level. I found it
  impossible to debug the autosummary errors with generating the docs
  for the magics module, so I move those docs to our more standard
  automodule pattern. With automodule, the error messages were more
  clear (the IPython package was missing in my original implementation).
  Since this module is referenced in documentation and elsewhere, add a
  redirect to the new magics module documentation from the old generated
  location.
@tswast tswast requested review from tseaver and alixhami March 21, 2019 16:58
@tswast tswast requested a review from crwilcox as a code owner March 21, 2019 16:58
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Mar 21, 2019
@tswast tswast added api: bigquery Issues related to the BigQuery API. type: docs Improvement to the documentation for an API. labels Mar 21, 2019
@tswast
Copy link
Contributor Author

tswast commented Mar 21, 2019

Test failure appears to be a flake. All sessions passed except system-2.7

Running session system-2.7
Creating virtualenv using python2.7 in /tmpfs/src/github/google-cloud-python/bigquery/.nox/system-2-7
pip install --upgrade --pre grpcio
pip install --upgrade mock pytest
pip install --upgrade -e ../api_core[grpc]
pip install --upgrade -e ../core
pip install --upgrade -e ../bigquery_storage[pandas,fastavro]
pip install --upgrade -e ../storage
pip install --upgrade -e ../test_utils
pip install --upgrade -e .[pandas]
pip install --upgrade ipython==5.5
py.test --quiet tests/system.py
......................F...........................                       [100%]
=================================== FAILURES ===================================
_______________________ TestBigQuery.test_list_datasets ________________________
self = <tests.system.TestBigQuery testMethod=test_list_datasets>
    def test_list_datasets(self):
        datasets_to_create = [
            "new" + unique_resource_id(),
            "newer" + unique_resource_id(),
            "newest" + unique_resource_id(),
        ]
        for dataset_id in datasets_to_create:
            self.temp_dataset(dataset_id)
        # Retrieve the datasets.
        iterator = Config.CLIENT.list_datasets()
        all_datasets = list(iterator)
        self.assertIsNone(iterator.next_page_token)
        created = [
            dataset
            for dataset in all_datasets
            if dataset.dataset_id in datasets_to_create
            and dataset.project == Config.CLIENT.project
        ]
>       self.assertEqual(len(created), len(datasets_to_create))
E       AssertionError: 2 != 3
tests/system.py:276: AssertionError
=============================== warnings summary ===============================
.nox/system-2-7/lib/python2.7/site-packages/IPython/external/decorators/__init__.py:2
  /tmpfs/src/github/google-cloud-python/bigquery/.nox/system-2-7/lib/python2.7/site-packages/IPython/external/decorators/__init__.py:2: DeprecationWarning: Importing from numpy.testing.decorators is deprecated since numpy 1.15.0, import from numpy.testing instead.
    from numpy.testing.decorators import *
.nox/system-2-7/lib/python2.7/site-packages/IPython/external/decorators/__init__.py:3
  /tmpfs/src/github/google-cloud-python/bigquery/.nox/system-2-7/lib/python2.7/site-packages/IPython/external/decorators/__init__.py:3: DeprecationWarning: Importing from numpy.testing.noseclasses is deprecated since 1.15.0, import from numpy.testing instead
    from numpy.testing.noseclasses import KnownFailure
tests/system.py::test_bigquery_magic
  /tmpfs/src/github/google-cloud-python/bigquery/.nox/system-2-7/lib/python2.7/site-packages/IPython/core/history.py:228: UserWarning: IPython History requires SQLite, your history will not be saved
    warn("IPython History requires SQLite, your history will not be saved")
-- Docs: https://docs.pytest.org/en/latest/warnings.html
1 failed, 49 passed, 3 warnings in 271.39 seconds
Command py.test --quiet tests/system.py failed with exit code 1
Session system-2.7 failed.

@tswast tswast added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Mar 21, 2019
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Mar 21, 2019
@tswast tswast merged commit 8df6e6a into googleapis:master Mar 22, 2019
@tswast tswast deleted the tswast-bq-docs-session branch March 25, 2019 20:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: bigquery Issues related to the BigQuery API. cla: yes This human has signed the Contributor License Agreement. type: docs Improvement to the documentation for an API.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants