Skip to content

standardize samples directory layout #790

@tswast

Description

@tswast

We have an odd mix of sample locations:

  • docs/snippets.py -- the original location, not very copy-pasteable / browsable
  • lots of samples in samples/*.py, but the test drivers are in samples/tests/
  • samples/snippets/*.py
  • samples/geography/*.py

To align with the infrastructure in https://github.com/googleapis/synthtool/tree/master/synthtool/gcp/templates/python_samples, the goal is to have:

  • samples/snippets/ -- these samples just require the google-cloud-bigquery library
  • samples/geography/ -- require extra dependencies for working with geography data
  • sample/pandas/ -- require extra dependencies for working with pandas dataframes
  • more??? -- possibly a directory for the user-based authentication samples

To avoid breaking cloud.google.com docs, this needs to be done in several steps:

  1. Copy samples to correct location
  2. Update docs (Googler must do this)
  3. Delete duplicate samples in old location

Towards: #366 (use templated noxfile) and #765 (blacken samples using templated noxfile(s))

Metadata

Metadata

Assignees

Labels

api: bigqueryIssues related to the googleapis/python-bigquery API.priority: p3Desirable enhancement or fix. May not be included in next release.samplesIssues that are directly related to samples.type: processA process-related concern. May include testing, release, or the like.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions