Skip to content

Commit

Permalink
Shorten nox virtualenv names to avoid hashing. (#3585)
Browse files Browse the repository at this point in the history
  • Loading branch information
tseaver authored Jul 6, 2017
1 parent f621d17 commit bc7b0fd
Show file tree
Hide file tree
Showing 19 changed files with 174 additions and 0 deletions.
12 changes: 12 additions & 0 deletions bigquery/nox.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ def unit_tests(session, python_version):
# Run unit tests against all supported versions of Python.
session.interpreter = 'python{}'.format(python_version)

# Set the virtualenv dirname.
session.virtualenv_dirname = 'unit-' + python_version

# Install all test dependencies, then install this package in-place.
session.install('mock', 'pytest', 'pytest-cov', *LOCAL_DEPS)
session.install('-e', '.')
Expand All @@ -54,6 +57,9 @@ def system_tests(session, python_version):
# Run the system tests against latest Python 2 and Python 3 only.
session.interpreter = 'python{}'.format(python_version)

# Set the virtualenv dirname.
session.virtualenv_dirname = 'sys-' + python_version

# Install all test dependencies, then install this package into the
# virutalenv's dist-packages.
session.install('mock', 'pytest', *LOCAL_DEPS)
Expand All @@ -72,6 +78,7 @@ def lint(session):
serious code quality issues.
"""
session.interpreter = 'python3.6'

session.install('flake8', 'pylint', 'gcp-devrel-py-tools', *LOCAL_DEPS)
session.install('.')
session.run('flake8', 'google/cloud/bigquery')
Expand All @@ -89,6 +96,10 @@ def lint(session):
def lint_setup_py(session):
"""Verify that setup.py is valid (including RST check)."""
session.interpreter = 'python3.6'

# Set the virtualenv dirname.
session.virtualenv_dirname = 'setup'

session.install('docutils', 'Pygments')
session.run(
'python', 'setup.py', 'check', '--restructuredtext', '--strict')
Expand All @@ -102,6 +113,7 @@ def cover(session):
test runs (not system test runs), and then erases coverage data.
"""
session.interpreter = 'python3.6'

session.install('coverage', 'pytest-cov')
session.run('coverage', 'report', '--show-missing', '--fail-under=100')
session.run('coverage', 'erase')
10 changes: 10 additions & 0 deletions bigtable/nox.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ def unit_tests(session, python_version):
# Run unit tests against all supported versions of Python.
session.interpreter = 'python{}'.format(python_version)

# Set the virtualenv dirname.
session.virtualenv_dirname = 'unit-' + python_version

# Install all test dependencies, then install this package in-place.
session.install('mock', 'pytest', 'pytest-cov', *LOCAL_DEPS)
session.install('-e', '.')
Expand All @@ -53,6 +56,9 @@ def system_tests(session, python_version):
# Run the system tests against latest Python 2 and Python 3 only.
session.interpreter = 'python{}'.format(python_version)

# Set the virtualenv dirname.
session.virtualenv_dirname = 'sys-' + python_version

# Install all test dependencies, then install this package into the
# virutalenv's dist-packages.
session.install('mock', 'pytest', *LOCAL_DEPS)
Expand Down Expand Up @@ -87,6 +93,10 @@ def lint(session):
def lint_setup_py(session):
"""Verify that setup.py is valid (including RST check)."""
session.interpreter = 'python3.6'

# Set the virtualenv dirname.
session.virtualenv_dirname = 'setup'

session.install('docutils', 'Pygments')
session.run(
'python', 'setup.py', 'check', '--restructuredtext', '--strict')
Expand Down
7 changes: 7 additions & 0 deletions core/nox.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ def unit_tests(session, python_version):
# Run unit tests against all supported versions of Python.
session.interpreter = 'python{}'.format(python_version)

# Set the virtualenv dirname.
session.virtualenv_dirname = 'unit-' + python_version

# Install all test dependencies, then install this package in-place.
session.install('mock', 'pytest', 'pytest-cov',
'grpcio >= 1.0.2')
Expand Down Expand Up @@ -63,6 +66,10 @@ def lint(session):
def lint_setup_py(session):
"""Verify that setup.py is valid (including RST check)."""
session.interpreter = 'python3.6'

# Set the virtualenv dirname.
session.virtualenv_dirname = 'setup'

session.install('docutils', 'Pygments')
session.run(
'python', 'setup.py', 'check', '--restructuredtext', '--strict')
Expand Down
10 changes: 10 additions & 0 deletions datastore/nox.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ def unit_tests(session, python_version):
# Run unit tests against all supported versions of Python.
session.interpreter = 'python{}'.format(python_version)

# Set the virtualenv dirname.
session.virtualenv_dirname = 'unit-' + python_version

# Install all test dependencies, then install this package in-place.
session.install('mock', 'pytest', 'pytest-cov', *LOCAL_DEPS)
session.install('-e', '.')
Expand All @@ -54,6 +57,9 @@ def system_tests(session, python_version):
# Run the system tests against latest Python 2 and Python 3 only.
session.interpreter = 'python{}'.format(python_version)

# Set the virtualenv dirname.
session.virtualenv_dirname = 'sys-' + python_version

# Install all test dependencies, then install this package into the
# virutalenv's dist-packages.
session.install('mock', 'pytest', *LOCAL_DEPS)
Expand Down Expand Up @@ -112,6 +118,10 @@ def lint(session):
def lint_setup_py(session):
"""Verify that setup.py is valid (including RST check)."""
session.interpreter = 'python3.6'

# Set the virtualenv dirname.
session.virtualenv_dirname = 'setup'

session.install('docutils', 'Pygments')
session.run(
'python', 'setup.py', 'check', '--restructuredtext', '--strict')
Expand Down
7 changes: 7 additions & 0 deletions dns/nox.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ def unit_tests(session, python_version):
# Run unit tests against all supported versions of Python.
session.interpreter = 'python{}'.format(python_version)

# Set the virtualenv dirname.
session.virtualenv_dirname = 'unit-' + python_version

# Install all test dependencies, then install this package in-place.
session.install('mock', 'pytest', 'pytest-cov', *LOCAL_DEPS)
session.install('-e', '.')
Expand Down Expand Up @@ -66,6 +69,10 @@ def lint(session):
def lint_setup_py(session):
"""Verify that setup.py is valid (including RST check)."""
session.interpreter = 'python3.6'

# Set the virtualenv dirname.
session.virtualenv_dirname = 'setup'

session.install('docutils', 'Pygments')
session.run(
'python', 'setup.py', 'check', '--restructuredtext', '--strict')
Expand Down
10 changes: 10 additions & 0 deletions error_reporting/nox.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ def unit_tests(session, python_version):
# Run unit tests against all supported versions of Python.
session.interpreter = 'python{}'.format(python_version)

# Set the virtualenv dirname.
session.virtualenv_dirname = 'unit-' + python_version

# Install all test dependencies, then install this package in-place.
session.install('mock', 'pytest', 'pytest-cov', *LOCAL_DEPS)
session.install('-e', '.')
Expand Down Expand Up @@ -66,6 +69,10 @@ def lint(session):
def lint_setup_py(session):
"""Verify that setup.py is valid (including RST check)."""
session.interpreter = 'python3.6'

# Set the virtualenv dirname.
session.virtualenv_dirname = 'setup'

session.install('docutils', 'Pygments')
session.run(
'python', 'setup.py', 'check', '--restructuredtext', '--strict')
Expand All @@ -83,6 +90,9 @@ def system_tests(session, python_version):
# Run the system tests against latest Python 2 and Python 3 only.
session.interpreter = 'python{}'.format(python_version)

# Set the virtualenv dirname.
session.virtualenv_dirname = 'sys-' + python_version

# Install all test dependencies, then install this package into the
# virtualenv's dist-packages.
session.install('mock', 'pytest', *LOCAL_DEPS)
Expand Down
10 changes: 10 additions & 0 deletions language/nox.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ def unit_tests(session, python_version):
# Run unit tests against all supported versions of Python.
session.interpreter = 'python{}'.format(python_version)

# Set the virtualenv dirname.
session.virtualenv_dirname = 'unit-' + python_version

# Install all test dependencies, then install this package in-place.
session.install('mock', 'pytest', 'pytest-cov', *LOCAL_DEPS)
session.install('-e', '.')
Expand All @@ -54,6 +57,9 @@ def system_tests(session, python_version):
# Run the system tests against latest Python 2 and Python 3 only.
session.interpreter = 'python{}'.format(python_version)

# Set the virtualenv dirname.
session.virtualenv_dirname = 'sys-' + python_version

# Install all test dependencies, then install this package into the
# virutalenv's dist-packages.
session.install('mock', 'pytest', *LOCAL_DEPS)
Expand Down Expand Up @@ -88,6 +94,10 @@ def lint(session):
def lint_setup_py(session):
"""Verify that setup.py is valid (including RST check)."""
session.interpreter = 'python3.6'

# Set the virtualenv dirname.
session.virtualenv_dirname = 'setup'

session.install('docutils', 'Pygments')
session.run(
'python', 'setup.py', 'check', '--restructuredtext', '--strict')
Expand Down
10 changes: 10 additions & 0 deletions logging/nox.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ def unit_tests(session, python_version):
# Run unit tests against all supported versions of Python.
session.interpreter = 'python{}'.format(python_version)

# Set the virtualenv dirname.
session.virtualenv_dirname = 'unit-' + python_version

# Install all test dependencies, then install this package in-place.
session.install(
'mock', 'pytest', 'pytest-cov',
Expand Down Expand Up @@ -57,6 +60,9 @@ def system_tests(session, python_version):
# Run the system tests against latest Python 2 and Python 3 only.
session.interpreter = 'python{}'.format(python_version)

# Set the virtualenv dirname.
session.virtualenv_dirname = 'sys-' + python_version

# Install all test dependencies, then install this package into the
# virutalenv's dist-packages.
session.install('mock', 'pytest', *LOCAL_DEPS)
Expand Down Expand Up @@ -92,6 +98,10 @@ def lint(session):
def lint_setup_py(session):
"""Verify that setup.py is valid (including RST check)."""
session.interpreter = 'python3.6'

# Set the virtualenv dirname.
session.virtualenv_dirname = 'setup'

session.install('docutils', 'Pygments')
session.run(
'python', 'setup.py', 'check', '--restructuredtext', '--strict')
Expand Down
10 changes: 10 additions & 0 deletions monitoring/nox.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ def unit_tests(session, python_version):
# Run unit tests against all supported versions of Python.
session.interpreter = 'python{}'.format(python_version)

# Set the virtualenv dirname.
session.virtualenv_dirname = 'unit-' + python_version

# Install all test dependencies, then install this package in-place.
session.install('mock', 'pytest', 'pytest-cov', *LOCAL_DEPS)
session.install('-e', '.')
Expand All @@ -54,6 +57,9 @@ def system_tests(session, python_version):
# Run the system tests against latest Python 2 and Python 3 only.
session.interpreter = 'python{}'.format(python_version)

# Set the virtualenv dirname.
session.virtualenv_dirname = 'sys-' + python_version

# Install all test dependencies, then install this package into the
# virutalenv's dist-packages.
session.install('mock', 'pytest', *LOCAL_DEPS)
Expand Down Expand Up @@ -88,6 +94,10 @@ def lint(session):
def lint_setup_py(session):
"""Verify that setup.py is valid (including RST check)."""
session.interpreter = 'python3.6'

# Set the virtualenv dirname.
session.virtualenv_dirname = 'setup'

session.install('docutils', 'Pygments')
session.run(
'python', 'setup.py', 'check', '--restructuredtext', '--strict')
Expand Down
7 changes: 7 additions & 0 deletions nox.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ def docs(session):
# Build docs against the latest version of Python, because we can.
session.interpreter = 'python3.6'

# Set the virtualenv dirname.
session.virtualenv_dirname = 'docs'

# Install Sphinx and also all of the google-cloud-* packages.
session.chdir(os.path.realpath(os.path.dirname(__file__)))
session.install('Sphinx >= 1.6.2', 'sphinx_rtd_theme')
Expand All @@ -43,6 +46,10 @@ def docs(session):
def lint_setup_py(session):
"""Verify that setup.py is valid (including RST check)."""
session.interpreter = 'python3.6'

# Set the virtualenv dirname.
session.virtualenv_dirname = 'setup'

session.install('docutils', 'Pygments')
session.run(
'python', 'setup.py', 'check', '--restructuredtext', '--strict')
10 changes: 10 additions & 0 deletions pubsub/nox.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ def unit_tests(session, python_version):
# Run unit tests against all supported versions of Python.
session.interpreter = 'python{}'.format(python_version)

# Set the virtualenv dirname.
session.virtualenv_dirname = 'unit-' + python_version

# Install all test dependencies, then install this package in-place.
session.install('mock', 'pytest', 'pytest-cov', *LOCAL_DEPS)
session.install('-e', '.')
Expand All @@ -54,6 +57,9 @@ def system_tests(session, python_version):
# Run the system tests against latest Python 2 and Python 3 only.
session.interpreter = 'python{}'.format(python_version)

# Set the virtualenv dirname.
session.virtualenv_dirname = 'sys-' + python_version

# Install all test dependencies, then install this package into the
# virutalenv's dist-packages.
session.install('mock', 'pytest', *LOCAL_DEPS)
Expand Down Expand Up @@ -88,6 +94,10 @@ def lint(session):
def lint_setup_py(session):
"""Verify that setup.py is valid (including RST check)."""
session.interpreter = 'python3.6'

# Set the virtualenv dirname.
session.virtualenv_dirname = 'setup'

session.install('docutils', 'Pygments')
session.run(
'python', 'setup.py', 'check', '--restructuredtext', '--strict')
Expand Down
7 changes: 7 additions & 0 deletions resource_manager/nox.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ def unit_tests(session, python_version):
# Run unit tests against all supported versions of Python.
session.interpreter = 'python{}'.format(python_version)

# Set the virtualenv dirname.
session.virtualenv_dirname = 'unit-' + python_version

# Install all test dependencies, then install this package in-place.
session.install('mock', 'pytest', 'pytest-cov', *LOCAL_DEPS)
session.install('-e', '.')
Expand Down Expand Up @@ -66,6 +69,10 @@ def lint(session):
def lint_setup_py(session):
"""Verify that setup.py is valid (including RST check)."""
session.interpreter = 'python3.6'

# Set the virtualenv dirname.
session.virtualenv_dirname = 'setup'

session.install('docutils', 'Pygments')
session.run(
'python', 'setup.py', 'check', '--restructuredtext', '--strict')
Expand Down
7 changes: 7 additions & 0 deletions runtimeconfig/nox.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ def unit_tests(session, python_version):
# Run unit tests against all supported versions of Python.
session.interpreter = 'python{}'.format(python_version)

# Set the virtualenv dirname.
session.virtualenv_dirname = 'unit-' + python_version

# Install all test dependencies, then install this package in-place.
session.install('mock', 'pytest', 'pytest-cov', *LOCAL_DEPS)
session.install('-e', '.')
Expand Down Expand Up @@ -66,6 +69,10 @@ def lint(session):
def lint_setup_py(session):
"""Verify that setup.py is valid (including RST check)."""
session.interpreter = 'python3.6'

# Set the virtualenv dirname.
session.virtualenv_dirname = 'setup'

session.install('docutils', 'Pygments')
session.run(
'python', 'setup.py', 'check', '--restructuredtext', '--strict')
Expand Down
10 changes: 10 additions & 0 deletions spanner/nox.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ def unit_tests(session, python_version):
# Run unit tests against all supported versions of Python.
session.interpreter = 'python{}'.format(python_version)

# Set the virtualenv dirname.
session.virtualenv_dirname = 'unit-' + python_version

# Install all test dependencies, then install this package in-place.
session.install('mock', 'pytest', 'pytest-cov', *LOCAL_DEPS)
session.install('-e', '.')
Expand All @@ -54,6 +57,9 @@ def system_tests(session, python_version):
# Run the system tests against latest Python 2 and Python 3 only.
session.interpreter = 'python{}'.format(python_version)

# Set the virtualenv dirname.
session.virtualenv_dirname = 'sys-' + python_version

# Install all test dependencies, then install this package into the
# virutalenv's dist-packages.
session.install('mock', 'pytest', *LOCAL_DEPS)
Expand Down Expand Up @@ -88,6 +94,10 @@ def lint(session):
def lint_setup_py(session):
"""Verify that setup.py is valid (including RST check)."""
session.interpreter = 'python3.6'

# Set the virtualenv dirname.
session.virtualenv_dirname = 'setup'

session.install('docutils', 'Pygments')
session.run(
'python', 'setup.py', 'check', '--restructuredtext', '--strict')
Expand Down
Loading

0 comments on commit bc7b0fd

Please sign in to comment.