Skip to content
This repository was archived by the owner on Sep 9, 2023. It is now read-only.

Commit a5494b0

Browse files
committed
feat: initial code generation
0 parents  commit a5494b0

File tree

534 files changed

+289078
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

534 files changed

+289078
-0
lines changed

.github/CODEOWNERS

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Code owners file.
2+
# This file controls who is tagged for review for any given pull request.
3+
4+
# For syntax help see:
5+
# https://help.github.com/en/github/creating-cloning-and-archiving-repositories/about-code-owners#codeowners-syntax
6+
7+
* @googleapis/yoshi-java
8+
9+
# The java-samples-reviewers team is the default owner for samples changes
10+
samples/**/*.java @googleapis/java-samples-reviewers

.github/ISSUE_TEMPLATE/bug_report.md

+51
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
5+
---
6+
7+
Thanks for stopping by to let us know something could be better!
8+
9+
**PLEASE READ**: If you have a support contract with Google, please create an issue in the [support console](https://cloud.google.com/support/) instead of filing on GitHub. This will ensure a timely response.
10+
11+
Please run down the following list and make sure you've tried the usual "quick fixes":
12+
13+
- Search the issues already opened: https://github.com/googleapis/java-aiplatform/issues
14+
- Check for answers on StackOverflow: http://stackoverflow.com/questions/tagged/google-cloud-platform
15+
16+
If you are still having issues, please include as much information as possible:
17+
18+
#### Environment details
19+
20+
1. Specify the API at the beginning of the title. For example, "BigQuery: ...").
21+
General, Core, and Other are also allowed as types
22+
2. OS type and version:
23+
3. Java version:
24+
4. aiplatform version(s):
25+
26+
#### Steps to reproduce
27+
28+
1. ?
29+
2. ?
30+
31+
#### Code example
32+
33+
```java
34+
// example
35+
```
36+
37+
#### Stack trace
38+
```
39+
Any relevant stacktrace here.
40+
```
41+
42+
#### External references such as API reference guides
43+
44+
- ?
45+
46+
#### Any additional information below
47+
48+
49+
Following these steps guarantees the quickest resolution possible.
50+
51+
Thanks!
+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this library
4+
5+
---
6+
7+
Thanks for stopping by to let us know something could be better!
8+
9+
**PLEASE READ**: If you have a support contract with Google, please create an issue in the [support console](https://cloud.google.com/support/) instead of filing on GitHub. This will ensure a timely response.
10+
11+
**Is your feature request related to a problem? Please describe.**
12+
What the problem is. Example: I'm always frustrated when [...]
13+
14+
**Describe the solution you'd like**
15+
What you want to happen.
16+
17+
**Describe alternatives you've considered**
18+
Any alternative solutions or features you've considered.
19+
20+
**Additional context**
21+
Any other context or screenshots about the feature request.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
name: Support request
3+
about: If you have a support contract with Google, please create an issue in the Google Cloud Support console.
4+
5+
---
6+
7+
**PLEASE READ**: If you have a support contract with Google, please create an issue in the [support console](https://cloud.google.com/support/) instead of filing on GitHub. This will ensure a timely response.

.github/PULL_REQUEST_TEMPLATE.md

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
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:
2+
- [ ] Make sure to open an issue as a [bug/issue](https://github.com/googleapis/java-aiplatform/issues/new/choose) before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea
3+
- [ ] Ensure the tests and linter pass
4+
- [ ] Code coverage does not decrease (if any source code was changed)
5+
- [ ] Appropriate docs were updated (if necessary)
6+
7+
Fixes #<issue_number_goes_here> ☕️

.github/release-please.yml

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
releaseType: java-yoshi
2+
bumpMinorPreMajor: true

.github/trusted-contribution.yml

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
trustedContributors:
2+
- renovate-bot

.github/workflows/auto-release.yaml

+69
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
on:
2+
pull_request:
3+
name: auto-release
4+
jobs:
5+
approve:
6+
runs-on: ubuntu-latest
7+
steps:
8+
- uses: actions/[email protected]
9+
with:
10+
github-token: ${{secrets.GITHUB_TOKEN}}
11+
debug: true
12+
script: |
13+
// only approve PRs from release-please[bot]
14+
if (context.payload.pull_request.user.login !== "release-please[bot]") {
15+
return;
16+
}
17+
18+
// only approve PRs like "chore: release <release version>"
19+
if ( !context.payload.pull_request.title.startsWith("chore: release") ) {
20+
return;
21+
}
22+
23+
// trigger auto-release when
24+
// 1) it is a SNAPSHOT release (auto-generated post regular release)
25+
// 2) there are dependency updates only
26+
// 3) there are no open dependency update PRs in this repo (to avoid multiple releases)
27+
if (
28+
context.payload.pull_request.body.includes("Fix") ||
29+
context.payload.pull_request.body.includes("Build") ||
30+
context.payload.pull_request.body.includes("Documentation") ||
31+
context.payload.pull_request.body.includes("BREAKING CHANGES") ||
32+
context.payload.pull_request.body.includes("Features")
33+
) {
34+
console.log( "Not auto-releasing since it is not a dependency-update-only release." );
35+
return;
36+
}
37+
38+
const promise = github.pulls.list.endpoint({
39+
owner: context.repo.owner,
40+
repo: context.repo.repo,
41+
state: 'open'
42+
});
43+
const open_pulls = await github.paginate(promise)
44+
45+
if ( open_pulls.length > 1 && !context.payload.pull_request.title.includes("SNAPSHOT") ) {
46+
for ( const pull of open_pulls ) {
47+
if ( pull.title.startsWith("deps: update dependency") ) {
48+
console.log( "Not auto-releasing yet since there are dependency update PRs open in this repo." );
49+
return;
50+
}
51+
}
52+
}
53+
54+
// approve release PR
55+
await github.pulls.createReview({
56+
owner: context.repo.owner,
57+
repo: context.repo.repo,
58+
body: 'Rubber stamped release!',
59+
pull_number: context.payload.pull_request.number,
60+
event: 'APPROVE'
61+
});
62+
63+
// attach kokoro:force-run and automerge labels
64+
await github.issues.addLabels({
65+
owner: context.repo.owner,
66+
repo: context.repo.repo,
67+
issue_number: context.payload.pull_request.number,
68+
labels: ['kokoro:force-run', 'automerge']
69+
});

.github/workflows/ci.yaml

+79
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
on:
2+
push:
3+
branches:
4+
- master
5+
pull_request:
6+
name: ci
7+
jobs:
8+
units:
9+
runs-on: ubuntu-latest
10+
strategy:
11+
matrix:
12+
java: [7, 8, 11]
13+
steps:
14+
- uses: actions/checkout@v2
15+
- uses: actions/setup-java@v1
16+
with:
17+
java-version: ${{matrix.java}}
18+
- run: java -version
19+
- run: .kokoro/build.sh
20+
env:
21+
JOB_TYPE: test
22+
- name: coverage
23+
uses: codecov/codecov-action@v1
24+
with:
25+
name: actions ${{matrix.java}}
26+
windows:
27+
runs-on: windows-latest
28+
steps:
29+
- uses: actions/checkout@v2
30+
- uses: actions/setup-java@v1
31+
with:
32+
java-version: 8
33+
- run: java -version
34+
- run: .kokoro/build.bat
35+
env:
36+
JOB_TYPE: test
37+
dependencies:
38+
runs-on: ubuntu-latest
39+
strategy:
40+
matrix:
41+
java: [8, 11]
42+
steps:
43+
- uses: actions/checkout@v2
44+
- uses: actions/setup-java@v1
45+
with:
46+
java-version: ${{matrix.java}}
47+
- run: java -version
48+
- run: .kokoro/dependencies.sh
49+
linkage-monitor:
50+
runs-on: ubuntu-latest
51+
steps:
52+
- uses: actions/checkout@v2
53+
- uses: actions/setup-java@v1
54+
with:
55+
java-version: 8
56+
- run: java -version
57+
- run: .kokoro/linkage-monitor.sh
58+
lint:
59+
runs-on: ubuntu-latest
60+
steps:
61+
- uses: actions/checkout@v2
62+
- uses: actions/setup-java@v1
63+
with:
64+
java-version: 8
65+
- run: java -version
66+
- run: .kokoro/build.sh
67+
env:
68+
JOB_TYPE: lint
69+
clirr:
70+
runs-on: ubuntu-latest
71+
steps:
72+
- uses: actions/checkout@v2
73+
- uses: actions/setup-java@v1
74+
with:
75+
java-version: 8
76+
- run: java -version
77+
- run: .kokoro/build.sh
78+
env:
79+
JOB_TYPE: clirr

.github/workflows/samples.yaml

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
on:
2+
pull_request:
3+
name: samples
4+
jobs:
5+
lint:
6+
runs-on: ubuntu-latest
7+
steps:
8+
- uses: actions/checkout@v2
9+
- uses: actions/setup-java@v1
10+
with:
11+
java-version: 8
12+
- name: Run checkstyle
13+
run: mvn -P lint --quiet --batch-mode checkstyle:check
14+
working-directory: samples/snippets

.gitignore

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Maven
2+
target/
3+
4+
# Eclipse
5+
.classpath
6+
.project
7+
.settings
8+
9+
# Intellij
10+
*.iml
11+
.idea/
12+
13+
# python utilities
14+
*.pyc
15+
__pycache__
16+
17+
.flattened-pom.xml

.kokoro/build.bat

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
:: See documentation in type-shell-output.bat
2+
3+
"C:\Program Files\Git\bin\bash.exe" %~dp0build.sh

0 commit comments

Comments
 (0)