Skip to content

fix: Ensure repo install #741

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

Merged
merged 16 commits into from
Feb 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
13 changes: 13 additions & 0 deletions owlbot.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,8 @@
# dependency of grpc''',
)



def place_before(path, text, *before_text, escape=None):
replacement = "\n".join(before_text) + "\n" + text
if escape:
Expand Down Expand Up @@ -211,6 +213,17 @@ def compliance(session):

python.py_samples(skip_readmes=True)

s.replace(
["./samples/snippets/noxfile.py"],
"""session.install\("-e", _get_repo_root\(\)\)""",
"""session.install("-e", _get_repo_root())
else:
# ensure that sqlalchemy_bigquery gets installed
# for tests that are not based on source
session.install("sqlalchemy_bigquery")""",
)


# ----------------------------------------------------------------------------
# Final cleanup
# ----------------------------------------------------------------------------
Expand Down
4 changes: 4 additions & 0 deletions samples/snippets/noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,10 @@ def _session_tests(

if INSTALL_LIBRARY_FROM_SOURCE:
session.install("-e", _get_repo_root())
else:
# ensure that sqlalchemy_bigquery gets installed
# for tests that are not based on source
session.install("sqlalchemy_bigquery")

if post_install:
post_install(session)
Expand Down