Skip to content
This repository has been archived by the owner on Jul 6, 2023. It is now read-only.

feat: add Samples section to CONTRIBUTING.rst #4

Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
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
16 changes: 1 addition & 15 deletions .github/.OwlBot.lock.yaml
@@ -1,17 +1,3 @@
# Copyright 2021 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

docker:
image: gcr.io/repo-automation-bots/owlbot-python:latest
digest: sha256:5ff7446edeaede81c3ed58b23a4e76a5403fba1350ce28478045657303b6479d
digest: sha256:6186535cbdbf6b9fe61f00294929221d060634dae4a0795c1cefdbc995b2d605
24 changes: 24 additions & 0 deletions CONTRIBUTING.rst
Expand Up @@ -177,6 +177,30 @@ Build the docs via:

$ nox -s docs

*************************
Samples and code snippets
*************************

Code samples and snippets live in the `samples/` catalogue. Feel free to
provide more examples, but make sure to write tests for those examples.
Each folder containing example code requires its own `noxfile.py` script
which automates testing. If you decide to create a new folder, you can
base it on the `samples/snippets` folder (providing `noxfile.py` and
the requirements files).

The tests will run against a real Google Cloud Project, so you should
configure them just like the System Tests.

- To run sample tests, you can execute::

# Run all tests in a folder
$ cd samples/snippets
$ nox -s py-3.8

# Run a single sample test
$ cd samples/snippets
$ nox -s py-3.8 -- -k <name of test>

********************************************
Note About ``README`` as it pertains to PyPI
********************************************
Expand Down