Skip to content

Commit f26174e

Browse files
tseaverlandrito
authored andcommitted
Shorten nox virtualenv names to avoid hashing. (googleapis#3585)
1 parent e3d71e9 commit f26174e

File tree

19 files changed

+174
-0
lines changed

19 files changed

+174
-0
lines changed

bigquery/nox.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ def unit_tests(session, python_version):
3030
# Run unit tests against all supported versions of Python.
3131
session.interpreter = 'python{}'.format(python_version)
3232

33+
# Set the virtualenv dirname.
34+
session.virtualenv_dirname = 'unit-' + python_version
35+
3336
# Install all test dependencies, then install this package in-place.
3437
session.install('mock', 'pytest', 'pytest-cov', *LOCAL_DEPS)
3538
session.install('-e', '.')
@@ -54,6 +57,9 @@ def system_tests(session, python_version):
5457
# Run the system tests against latest Python 2 and Python 3 only.
5558
session.interpreter = 'python{}'.format(python_version)
5659

60+
# Set the virtualenv dirname.
61+
session.virtualenv_dirname = 'sys-' + python_version
62+
5763
# Install all test dependencies, then install this package into the
5864
# virutalenv's dist-packages.
5965
session.install('mock', 'pytest', *LOCAL_DEPS)
@@ -72,6 +78,7 @@ def lint(session):
7278
serious code quality issues.
7379
"""
7480
session.interpreter = 'python3.6'
81+
7582
session.install('flake8', 'pylint', 'gcp-devrel-py-tools', *LOCAL_DEPS)
7683
session.install('.')
7784
session.run('flake8', 'google/cloud/bigquery')
@@ -89,6 +96,10 @@ def lint(session):
8996
def lint_setup_py(session):
9097
"""Verify that setup.py is valid (including RST check)."""
9198
session.interpreter = 'python3.6'
99+
100+
# Set the virtualenv dirname.
101+
session.virtualenv_dirname = 'setup'
102+
92103
session.install('docutils', 'Pygments')
93104
session.run(
94105
'python', 'setup.py', 'check', '--restructuredtext', '--strict')
@@ -102,6 +113,7 @@ def cover(session):
102113
test runs (not system test runs), and then erases coverage data.
103114
"""
104115
session.interpreter = 'python3.6'
116+
105117
session.install('coverage', 'pytest-cov')
106118
session.run('coverage', 'report', '--show-missing', '--fail-under=100')
107119
session.run('coverage', 'erase')

bigtable/nox.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ def unit_tests(session, python_version):
2929
# Run unit tests against all supported versions of Python.
3030
session.interpreter = 'python{}'.format(python_version)
3131

32+
# Set the virtualenv dirname.
33+
session.virtualenv_dirname = 'unit-' + python_version
34+
3235
# Install all test dependencies, then install this package in-place.
3336
session.install('mock', 'pytest', 'pytest-cov', *LOCAL_DEPS)
3437
session.install('-e', '.')
@@ -53,6 +56,9 @@ def system_tests(session, python_version):
5356
# Run the system tests against latest Python 2 and Python 3 only.
5457
session.interpreter = 'python{}'.format(python_version)
5558

59+
# Set the virtualenv dirname.
60+
session.virtualenv_dirname = 'sys-' + python_version
61+
5662
# Install all test dependencies, then install this package into the
5763
# virutalenv's dist-packages.
5864
session.install('mock', 'pytest', *LOCAL_DEPS)
@@ -87,6 +93,10 @@ def lint(session):
8793
def lint_setup_py(session):
8894
"""Verify that setup.py is valid (including RST check)."""
8995
session.interpreter = 'python3.6'
96+
97+
# Set the virtualenv dirname.
98+
session.virtualenv_dirname = 'setup'
99+
90100
session.install('docutils', 'Pygments')
91101
session.run(
92102
'python', 'setup.py', 'check', '--restructuredtext', '--strict')

core/nox.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ def unit_tests(session, python_version):
2525
# Run unit tests against all supported versions of Python.
2626
session.interpreter = 'python{}'.format(python_version)
2727

28+
# Set the virtualenv dirname.
29+
session.virtualenv_dirname = 'unit-' + python_version
30+
2831
# Install all test dependencies, then install this package in-place.
2932
session.install('mock', 'pytest', 'pytest-cov',
3033
'grpcio >= 1.0.2')
@@ -63,6 +66,10 @@ def lint(session):
6366
def lint_setup_py(session):
6467
"""Verify that setup.py is valid (including RST check)."""
6568
session.interpreter = 'python3.6'
69+
70+
# Set the virtualenv dirname.
71+
session.virtualenv_dirname = 'setup'
72+
6673
session.install('docutils', 'Pygments')
6774
session.run(
6875
'python', 'setup.py', 'check', '--restructuredtext', '--strict')

datastore/nox.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ def unit_tests(session, python_version):
3030
# Run unit tests against all supported versions of Python.
3131
session.interpreter = 'python{}'.format(python_version)
3232

33+
# Set the virtualenv dirname.
34+
session.virtualenv_dirname = 'unit-' + python_version
35+
3336
# Install all test dependencies, then install this package in-place.
3437
session.install('mock', 'pytest', 'pytest-cov', *LOCAL_DEPS)
3538
session.install('-e', '.')
@@ -54,6 +57,9 @@ def system_tests(session, python_version):
5457
# Run the system tests against latest Python 2 and Python 3 only.
5558
session.interpreter = 'python{}'.format(python_version)
5659

60+
# Set the virtualenv dirname.
61+
session.virtualenv_dirname = 'sys-' + python_version
62+
5763
# Install all test dependencies, then install this package into the
5864
# virutalenv's dist-packages.
5965
session.install('mock', 'pytest', *LOCAL_DEPS)
@@ -112,6 +118,10 @@ def lint(session):
112118
def lint_setup_py(session):
113119
"""Verify that setup.py is valid (including RST check)."""
114120
session.interpreter = 'python3.6'
121+
122+
# Set the virtualenv dirname.
123+
session.virtualenv_dirname = 'setup'
124+
115125
session.install('docutils', 'Pygments')
116126
session.run(
117127
'python', 'setup.py', 'check', '--restructuredtext', '--strict')

dns/nox.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ def unit_tests(session, python_version):
3030
# Run unit tests against all supported versions of Python.
3131
session.interpreter = 'python{}'.format(python_version)
3232

33+
# Set the virtualenv dirname.
34+
session.virtualenv_dirname = 'unit-' + python_version
35+
3336
# Install all test dependencies, then install this package in-place.
3437
session.install('mock', 'pytest', 'pytest-cov', *LOCAL_DEPS)
3538
session.install('-e', '.')
@@ -66,6 +69,10 @@ def lint(session):
6669
def lint_setup_py(session):
6770
"""Verify that setup.py is valid (including RST check)."""
6871
session.interpreter = 'python3.6'
72+
73+
# Set the virtualenv dirname.
74+
session.virtualenv_dirname = 'setup'
75+
6976
session.install('docutils', 'Pygments')
7077
session.run(
7178
'python', 'setup.py', 'check', '--restructuredtext', '--strict')

error_reporting/nox.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ def unit_tests(session, python_version):
3030
# Run unit tests against all supported versions of Python.
3131
session.interpreter = 'python{}'.format(python_version)
3232

33+
# Set the virtualenv dirname.
34+
session.virtualenv_dirname = 'unit-' + python_version
35+
3336
# Install all test dependencies, then install this package in-place.
3437
session.install('mock', 'pytest', 'pytest-cov', *LOCAL_DEPS)
3538
session.install('-e', '.')
@@ -66,6 +69,10 @@ def lint(session):
6669
def lint_setup_py(session):
6770
"""Verify that setup.py is valid (including RST check)."""
6871
session.interpreter = 'python3.6'
72+
73+
# Set the virtualenv dirname.
74+
session.virtualenv_dirname = 'setup'
75+
6976
session.install('docutils', 'Pygments')
7077
session.run(
7178
'python', 'setup.py', 'check', '--restructuredtext', '--strict')
@@ -83,6 +90,9 @@ def system_tests(session, python_version):
8390
# Run the system tests against latest Python 2 and Python 3 only.
8491
session.interpreter = 'python{}'.format(python_version)
8592

93+
# Set the virtualenv dirname.
94+
session.virtualenv_dirname = 'sys-' + python_version
95+
8696
# Install all test dependencies, then install this package into the
8797
# virtualenv's dist-packages.
8898
session.install('mock', 'pytest', *LOCAL_DEPS)

language/nox.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ def unit_tests(session, python_version):
3030
# Run unit tests against all supported versions of Python.
3131
session.interpreter = 'python{}'.format(python_version)
3232

33+
# Set the virtualenv dirname.
34+
session.virtualenv_dirname = 'unit-' + python_version
35+
3336
# Install all test dependencies, then install this package in-place.
3437
session.install('mock', 'pytest', 'pytest-cov', *LOCAL_DEPS)
3538
session.install('-e', '.')
@@ -54,6 +57,9 @@ def system_tests(session, python_version):
5457
# Run the system tests against latest Python 2 and Python 3 only.
5558
session.interpreter = 'python{}'.format(python_version)
5659

60+
# Set the virtualenv dirname.
61+
session.virtualenv_dirname = 'sys-' + python_version
62+
5763
# Install all test dependencies, then install this package into the
5864
# virutalenv's dist-packages.
5965
session.install('mock', 'pytest', *LOCAL_DEPS)
@@ -88,6 +94,10 @@ def lint(session):
8894
def lint_setup_py(session):
8995
"""Verify that setup.py is valid (including RST check)."""
9096
session.interpreter = 'python3.6'
97+
98+
# Set the virtualenv dirname.
99+
session.virtualenv_dirname = 'setup'
100+
91101
session.install('docutils', 'Pygments')
92102
session.run(
93103
'python', 'setup.py', 'check', '--restructuredtext', '--strict')

logging/nox.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ def unit_tests(session, python_version):
3030
# Run unit tests against all supported versions of Python.
3131
session.interpreter = 'python{}'.format(python_version)
3232

33+
# Set the virtualenv dirname.
34+
session.virtualenv_dirname = 'unit-' + python_version
35+
3336
# Install all test dependencies, then install this package in-place.
3437
session.install(
3538
'mock', 'pytest', 'pytest-cov',
@@ -57,6 +60,9 @@ def system_tests(session, python_version):
5760
# Run the system tests against latest Python 2 and Python 3 only.
5861
session.interpreter = 'python{}'.format(python_version)
5962

63+
# Set the virtualenv dirname.
64+
session.virtualenv_dirname = 'sys-' + python_version
65+
6066
# Install all test dependencies, then install this package into the
6167
# virutalenv's dist-packages.
6268
session.install('mock', 'pytest', *LOCAL_DEPS)
@@ -92,6 +98,10 @@ def lint(session):
9298
def lint_setup_py(session):
9399
"""Verify that setup.py is valid (including RST check)."""
94100
session.interpreter = 'python3.6'
101+
102+
# Set the virtualenv dirname.
103+
session.virtualenv_dirname = 'setup'
104+
95105
session.install('docutils', 'Pygments')
96106
session.run(
97107
'python', 'setup.py', 'check', '--restructuredtext', '--strict')

monitoring/nox.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ def unit_tests(session, python_version):
3030
# Run unit tests against all supported versions of Python.
3131
session.interpreter = 'python{}'.format(python_version)
3232

33+
# Set the virtualenv dirname.
34+
session.virtualenv_dirname = 'unit-' + python_version
35+
3336
# Install all test dependencies, then install this package in-place.
3437
session.install('mock', 'pytest', 'pytest-cov', *LOCAL_DEPS)
3538
session.install('-e', '.')
@@ -54,6 +57,9 @@ def system_tests(session, python_version):
5457
# Run the system tests against latest Python 2 and Python 3 only.
5558
session.interpreter = 'python{}'.format(python_version)
5659

60+
# Set the virtualenv dirname.
61+
session.virtualenv_dirname = 'sys-' + python_version
62+
5763
# Install all test dependencies, then install this package into the
5864
# virutalenv's dist-packages.
5965
session.install('mock', 'pytest', *LOCAL_DEPS)
@@ -88,6 +94,10 @@ def lint(session):
8894
def lint_setup_py(session):
8995
"""Verify that setup.py is valid (including RST check)."""
9096
session.interpreter = 'python3.6'
97+
98+
# Set the virtualenv dirname.
99+
session.virtualenv_dirname = 'setup'
100+
91101
session.install('docutils', 'Pygments')
92102
session.run(
93103
'python', 'setup.py', 'check', '--restructuredtext', '--strict')

nox.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ def docs(session):
2424
# Build docs against the latest version of Python, because we can.
2525
session.interpreter = 'python3.6'
2626

27+
# Set the virtualenv dirname.
28+
session.virtualenv_dirname = 'docs'
29+
2730
# Install Sphinx and also all of the google-cloud-* packages.
2831
session.chdir(os.path.realpath(os.path.dirname(__file__)))
2932
session.install('Sphinx >= 1.6.2', 'sphinx_rtd_theme')
@@ -43,6 +46,10 @@ def docs(session):
4346
def lint_setup_py(session):
4447
"""Verify that setup.py is valid (including RST check)."""
4548
session.interpreter = 'python3.6'
49+
50+
# Set the virtualenv dirname.
51+
session.virtualenv_dirname = 'setup'
52+
4653
session.install('docutils', 'Pygments')
4754
session.run(
4855
'python', 'setup.py', 'check', '--restructuredtext', '--strict')

0 commit comments

Comments
 (0)