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

docs(samples): Convert tightly coupled local variable inside of method into method arguments #386

Merged

Conversation

irvifa
Copy link
Contributor

@irvifa irvifa commented May 26, 2020

As the previous PR #382 and #379.
I find several other samples that have the tendencies of including tightly coupled
variable for each of specific method. Hence I think it will be better to pass it as an argument instead of simply using local variable inside of the method.

Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:

  • 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 #387 ☕️

…rguments.

As of the current version we can see that newExpirationTime,
however by passing it as an argument engineer can easily
change the newExperirationime in the IT test
thus enable them to understand more about the concept.
…ments in AddColumnLoadAppendIT

As of the current version we can see that the sourceUri and schema
is tightly coupled with the function, meanwhile the user can pass newSchema
and sourceUri base on the main method.
…ments in LoadParquetIT

As of the current version we can see that the sourceUri and tableName
is tightly coupled with the function, meanwhile the user can pass tableName
and sourceUri base on the main method.
…ments in LoadParquetReplaceTableIT

As of the current version we can see that the sourceUri and tableName
is tightly coupled with the function, meanwhile the user can pass tableName
and sourceUri base on the main method.
…eInsertRowsIT

As of the current version we can see that the rowContent
is tightly coupled with the function, meanwhile the user
can pass rowContent based on the main method.
…dateDatasetAccessIT

As of the current version we can see that the newEntry ACL
is tightly coupled with the function, meanwhile the user can
pass newEntry ACL in the main method.
…pdateTableExpirationIT

As of the current version we can see that the newExpiration
is tightly coupled with the function, meanwhile the user can pass newExpiration in the main method.
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label May 26, 2020
@irvifa irvifa changed the title docs(samples): Convert tightly coupled inout argument inside the methods into method arguments. docs(samples): Convert tightly coupled local variable inside the methods into method arguments May 26, 2020
@irvifa irvifa changed the title docs(samples): Convert tightly coupled local variable inside the methods into method arguments docs(samples): Convert tightly coupled local variable inside of method into method arguments May 26, 2020
@codecov
Copy link

codecov bot commented May 26, 2020

Codecov Report

Merging #386 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##             master     #386   +/-   ##
=========================================
  Coverage     77.88%   77.88%           
  Complexity     1184     1184           
=========================================
  Files            77       77           
  Lines          6218     6218           
  Branches        691      690    -1     
=========================================
  Hits           4843     4843           
  Misses         1021     1021           
  Partials        354      354           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0e91af2...586f4df. Read the comment docs.

@stephaniewang526 stephaniewang526 added kokoro:force-run Add this label to force Kokoro to re-run the tests. automerge Merge the pull request once unit tests and other checks pass. labels May 26, 2020
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label May 26, 2020
@gcf-merge-on-green gcf-merge-on-green bot merged commit 7c02cd3 into googleapis:master May 26, 2020
@irvifa irvifa deleted the allow-argument-passing-in-examples branch May 26, 2020 18:22
gcf-merge-on-green bot pushed a commit that referenced this pull request Jun 1, 2020
🤖 I have created a release \*beep\* \*boop\* 
---
### [1.116.1](https://www.github.com/googleapis/java-bigquery/compare/v1.116.0...v1.116.1) (2020-06-01)


### Dependencies

* remove google-cloud-core classiier=test since it is managed by … ([#396](https://www.github.com/googleapis/java-bigquery/issues/396)) ([bafd8ae](https://www.github.com/googleapis/java-bigquery/commit/bafd8ae780121ee968bca7b3eb68bb0f0a438124))
* restrict -annotation deps ([#402](https://www.github.com/googleapis/java-bigquery/issues/402)) ([db41581](https://www.github.com/googleapis/java-bigquery/commit/db4158186b99d0bed68fd70bef5918b1820e5dd1))
* update dependency com.google.cloud:google-cloud-shared-dependencies to v0.6.0 ([#392](https://www.github.com/googleapis/java-bigquery/issues/392)) ([3f13ccb](https://www.github.com/googleapis/java-bigquery/commit/3f13ccbbf1ca8f179c48a69c8e456bdf45c43af5))
* update shared-deps and add back certain test deps ([#390](https://www.github.com/googleapis/java-bigquery/issues/390)) ([7e21be2](https://www.github.com/googleapis/java-bigquery/commit/7e21be2506cdaf065cd32e3aed403890929b93e7))


### Documentation

* **samples:** Convert tightly coupled local variable inside of method into method arguments ([#386](https://www.github.com/googleapis/java-bigquery/issues/386)) ([7c02cd3](https://www.github.com/googleapis/java-bigquery/commit/7c02cd3ca7238d24bb2914ae2262a3b2e2d4bda7)), closes [#387](https://www.github.com/googleapis/java-bigquery/issues/387)
* **samples:** Convert tightly coupled local variable involved options inside of method into method arguments ([#393](https://www.github.com/googleapis/java-bigquery/issues/393)) ([a11f3cb](https://www.github.com/googleapis/java-bigquery/commit/a11f3cb4733215a9c4a65936b05f9cc2ed75656f)), closes [#394](https://www.github.com/googleapis/java-bigquery/issues/394)
* **samples:** Fix flaky test ([#397](https://www.github.com/googleapis/java-bigquery/issues/397)) ([64847d1](https://www.github.com/googleapis/java-bigquery/commit/64847d1e5137e811e7f462fc058908fa9fcc55fb))
* **samples:** update revierwers for samples module changes ([#401](https://www.github.com/googleapis/java-bigquery/issues/401)) ([69b9d84](https://www.github.com/googleapis/java-bigquery/commit/69b9d8417d5b910286aaa855f4a83fc151a81cec))
---


This PR was generated with [Release Please](https://github.com/googleapis/release-please).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge Merge the pull request once unit tests and other checks pass. cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Convert tightly coupled local variable inside of method into method arguments
4 participants