GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — feat: Create a few code snippets as examples for using Spanner Graph in Python by bharadwajvr · Pull Request #1186 · googleapis/python-spanner

This repository was archived by the owner on Jun 8, 2026. It is now read-only.

Conversation

@bharadwajvr

@bharadwajvr bharadwajvr commented Aug 9, 2024

Copy link
Copy Markdown
Contributor

Add a few code snippets to illustrate how to use Spanner Graph functionality in Python. These examples resemble other snippets for how various other Spanner features can be used.

  • Make sure to open an issue as a bug/issue before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea
  • Ensure the tests and linter pass
  • Code coverage does not decrease (if any source code was changed)
  • Appropriate docs were updated (if necessary)

Fixes #1185 🦕

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@bharadwajvr
bharadwajvr requested a review from a team as a code owner August 9, 2024 17:13
@bharadwajvr
bharadwajvr requested review from a team and iennae August 9, 2024 17:13
@snippet-bot

snippet-bot Bot commented Aug 9, 2024 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Here is the summary of changes.

You are about to add 9 region tags.
  • samples/samples/graph_snippets.py:30, tag spanner_create_database_with_property_graph
  • samples/samples/graph_snippets.py:102, tag spanner_insert_graph_data
  • samples/samples/graph_snippets.py:162, tag spanner_insert_graph_data_with_dml
  • samples/samples/graph_snippets.py:197, tag spanner_update_graph_data_with_dml
  • samples/samples/graph_snippets.py:226, tag spanner_update_graph_data_with_graph_query_in_dml
  • samples/samples/graph_snippets.py:251, tag spanner_query_graph_data
  • samples/samples/graph_snippets.py:272, tag spanner_query_graph_data_with_parameter
  • samples/samples/graph_snippets.py:297, tag spanner_delete_graph_data_with_dml
  • samples/samples/graph_snippets.py:324, tag spanner_delete_graph_data

This comment is generated by snippet-bot.
If you find problems with this result, please file an issue at:
https://github.com/googleapis/repo-automation-bots/issues.
To update this comment, add snippet-bot:force-run label or use the checkbox below:

  • Refresh this comment
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@product-auto-label product-auto-label Bot added the size: l Pull request size is large. label Aug 9, 2024
@blunderbuss-gcf blunderbuss-gcf Bot assigned arpan14 Aug 9, 2024
@product-auto-label product-auto-label Bot added api: spanner Issues related to the googleapis/python-spanner API. samples Issues that are directly related to samples. labels Aug 9, 2024
@bharadwajvr

bharadwajvr commented Aug 9, 2024

Copy link
Copy Markdown
Contributor Author

I did not find instructions for this in the authoring guide - how do I obtain code coverage information for the new code I've written? There is an ask in the description to verify that " Code coverage does not decrease (if any source code was changed)"

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bharadwajvr

bharadwajvr commented Aug 15, 2024

Copy link
Copy Markdown
Contributor Author

Gentle ping.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

bharadwajvr added 7 commits August 22, 2024 16:23
@bharadwajvr
Create a set of code snippets for using Graph on Cloud Spanner
ca68cf5
@bharadwajvr
Update to match gcloud/cli examples that exist in the docs
b6355ff
@bharadwajvr
Fix update with graph query predicate syntax
fb7144f
@bharadwajvr
Added an update step for allowing commit timestamps and changed to sc…
cb6402d
…hema to not have that option
@bharadwajvr
Fix styling using flake8
1341a4f
@bharadwajvr
Add tests for new Spanner Graph snippets
7879f72
@bharadwajvr
Fix some region tags that were inconsistent
9776bce
@bharadwajvr
bharadwajvr force-pushed the aeros branch from 811caf0 to 9776bce Compare August 22, 2024 23:23
@bharadwajvr

bharadwajvr commented Aug 22, 2024

Copy link
Copy Markdown
Contributor Author

A reminder

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@harshachinta

harshachinta commented Aug 23, 2024

Copy link
Copy Markdown
Contributor

@bharadwajvr Thanks for the PR. Will review it early next week.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@harshachinta

harshachinta commented Aug 23, 2024

Copy link
Copy Markdown
Contributor

I did not find instructions for this in the authoring guide - how do I obtain code coverage information for the new code I've written? There is an ask in the description to verify that " Code coverage does not decrease (if any source code was changed)"

Looking at the files changed, there is no source file changes in this PR. So this can be ignored.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bharadwajvr

bharadwajvr commented Aug 23, 2024

Copy link
Copy Markdown
Contributor Author

@bharadwajvr Thanks for the PR. Will review it early next week.

Thank you @harshachinta

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bharadwajvr
Remove one unnecessary function and some redundant comments
5d04571
@harshachinta harshachinta added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Aug 23, 2024
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Aug 23, 2024
bharadwajvr and others added 2 commits August 22, 2024 22:37
@bharadwajvr
Remove reference to allow_commit_timestamp
b7af9a1
@harshachinta
Merge branch 'main' into aeros
fa6b5d5
@harshachinta harshachinta added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Aug 26, 2024
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Aug 26, 2024
harshachinta
harshachinta approved these changes Aug 26, 2024
View reviewed changes
@harshachinta harshachinta added the do not merge Indicates a pull request not ready for merge, due to either quality or timing. label Aug 26, 2024
@harshachinta

harshachinta commented Aug 26, 2024

Copy link
Copy Markdown
Contributor

Adding Do not merge to check the presubmit build status before merging

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@harshachinta

harshachinta commented Aug 26, 2024

Copy link
Copy Markdown
Contributor

@bharadwajvr
Can you please fix the failing lint
image

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bharadwajvr
Fix lint issues in test file
0983949
@bharadwajvr

bharadwajvr commented Aug 26, 2024 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor Author

@bharadwajvr Can you please fix the failing lint image

Done. Local run succeeds. @harshachinta

$ flake8 --show-source --builtin=gettext --max-complexity=20 '--exclude=.nox,.cache,env,lib,generated_pb2,*_pb2.py,*_pb2_grpc.py' --ignore=E121,E123,E126,E203,E226,E24,E266,E501,E704,W503,W504,I202 --max-line-length=88
$
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@harshachinta harshachinta added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Aug 27, 2024
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Aug 27, 2024
@harshachinta
harshachinta enabled auto-merge (squash) August 27, 2024 05:25
@harshachinta harshachinta removed the do not merge Indicates a pull request not ready for merge, due to either quality or timing. label Aug 27, 2024
@harshachinta
Merge branch 'main' into aeros
615893b
@harshachinta harshachinta added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Aug 27, 2024
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Aug 27, 2024
@harshachinta
harshachinta merged commit f886ebd into googleapis:main Aug 27, 2024
@release-please release-please Bot mentioned this pull request Aug 27, 2024
chore(main): release 3.49.0 #1182
Merged
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Reviewers

@iennae iennae Awaiting requested review from iennae iennae is a code owner automatically assigned from googleapis/python-samples-reviewers
1 more reviewer
@harshachinta harshachinta harshachinta approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@arpan14 arpan14

Labels

api: spanner Issues related to the googleapis/python-spanner API. samples Issues that are directly related to samples. size: l Pull request size is large.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Create samples for Cloud Spanner Graph

Uh oh!

There was an error while loading. Please reload this page.

4 participants

@bharadwajvr @harshachinta @arpan14 @yoshi-kokoro
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.