Skip to content

Commit ff58ea4

Browse files
chore(python): simplify nox steps in CONTRIBUTING.rst (#130)
Source-Link: googleapis/synthtool@26558ba Post-Processor: gcr.io/repo-automation-bots/owlbot-python:latest@sha256:99d90d097e4a4710cc8658ee0b5b963f4426d0e424819787c3ac1405c9a26719 chore: Update CONTRIBUTING.rst to reflect supported versions
1 parent b44cf48 commit ff58ea4

File tree

4 files changed

+11
-10
lines changed

4 files changed

+11
-10
lines changed

.github/.OwlBot.lock.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
docker:
22
image: gcr.io/repo-automation-bots/owlbot-python:latest
3-
digest: sha256:df50e8d462f86d6bcb42f27ecad55bb12c404f1c65de9c6fe4c4d25120080bd6
3+
digest: sha256:99d90d097e4a4710cc8658ee0b5b963f4426d0e424819787c3ac1405c9a26719

CONTRIBUTING.rst

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -68,14 +68,12 @@ Using ``nox``
6868
We use `nox <https://nox.readthedocs.io/en/latest/>`__ to instrument our tests.
6969

7070
- To test your changes, run unit tests with ``nox``::
71+
$ nox -s unit
7172

72-
$ nox -s unit-3.8
73-
$ ...
73+
- To run a single unit test::
7474

75-
- Args to pytest can be passed through the nox command separated by a `--`. For
76-
example, to run a single test::
75+
$ nox -s unit-3.9 -- -k <name of test>
7776

78-
$ nox -s unit-3.8 -- -k <name of test>
7977

8078
.. note::
8179

@@ -142,7 +140,7 @@ Running System Tests
142140
- To run system tests, you can execute::
143141

144142
# Run all system tests
145-
$ nox -s system-3.8
143+
$ nox -s system
146144

147145
# Run a single system test
148146
$ nox -s system-3.8 -- -k <name of test>
@@ -215,8 +213,8 @@ Supported versions can be found in our ``noxfile.py`` `config`_.
215213
.. _config: https://github.com/googleapis/google-auth-library-python-oauthlib/blob/master/noxfile.py
216214

217215

218-
We also explicitly decided to support Python 3 beginning with version
219-
3.6. Reasons for this include:
216+
We also explicitly decided to support Python 3 beginning with version 3.6.
217+
Reasons for this include:
220218

221219
- Encouraging use of newest versions of Python 3
222220
- Taking the lead of `prominent`_ open-source `projects`_

noxfile.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
BLACK_PATHS = ["docs", "google_auth_oauthlib", "tests", "noxfile.py", "setup.py"]
2929

3030
DEFAULT_PYTHON_VERSION = "3.8"
31-
SYSTEM_TEST_PYTHON_VERSIONS = ["2.7", "3.8"]
31+
SYSTEM_TEST_PYTHON_VERSIONS = ["3.8"]
3232
UNIT_TEST_PYTHON_VERSIONS = ["3.6", "3.7", "3.8", "3.9"]
3333

3434
CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute()
@@ -84,6 +84,8 @@ def default(session):
8484
constraints_path = str(
8585
CURRENT_DIRECTORY / "testing" / f"constraints-{session.python}.txt"
8686
)
87+
session.install("asyncmock", "pytest-asyncio", "-c", constraints_path)
88+
8789
session.install("mock", "pytest", "pytest-cov", "click", "-c", constraints_path)
8890

8991
session.install("-e", ".", "-c", constraints_path)

owlbot.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
# Add templated files
88
# ----------------------------------------------------------------------------
99
templated_files = common.py_library(
10+
microgenerator=True,
1011
cov_level=99,
1112
unit_test_external_dependencies=["click"],
1213
unit_test_python_versions=["3.6", "3.7", "3.8", "3.9"],

0 commit comments

Comments
 (0)