Skip to content

Conversation

@summer-ji-eng
Copy link
Contributor

@summer-ji-eng summer-ji-eng commented Jan 21, 2021

The GAPIC java microgenerator requires a mechanism to generate the Javadoc comment for the classes and methods including the sample code snippets.

samplecode-master is master branch for implementing the feature of generating sample codes. Within the sub branches of implementing sub component of sample code, we are ready to merge into the master branch and launch the this feature. Note that, some of the sample code already checked in master before, I marked down below.

The requirements:

  • Generate sample code for 4 files in each client library:
    • ServiceClientClass.java which includes:
      • Class header comment and
        • method sample
        • credentials sample (checked in master)
        • endpoint sample (checked in master)
      • Methods header comment
    • ServiceSettingClass.java (checked in master)
    • ServiceStubSettingClass.java (checked in master)
    • Package-info.java
  • Produce well-formatted code snippets

Test:

  • Unit test: Added unit test for each type of sample codes.
  • Integration Test:
  • test/integration/goldens contains all the generated sample code, include asset, logging, credentials, redis, 'library'

…position (#628)

* [samplecode][1/3]Implement Pure Unary RPC sample code (#573)

* [samplecode][1/3]Implement Pure Unary RPC sample code (#573)

* Move ServiceClientSampleCodeComposerTest into correct dir

* rebase #616

* rebase samplecode with dev_composer
@summer-ji-eng summer-ji-eng added the draft Do Not Review label Jan 21, 2021
@google-cla google-cla bot added the cla: yes This human has signed the Contributor License Agreement. label Jan 21, 2021
@summer-ji-eng summer-ji-eng changed the title [WIP]Merge Sample Code into Master Merge Sample Code into Master Jan 22, 2021
@summer-ji-eng summer-ji-eng removed the draft Do Not Review label Jan 22, 2021
@summer-ji-eng
Copy link
Contributor Author

Hi @chingor13, we complete the sample code implementation in gapic-generator-java. Could you review on the client libraries' sample codes where are generated by this feature before it launch. It locates at test/integration/goldens directory. Please let me know if you have any question. Appreciate any feedback or comment. Thanks a lot. 🙏

Copy link
Contributor

@miraleung miraleung left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this wait for #646 and #647?

Copy link
Contributor

@miraleung miraleung left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please run the commands to double-check this as well (shared via chat)?

@summer-ji-eng
Copy link
Contributor Author

#646 and #647

@miraleung These two PR is not change the code surface. So it will not be the blocker, but I prefer to wait these RPs.

@summer-ji-eng
Copy link
Contributor Author

summer-ji-eng commented Jan 26, 2021

@miraleung @chingor13 Please take another look. After point third_party/googleapis/WORKSPACE to the local gapic-generator-java 's latest samplecode-master branch, All tests passed in google3/third_party/googleapis environment.

Copy link
Contributor

@miraleung miraleung left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please wait for chingor@ to approve the generated sample code (under test/integration/goldens).

@summer-ji-eng summer-ji-eng merged commit 7a22323 into master Jan 29, 2021
@summer-ji-eng summer-ji-eng deleted the samplecode-master branch January 29, 2021 19:40
suztomo pushed a commit that referenced this pull request Mar 21, 2023
🤖 I have created a release *beep* *boop*
---


### Updating meta-information for bleeding-edge SNAPSHOT release.

---
This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
suztomo pushed a commit that referenced this pull request Mar 21, 2023
🤖 I have created a release \*beep\* \*boop\*
---
### [2.3.4](https://www.github.com/googleapis/java-core/compare/v2.3.3...v2.3.4) (2022-01-06)


### Bug Fixes

* fixed compilation warnings from error prone ([e424c31](https://www.github.com/googleapis/java-core/commit/e424c31af5bffcce76b60095ebcf3dc7e57e0aae))
* **java:** add -ntp flag to native image testing command ([#1299](https://www.github.com/googleapis/java-core/issues/1299)) ([#643](https://www.github.com/googleapis/java-core/issues/643)) ([0c16f02](https://www.github.com/googleapis/java-core/commit/0c16f02187a6dd66f5c41d104a4dc719fe43914e))
* **java:** run Maven in plain console-friendly mode ([#1301](https://www.github.com/googleapis/java-core/issues/1301)) ([#652](https://www.github.com/googleapis/java-core/issues/652)) ([fc4f72a](https://www.github.com/googleapis/java-core/commit/fc4f72ade71708cda01238c5b0865fb09850be70))


### Dependencies

* update dependency com.google.api-client:google-api-client-bom to v1.33.0 ([#658](https://www.github.com/googleapis/java-core/issues/658)) ([b275a7a](https://www.github.com/googleapis/java-core/commit/b275a7a904c14d0814a5b2b9b6e58bc0b1593e9c))
* update dependency com.google.api:gax-bom to v2.8.0 ([#659](https://www.github.com/googleapis/java-core/issues/659)) ([5f75cac](https://www.github.com/googleapis/java-core/commit/5f75cacec4edfe80fcc3b2b23ee5074c223bb6c6))
* update dependency com.google.api.grpc:proto-google-common-protos to v2.7.1 ([#656](https://www.github.com/googleapis/java-core/issues/656)) ([9d96982](https://www.github.com/googleapis/java-core/commit/9d96982a28e09c6ed1870373877acec2be28fdcc))
* update dependency com.google.api.grpc:proto-google-iam-v1 to v1.2.0 ([#645](https://www.github.com/googleapis/java-core/issues/645)) ([5e3a17d](https://www.github.com/googleapis/java-core/commit/5e3a17d1f2b9e6345c9b78ab2b6c28040be67c2f))
* update dependency com.google.http-client:google-http-client-bom to v1.41.0 ([#657](https://www.github.com/googleapis/java-core/issues/657)) ([e0b6d7d](https://www.github.com/googleapis/java-core/commit/e0b6d7d8e4f550d5232f331135511a31b988d599))
* update dependency com.google.protobuf:protobuf-bom to v3.19.2 ([#655](https://www.github.com/googleapis/java-core/issues/655)) ([881cb43](https://www.github.com/googleapis/java-core/commit/881cb430a6a5ee15520234012c36c1dc38aa8b29))
* update dependency io.grpc:grpc-bom to v1.43.1 ([#647](https://www.github.com/googleapis/java-core/issues/647)) ([29f8f34](https://www.github.com/googleapis/java-core/commit/29f8f34b7d4a5d142e43cd969c5bff185e0e2b82))
---


This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla: yes This human has signed the Contributor License Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants