Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nox: use inplace installs #5865

Merged
merged 20 commits into from
Aug 30, 2018
Merged
Show file tree
Hide file tree
Changes from 19 commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
47e4927
core: install local packages inplace under nox.
tseaver Aug 29, 2018
0f7b0ae
bigquery: install local packages inplace under nox.
tseaver Aug 29, 2018
e13360d
bigtable: install local packages inplace under nox.
tseaver Aug 29, 2018
d89d9c9
container: install local packages inplace under nox.
tseaver Aug 29, 2018
08fcc0d
datastore: install local packages inplace under nox.
tseaver Aug 29, 2018
cf27394
dns: install local packages inplace under nox.
tseaver Aug 29, 2018
eb80bb5
error_reporting: install local packages inplace under nox.
tseaver Aug 29, 2018
3becd69
firestore: install local packages inplace under nox.
tseaver Aug 29, 2018
1438d0a
language: install local packages inplace under nox.
tseaver Aug 29, 2018
4e6fe76
logging: install local packages inplace under nox.
tseaver Aug 29, 2018
b83aad5
pubsub: install local packages inplace under nox.
tseaver Aug 29, 2018
b682f3c
redis: install local packages inplace under nox.
tseaver Aug 29, 2018
157c337
resource_manager: install local packages inplace under nox.
tseaver Aug 29, 2018
ec7a953
spanner: install local packages inplace under nox.
tseaver Aug 29, 2018
0bb0653
storage: install local packages inplace under nox.
tseaver Aug 29, 2018
b1c0224
trace: install local packages inplace under nox.
tseaver Aug 29, 2018
7380975
translate: install local packages inplace under nox.
tseaver Aug 29, 2018
d8d5f66
websecurityscanner: install local packages inplace under nox.
tseaver Aug 29, 2018
8bfefdf
Whitespace fix.
tseaver Aug 29, 2018
bb0efc3
Workaround for pip's '-e' flag not being sticky.
tseaver Aug 30, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 11 additions & 10 deletions bigquery/nox.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,9 @@ def default(session):
Python corresponding to the ``nox`` binary the ``PATH`` can
run the tests.
"""
# Install all test dependencies, then install this package in-place.
session.install('mock', 'pytest', 'pytest-cov', *LOCAL_DEPS)
# Install all test dependencies, then install local packages in-place.
session.install('mock', 'pytest', 'pytest-cov')
session.install('-e', *LOCAL_DEPS)

# Pyarrow does not support Python 3.7
if session.interpreter == 'python3.7':
Expand Down Expand Up @@ -97,10 +98,10 @@ def system(session, py):
# Use pre-release gRPC for system tests.
session.install('--pre', 'grpcio')

# Install all test dependencies, then install this package into the
# virtualenv's dist-packages.
session.install('mock', 'pytest', *LOCAL_DEPS)
session.install(
# Install all test dependencies, then install local packages in place.
session.install('mock', 'pytest')
session.install('-e', *LOCAL_DEPS)
session.install('-e',
os.path.join('..', 'storage'),
os.path.join('..', 'test_utils'),
)
Expand Down Expand Up @@ -136,10 +137,10 @@ def snippets(session, py):
# Set the virtualenv dirname.
session.virtualenv_dirname = 'snip-' + py

# Install all test dependencies, then install this package into the
# virtualenv's dist-packages.
session.install('mock', 'pytest', *LOCAL_DEPS)
session.install(
# Install all test dependencies, then install local packages in place.
session.install('mock', 'pytest')
session.install('-e', *LOCAL_DEPS)
session.install('-e',
os.path.join('..', 'storage'),
os.path.join('..', 'test_utils'),
)
Expand Down
10 changes: 6 additions & 4 deletions bigtable/nox.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,9 @@ def default(session):
Python corresponding to the ``nox`` binary the ``PATH`` can
run the tests.
"""
# Install all test dependencies, then install this package in-place.
session.install('mock', 'pytest', 'pytest-cov', *LOCAL_DEPS)
# Install all test dependencies, then install local packages in-place.
session.install('mock', 'pytest', 'pytest-cov')
session.install('-e', *LOCAL_DEPS)
session.install('-e', '.')

# Run py.test against the unit tests.
Expand Down Expand Up @@ -86,8 +87,9 @@ def system(session, py):

# Install all test dependencies, then install this package into the
# virtualenv's dist-packages.
session.install('mock', 'pytest', *LOCAL_DEPS)
session.install('../test_utils/')
session.install('mock', 'pytest')
session.install('-e', *LOCAL_DEPS)
session.install('-e', '../test_utils/')
session.install('-e', '.')

# Run py.test against the system tests.
Expand Down
9 changes: 5 additions & 4 deletions container/nox.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,9 @@ def default(session):
Python corresponding to the ``nox`` binary on the ``PATH`` can
run the tests.
"""
# Install all test dependencies, then install this package in-place.
session.install('mock', 'pytest', 'pytest-cov', *LOCAL_DEPS)
# Install all test dependencies, then install local packages in-place.
session.install('mock', 'pytest', 'pytest-cov')
session.install('-e', *LOCAL_DEPS)
session.install('-e', '.')

# Run py.test against the unit tests.
Expand Down Expand Up @@ -83,8 +84,8 @@ def system(session, py):
# Install all test dependencies, then install this package into the
# virtualenv's dist-packages.
session.install('mock', 'pytest')
session.install('../test_utils/')
session.install('.')
session.install('-e', '../test_utils/', *LOCAL_DEPS)
session.install('-e', '.')

# Run py.test against the system tests.
session.run('py.test', '--quiet', 'tests/system/')
Expand Down
4 changes: 2 additions & 2 deletions core/nox.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,14 @@ def default(session):
Python corresponding to the ``nox`` binary the ``PATH`` can
run the tests.
"""
# Install all test dependencies, then install this package in-place.
# Install all test dependencies, then install local packages in-place.
session.install(
'mock',
'pytest',
'pytest-cov',
'grpcio >= 1.0.2',
*LOCAL_DEPS
)
session.install('-e', *LOCAL_DEPS)
session.install('-e', '.')

# Run py.test against the unit tests.
Expand Down
20 changes: 10 additions & 10 deletions datastore/nox.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,9 @@ def default(session):
Python corresponding to the ``nox`` binary the ``PATH`` can
run the tests.
"""
# Install all test dependencies, then install this package in-place.
session.install('mock', 'pytest', 'pytest-cov', *LOCAL_DEPS)
# Install all test dependencies, then install local packages in-place.
session.install('mock', 'pytest', 'pytest-cov')
session.install('-e', *LOCAL_DEPS)
session.install('-e', '.')

# Run py.test against the unit tests.
Expand Down Expand Up @@ -85,11 +86,10 @@ def system(session, py):
# Use pre-release gRPC for system tests.
session.install('--pre', 'grpcio')

# Install all test dependencies, then install this package into the
# virtualenv's dist-packages.
session.install('mock', 'pytest', *LOCAL_DEPS)
session.install('../test_utils/')
session.install('.')
# Install all test dependencies, then install local packages in-place.
session.install('mock', 'pytest')
session.install('-e', '../test_utils/', *LOCAL_DEPS)
session.install('-e', '.')

# Run py.test against the system tests.
session.run('py.test', '--quiet', 'tests/system', *session.posargs)
Expand All @@ -111,9 +111,9 @@ def doctests(session):

# Install all test dependencies, then install this package into the
# virtualenv's dist-packages.
session.install('mock', 'pytest', 'sphinx', *LOCAL_DEPS)
session.install('../test_utils/')
session.install('.')
session.install('mock', 'pytest', 'sphinx')
session.install('-e', '../test_utils/', *LOCAL_DEPS)
session.install('-e', '.')

# Run py.test against the system tests.
session.run('py.test', '--quiet', 'tests/doctests.py')
Expand Down
5 changes: 3 additions & 2 deletions dns/nox.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,9 @@ def default(session):
Python corresponding to the ``nox`` binary the ``PATH`` can
run the tests.
"""
# Install all test dependencies, then install this package in-place.
session.install('mock', 'pytest', 'pytest-cov', *LOCAL_DEPS)
# Install all test dependencies, then install local packages in-place.
session.install('mock', 'pytest', 'pytest-cov')
session.install('-e', *LOCAL_DEPS)
session.install('-e', '.')

# Run py.test against the unit tests.
Expand Down
14 changes: 7 additions & 7 deletions error_reporting/nox.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,9 @@ def default(session):
Python corresponding to the ``nox`` binary the ``PATH`` can
run the tests.
"""
# Install all test dependencies, then install this package in-place.
session.install('mock', 'pytest', 'pytest-cov', *LOCAL_DEPS)
# Install all test dependencies, then install local packages in-place.
session.install('mock', 'pytest', 'pytest-cov')
session.install('-e', *LOCAL_DEPS)
session.install('-e', '.')

# Run py.test against the unit tests.
Expand Down Expand Up @@ -111,11 +112,10 @@ def system(session, py):
# Use pre-release gRPC for system tests.
session.install('--pre', 'grpcio')

# Install all test dependencies, then install this package into the
# virtualenv's dist-packages.
session.install('mock', 'pytest', *LOCAL_DEPS)
session.install('../test_utils/')
session.install('.')
# Install all test dependencies, then install local packages in-place.
session.install('mock', 'pytest')
session.install('-e', '../test_utils/', *LOCAL_DEPS)
session.install('-e', '.')

# Run py.test against the system tests.
session.run('py.test', '-vvv', 'tests/system', *session.posargs)
Expand Down
14 changes: 7 additions & 7 deletions firestore/nox.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,9 @@ def default(session):
Python corresponding to the ``nox`` binary the ``PATH`` can
run the tests.
"""
# Install all test dependencies, then install this package in-place.
session.install('mock', 'pytest', 'pytest-cov', *LOCAL_DEPS)
# Install all test dependencies, then install local packages in-place.
session.install('mock', 'pytest', 'pytest-cov')
session.install('-e', *LOCAL_DEPS)
session.install('-e', '.')

# Run py.test against the unit tests.
Expand Down Expand Up @@ -86,11 +87,10 @@ def system(session, py):
# Use pre-release gRPC for system tests.
session.install('--pre', 'grpcio')

# Install all test dependencies, then install this package into the
# virtualenv's dist-packages.
session.install('mock', 'pytest', *LOCAL_DEPS)
session.install(os.path.join('..', 'test_utils'))
session.install('.')
# Install all test dependencies, then install local packages in-place.
session.install('mock', 'pytest')
session.install('-e', os.path.join('..', 'test_utils'), *LOCAL_DEPS)
session.install('-e', '.')

# Run py.test against the system tests.
session.run(
Expand Down
14 changes: 7 additions & 7 deletions language/nox.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,9 @@ def default(session):
Python corresponding to the ``nox`` binary the ``PATH`` can
run the tests.
"""
# Install all test dependencies, then install this package in-place.
session.install('mock', 'pytest', 'pytest-cov', *LOCAL_DEPS)
# Install all test dependencies, then install local packages in-place.
session.install('mock', 'pytest', 'pytest-cov')
session.install('-e', *LOCAL_DEPS)
session.install('-e', '.')

# Run py.test against the unit tests.
Expand Down Expand Up @@ -84,11 +85,10 @@ def system(session, py):
# Use pre-release gRPC for system tests.
session.install('--pre', 'grpcio')

# Install all test dependencies, then install this package into the
# virtualenv's dist-packages.
session.install('mock', 'pytest', *LOCAL_DEPS)
session.install('../storage/', '../test_utils/')
session.install('.')
# Install all test dependencies, then install local packages in-place.
session.install('mock', 'pytest')
session.install('-e', '../storage/', '../test_utils/', *LOCAL_DEPS)
session.install('-e', '.')

# Run py.test against the system tests.
session.run('py.test', '--quiet', 'tests/system/')
Expand Down
14 changes: 9 additions & 5 deletions logging/nox.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ def default(session, django_dep=('django',)):
else:
deps += django_dep

deps += LOCAL_DEPS
session.install(*deps)
session.install('-e', *LOCAL_DEPS)
session.install('-e', '.')

# Run py.test against the unit tests.
Expand Down Expand Up @@ -114,10 +114,14 @@ def system(session, py):

# Install all test dependencies, then install this package into the
# virtualenv's dist-packages.
session.install('mock', 'pytest', *LOCAL_DEPS)
session.install('../test_utils/', '../bigquery/', '../pubsub/',
'../storage/')
session.install('.')
session.install('mock', 'pytest')
session.install('-e',
'../test_utils/',
'../bigquery/',
'../pubsub/',
'../storage/',
*LOCAL_DEPS)
session.install('-e', '.')

# Run py.test against the system tests.
session.run(
Expand Down
14 changes: 7 additions & 7 deletions pubsub/nox.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,9 @@ def default(session):
Python corresponding to the ``nox`` binary the ``PATH`` can
run the tests.
"""
# Install all test dependencies, then install this package in-place.
session.install('mock', 'pytest', 'pytest-cov', *LOCAL_DEPS)
# Install all test dependencies, then install local packages in-place.
session.install('mock', 'pytest', 'pytest-cov')
session.install('-e', *LOCAL_DEPS)
session.install('-e', '.')

# Run py.test against the unit tests.
Expand Down Expand Up @@ -84,11 +85,10 @@ def system(session, py):
# Use pre-release gRPC for system tests.
session.install('--pre', 'grpcio')

# Install all test dependencies, then install this package into the
# virtualenv's dist-packages.
session.install('mock', 'pytest', *LOCAL_DEPS)
session.install('../test_utils/')
session.install('.')
# Install all test dependencies, then install local packages in-place.
session.install('mock', 'pytest')
session.install('-e', '../test_utils/', *LOCAL_DEPS)
session.install('-e', '.')

# Run py.test against the system tests.
session.run(
Expand Down
5 changes: 3 additions & 2 deletions redis/nox.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,9 @@ def default(session):
Python corresponding to the ``nox`` binary the ``PATH`` can
run the tests.
"""
# Install all test dependencies, then install this package in-place.
session.install('mock', 'pytest', 'pytest-cov', *LOCAL_DEPS)
# Install all test dependencies, then install local packages in-place.
session.install('mock', 'pytest', 'pytest-cov')
session.install('-e', *LOCAL_DEPS)
session.install('-e', '.')

# Run py.test against the unit tests.
Expand Down
5 changes: 3 additions & 2 deletions resource_manager/nox.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,9 @@ def default(session):
Python corresponding to the ``nox`` binary the ``PATH`` can
run the tests.
"""
# Install all test dependencies, then install this package in-place.
session.install('mock', 'pytest', 'pytest-cov', *LOCAL_DEPS)
# Install all test dependencies, then install local packages in-place.
session.install('mock', 'pytest', 'pytest-cov')
session.install('-e', *LOCAL_DEPS)
session.install('-e', '.')

# Run py.test against the unit tests.
Expand Down
12 changes: 6 additions & 6 deletions spanner/nox.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,9 @@ def default(session):
Python corresponding to the ``nox`` binary the ``PATH`` can
run the tests.
"""
# Install all test dependencies, then install this package in-place.
session.install('mock', 'pytest', 'pytest-cov', *LOCAL_DEPS)
# Install all test dependencies, then install local packages in-place.
session.install('mock', 'pytest', 'pytest-cov')
session.install('-e', *LOCAL_DEPS)
session.install('-e', '.')

# Run py.test against the unit tests.
Expand Down Expand Up @@ -89,10 +90,9 @@ def system_common(session):
# Use pre-release gRPC for system tests.
session.install('--pre', 'grpcio')

# Install all test dependencies, then install this package into the
# virtualenv's dist-packages.
session.install('mock', 'pytest', *LOCAL_DEPS)
session.install('../test_utils/')
# Install all test dependencies, then install local packages in-place.
session.install('mock', 'pytest')
session.install('-e', '../test_utils/', *LOCAL_DEPS)
session.install('-e', '.')

# Run py.test against the system tests.
Expand Down
18 changes: 10 additions & 8 deletions storage/nox.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,9 @@ def default(session):
Python corresponding to the ``nox`` binary the ``PATH`` can
run the tests.
"""
# Install all test dependencies, then install this package in-place.
session.install('mock', 'pytest', 'pytest-cov', *LOCAL_DEPS)
# Install all test dependencies, then install local packages in-place.
session.install('mock', 'pytest', 'pytest-cov')
session.install('-e', *LOCAL_DEPS)
session.install('-e', '.')

# Run py.test against the unit tests.
Expand Down Expand Up @@ -85,12 +86,13 @@ def system(session, py):
# Use pre-release gRPC for system tests.
session.install('--pre', 'grpcio')

# Install all test dependencies, then install this package into the
# virtualenv's dist-packages.
session.install('mock', 'pytest', *LOCAL_DEPS)
session.install('../test_utils/')
session.install('../pubsub')
session.install('../kms')
# Install all test dependencies, then install local packages in-place.
session.install('mock', 'pytest')
session.install('-e',
'../test_utils/',
'../pubsub',
'../kms',
*LOCAL_DEPS)
session.install('-e', '.')

# Run py.test against the system tests.
Expand Down
5 changes: 3 additions & 2 deletions trace/nox.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,9 @@ def default(session):
Python corresponding to the ``nox`` binary the ``PATH`` can
run the tests.
"""
# Install all test dependencies, then install this package in-place.
session.install('mock', 'pytest', 'pytest-cov', *LOCAL_DEPS)
# Install all test dependencies, then install local packages in-place.
session.install('mock', 'pytest', 'pytest-cov')
session.install('-e', *LOCAL_DEPS)
session.install('-e', '.')

# Run py.test against the unit tests.
Expand Down
Loading