-
Notifications
You must be signed in to change notification settings - Fork 59
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
Added @example tags to src/instance.js #222
Added @example tags to src/instance.js #222
Conversation
7c8b1c9
to
e80dfbd
Compare
Codecov Report
@@ Coverage Diff @@
## master #222 +/- ##
=====================================
Coverage 100% 100%
=====================================
Files 10 10
Lines 1266 1266
=====================================
Hits 1266 1266
Continue to review full report at Codecov.
|
ccebaa3
to
d9a7923
Compare
34f55a0
to
cbf4516
Compare
@jabubake: Do we need tests for these snippets? |
@sduskis : Yes, ensuring these are tested will help maintain them. Since these snippets are for the API methods, one option to minimize the number of tests is to ensure that the integration tests for the library leverage these snippets as test cases. |
Samples actually have their own testing files and conventions: https://github.com/googleapis/nodejs-bigtable/tree/master/samples. See the There is already a file, |
@stephenplusplus I agree there is overlap here : in this case, |
7e8848b
to
a225c02
Compare
const Bigtable = require('@google-cloud/bigtable'); | ||
const bigtableClient = new Bigtable(); | ||
|
||
function newInstance(instanceId) { |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
// let operations = result[1]; | ||
// let apiResponse = result[2]; | ||
|
||
console.log(`Created Instance: ${newInstance.name}`); |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
const newCluster = result[0]; | ||
// const operations = result[1]; | ||
// const apiResponse = result[2]; | ||
console.log(`Cluster created: ${newCluster.name}`); |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
// [END bigtable_create_instance] | ||
} | ||
|
||
function newCluster(clusterId, instanceId) { |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
// [END bigtable_create_cluster] | ||
} | ||
|
||
function newAppProfile(appProfileId, clusterId, instanceId) { |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
function getMetaData(instanceId) { | ||
const instance = bigtableClient.instance(instanceId); | ||
|
||
// [START bigtable_get_imeta] |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
console.log(`Tables:`); | ||
let tables = result[0]; | ||
tables.forEach(t => { | ||
console.log(t.name); |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
// [END bigtable_get_tables] | ||
} | ||
|
||
function setMetaData(instanceId) { |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
@vijay-qlogic: can you please update this? |
8b64377
to
6c11f2a
Compare
6c11f2a
to
174f67c
Compare
@stephenplusplus, do you know how to generate API documentation? That's important in testing this PR. Specifically, how can we generate the API docs that pull in examples from other files:
|
That's all done behind the scenes from me. @jmdobry can probably help. |
I searched for generating API docs that pull in examples from other files, but no where in JSDoc guide found |
If your changes were on a branch of the nodejs-bigtable repo itself, I could stage the API ref docs to test their use of |
@jmdobry, can you potentially use |
@jmdobry I have referred nodejs-spanner to include I searched for |
@jmdobry, I created a new branch on |
I tested generating and staging the docs using your |
Hi Jason,
Can you please verify the "example" section while generating the API Docs.
Because in my case "region_tag" do not pulls the example code.
Sharing the screen-shot here.
…On Fri, Jul 20, 2018 at 10:46 PM, Jason Dobry ***@***.***> wrote:
I tested generating and staging the docs using your docs_test branch,
looks good.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#222 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AiYqSLal5zHDSOy8rqBdXXqjpq2O6K1Oks5uIhBhgaJpZM4U5GFk>
.
|
Has something changed since I last verified it? |
@vijay-qlogic, this was verified. |
Fixes #157 for Instance.js (it's a good idea to open an issue first for discussion)