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

migrate code from googleapis/python-language #8533

Merged
merged 326 commits into from
Nov 22, 2022
Merged
Show file tree
Hide file tree
Changes from 250 commits
Commits
Show all changes
326 commits
Select commit Hold shift + click to select a range
01ff509
Auto-update dependencies. [(#1048)](https://github.com/GoogleCloudPla…
dpebot Aug 3, 2017
58c697a
move region tags so that the beta page only include codes from the re…
dizcology Aug 3, 2017
104b4ef
Auto-update dependencies. [(#1055)](https://github.com/GoogleCloudPla…
dpebot Aug 7, 2017
0b1a10d
Update langauge test case to deal with changing server output
Aug 7, 2017
7e10f05
Auto-update dependencies. [(#1057)](https://github.com/GoogleCloudPla…
dpebot Aug 8, 2017
31d3b5b
show entity type name [(#1062)](https://github.com/GoogleCloudPlatfor…
dizcology Aug 8, 2017
ebba1f8
Auto-update dependencies. [(#1073)](https://github.com/GoogleCloudPla…
dpebot Aug 16, 2017
0ca3eec
Fix flaky movie_nl tests
Aug 16, 2017
fe9be31
Auto-update dependencies. [(#1093)](https://github.com/GoogleCloudPla…
dpebot Aug 29, 2017
0c39960
Auto-update dependencies. [(#1094)](https://github.com/GoogleCloudPla…
dpebot Aug 30, 2017
530dd43
Language classify [(#1095)](https://github.com/GoogleCloudPlatform/py…
dizcology Sep 15, 2017
d73bec2
Client version update [(#1117)](https://github.com/GoogleCloudPlatfor…
dizcology Sep 15, 2017
6ad2fd6
Update all generated readme auth instructions [(#1121)](https://githu…
Sep 18, 2017
3114217
Update readme [(#1124)](https://github.com/GoogleCloudPlatform/python…
dizcology Sep 19, 2017
5a64261
Classify tutorial [(#1120)](https://github.com/GoogleCloudPlatform/py…
dizcology Sep 19, 2017
f9361c4
Auto-update dependencies. [(#1133)](https://github.com/GoogleCloudPla…
dpebot Sep 21, 2017
3820973
Added Link to Python Setup Guide [(#1158)](https://github.com/GoogleC…
Oct 12, 2017
1e2c091
Auto-update dependencies. [(#1138)](https://github.com/GoogleCloudPla…
dpebot Oct 23, 2017
6fd82d1
Fix classify text tutorial
Oct 24, 2017
c049a09
Fix classify text tutorial
Oct 24, 2017
4433058
Fix a few more lint issues
Oct 24, 2017
1a8adf1
Fixed failed tests on Kokoro (Natural Language API) [(#1185)](https:/…
Nov 1, 2017
fdefb9c
Auto-update dependencies. [(#1186)](https://github.com/GoogleCloudPla…
dpebot Nov 1, 2017
0a0c397
Auto-update dependencies. [(#1199)](https://github.com/GoogleCloudPla…
dpebot Nov 6, 2017
67afd42
Fix linter issue w/ snippets
andrewsg Nov 9, 2017
b072af5
Auto-update dependencies. [(#1208)](https://github.com/GoogleCloudPla…
dpebot Nov 9, 2017
db96e3a
Language v1 [(#1202)](https://github.com/GoogleCloudPlatform/python-d…
dizcology Nov 13, 2017
e675b64
update to use v1 client [(#1216)](https://github.com/GoogleCloudPlatf…
dizcology Nov 14, 2017
8e99524
Auto-update dependencies. [(#1217)](https://github.com/GoogleCloudPla…
dpebot Nov 15, 2017
b62c6be
Relax regex in ocr_nl sample test [(#1250)](https://github.com/Google…
Dec 6, 2017
15ecc88
Added "Open in Cloud Shell" buttons to README files [(#1254)](https:/…
Dec 7, 2017
31950bd
Auto-update dependencies. [(#1304)](https://github.com/GoogleCloudPla…
dpebot Jan 8, 2018
2c9fbb5
Auto-update dependencies. [(#1309)](https://github.com/GoogleCloudPla…
dpebot Jan 10, 2018
ea1e3dd
Auto-update dependencies. [(#1320)](https://github.com/GoogleCloudPla…
dpebot Feb 2, 2018
aaff669
Auto-update dependencies. [(#1355)](https://github.com/GoogleCloudPla…
dpebot Feb 9, 2018
39793ec
Auto-update dependencies. [(#1359)](https://github.com/GoogleCloudPla…
dpebot Feb 26, 2018
ff89cd3
Auto-update dependencies. [(#1377)](https://github.com/GoogleCloudPla…
dpebot Mar 5, 2018
9205fec
Auto-update dependencies. [(#1397)](https://github.com/GoogleCloudPla…
dpebot Mar 13, 2018
58b3511
Auto-update dependencies.
dpebot Apr 2, 2018
207e84f
Regenerate the README files and fix the Open in Cloud Shell link for …
Apr 7, 2018
a84db3f
Update READMEs to fix numbering and add git clone [(#1464)](https://g…
frankyn Apr 26, 2018
1e3de10
automl beta [(#1575)](https://github.com/GoogleCloudPlatform/python-d…
sirtorry Jul 20, 2018
4418193
use lcm instead of vcm [(#1597)](https://github.com/GoogleCloudPlatfo…
sirtorry Jul 24, 2018
b3b2fdf
skip automl model create/delete test [(#1608)](https://github.com/Goo…
sirtorry Aug 3, 2018
768c811
Language region tag update [(#1643)](https://github.com/GoogleCloudPl…
alixhami Aug 21, 2018
9f72967
Auto-update dependencies. [(#1658)](https://github.com/GoogleCloudPla…
dpebot Aug 28, 2018
9fed94d
Update AutoML region tags to use standard product prefixes [(#1669)](…
alixhami Aug 29, 2018
fca1973
Add small, generated version of `language_sentiment_text` [(#1660)](h…
beccasaurus Aug 30, 2018
7a99445
Access Display Names of enum fields via enum object [(#1738)](https:/…
beccasaurus Oct 15, 2018
dac091d
Remove unused and outdated Natural Language samples [(#1715)](https:/…
alixhami Oct 16, 2018
6ebffe8
Fixed name of model [(#1779)](https://github.com/GoogleCloudPlatform/…
engelke Oct 19, 2018
9a80642
Auto-update dependencies. [(#1846)](https://github.com/GoogleCloudPla…
dpebot Nov 20, 2018
2d77d1f
Moved the imports and region tags inside the functions [(#1891)](htt…
happyhuman Dec 4, 2018
5fb10cf
Fix decode [(#1911)](https://github.com/GoogleCloudPlatform/python-do…
andrewferlitsch Dec 6, 2018
e4efe7d
Update sample output [(#1893)](https://github.com/GoogleCloudPlatform…
nnegrey Dec 7, 2018
e3d396b
Auto-update dependencies. [(#1980)](https://github.com/GoogleCloudPla…
dpebot Feb 6, 2019
facb890
Update requirements.txt [(#2128)](https://github.com/GoogleCloudPlatf…
engelke Apr 29, 2019
f0c43d2
Adds split updates for Firebase ... opencensus [(#2438)](https://gith…
gguuss Oct 8, 2019
d94a127
Add Set Endpoint Samples [(#2497)](https://github.com/GoogleCloudPlat…
nnegrey Nov 15, 2019
ba3e28f
Auto-update dependencies. [(#2005)](https://github.com/GoogleCloudPla…
dpebot Dec 21, 2019
05c86f8
chore(deps): update dependency google-auth to v1.11.2 [(#2724)](https…
leahecole Mar 5, 2020
35d7c27
Update dependency google-cloud-automl to v0.10.0 [(#3033)](https://gi…
renovate-bot Mar 6, 2020
bbc7d56
Remove unused region_tag comment. [(#3075)](https://github.com/Google…
jsimonweb Mar 10, 2020
7981a83
Remove Natural Language samples not included docs. [(#3074)](https://…
jsimonweb Mar 10, 2020
a907125
langauge: fix old automl tests [(#3089)](https://github.com/GoogleClo…
nnegrey Mar 13, 2020
bff0652
chore(deps): update dependency numpy to v1.18.2 [(#3181)](https://git…
renovate-bot Mar 30, 2020
e2e92ec
Simplify noxfile setup. [(#2806)](https://github.com/GoogleCloudPlatf…
kurtisvg Apr 2, 2020
9049df2
Remove Language sample unused region_tag comments [(#3078)](https://g…
jsimonweb Apr 10, 2020
76b7a4d
Update dependency google-auth to v1.14.0 [(#3148)](https://github.com…
renovate-bot Apr 17, 2020
614fc0b
chore(deps): update dependency google-api-python-client to v1.8.0 [(#…
renovate-bot Apr 17, 2020
09019d5
chore(deps): update dependency numpy to v1.18.3 [(#3441)](https://git…
renovate-bot Apr 20, 2020
ae410f2
remove samples/tests that aren't on devsite, incl. localized docs [(#…
Strykrol Apr 24, 2020
9c3411a
Update dependency google-api-python-client to v1.8.2 [(#3452)](https:…
renovate-bot Apr 24, 2020
9e08165
chore(deps): update dependency google-auth to v1.14.1 [(#3464)](https…
renovate-bot Apr 28, 2020
98baf71
chore(deps): update dependency numpy to v1.18.4 [(#3675)](https://git…
renovate-bot May 4, 2020
283cde6
chore(deps): update dependency google-auth to v1.14.2 [(#3724)](https…
renovate-bot May 11, 2020
6d03155
chore(deps): update dependency google-auth to v1.14.3 [(#3728)](https…
renovate-bot May 13, 2020
57909bd
update google-auth to 1.15.0 final part [(#3819)](https://github.com/…
leahecole May 19, 2020
ea986f1
update google-api-python-client to 1.8.3 final part [(#3827)](https:/…
leahecole May 19, 2020
aa65b6d
chore(deps): update dependency google-api-python-client to v1.8.4 [(#…
renovate-bot May 27, 2020
6dd04c9
chore(deps): update dependency google-auth to v1.16.0 [(#3903)](https…
renovate-bot May 28, 2020
05580f6
chore(deps): update dependency google-api-python-client to v1.9.1 [(#…
renovate-bot Jun 2, 2020
9a4f514
Update dependency numpy to v1.18.5 [(#3954)](https://github.com/Googl…
renovate-bot Jun 4, 2020
2a7a88d
final update for google-auth [(#3967)](https://github.com/GoogleCloud…
leahecole Jun 5, 2020
b180e92
Update dependency google-api-python-client to v1.9.2 [(#4038)](https:…
renovate-bot Jun 10, 2020
5b4d82a
Update dependency google-auth to v1.17.0 [(#4058)](https://github.com…
renovate-bot Jun 11, 2020
7fde490
chore(deps): update dependency google-auth to v1.17.1 [(#4073)](https…
renovate-bot Jun 12, 2020
560cfe6
Update dependency google-auth to v1.17.2 [(#4083)](https://github.com…
renovate-bot Jun 12, 2020
e89843c
Update dependency google-api-python-client to v1.9.3 [(#4057)](https:…
renovate-bot Jun 12, 2020
1293c8d
Update dependency google-auth to v1.18.0 [(#4125)](https://github.com…
renovate-bot Jun 19, 2020
4e64857
chore(deps): update dependency google-cloud-automl to v1 [(#4127)](ht…
renovate-bot Jun 19, 2020
a8f7bee
chore(deps): update dependency numpy to v1.19.0 [(#4137)](https://git…
renovate-bot Jun 23, 2020
d23fae6
Update dependency google-auth-httplib2 to v0.0.4 [(#4255)](https://gi…
renovate-bot Jul 9, 2020
69c4077
chore(deps): update dependency pytest to v5.4.3 [(#4279)](https://git…
renovate-bot Jul 12, 2020
ff3886c
chore(deps): update dependency google-auth to v1.19.0 [(#4293)](https…
renovate-bot Jul 13, 2020
eb8667f
Update dependency google-api-python-client to v1.10.0 [(#4302)](https…
renovate-bot Jul 16, 2020
d90ac72
chore(deps): update dependency google-auth to v1.19.1 [(#4304)](https…
renovate-bot Jul 17, 2020
32e51e5
chore(deps): update dependency google-auth to v1.19.2 [(#4321)](https…
renovate-bot Jul 18, 2020
aaf9937
chore(deps): update dependency numpy to v1.19.1 [(#4351)](https://git…
renovate-bot Jul 21, 2020
ccb05ac
Update dependency google-auth to v1.20.0 [(#4387)](https://github.com…
renovate-bot Jul 28, 2020
47c5cbf
Update dependency pytest to v6 [(#4390)](https://github.com/GoogleClo…
renovate-bot Aug 1, 2020
20e80f9
chore(deps): update dependency google-auth to v1.20.1 [(#4452)](https…
renovate-bot Aug 7, 2020
e15fbf7
chore(deps): update dependency google-api-python-client to v1.10.1 [(…
renovate-bot Aug 27, 2020
170b5a3
Update dependency google-auth to v1.21.0 [(#4588)](https://github.com…
renovate-bot Aug 27, 2020
2b42ed8
Update dependency google-api-python-client to v1.11.0 [(#4587)](https…
renovate-bot Aug 28, 2020
2604439
chore(deps): update dependency google-auth to v1.21.1 [(#4634)](https…
renovate-bot Sep 9, 2020
d2a2493
chore(deps): update dependency numpy to v1.19.2 [(#4662)](https://git…
renovate-bot Sep 14, 2020
ceee0ad
chore(deps): update dependency google-auth to v1.21.2 [(#4684)](https…
renovate-bot Sep 18, 2020
0ba09d2
chore: delete automl samples [(#4696)](https://github.com/GoogleCloud…
busunkim96 Sep 18, 2020
3f5507f
chore(deps): update dependency google-api-python-client to v1.12.1 [(…
renovate-bot Sep 22, 2020
8685b77
chore(deps): update dependency google-auth to v1.21.3 [(#4754)](https…
renovate-bot Sep 23, 2020
55b3069
chore(deps): update dependency google-api-python-client to v1.12.2 [(…
renovate-bot Sep 24, 2020
498813c
chore: update templates
hkdevandla Sep 27, 2020
25c46dd
feat: Migrate API to use python micro-generator (#41)
hkdevandla Oct 16, 2020
bd3f41b
chore(deps): update dependency google-auth to v1.22.1 (#45)
renovate-bot Oct 28, 2020
05c4402
fix: adds underscore to "type" to NL API samples (#49)
telpirion Nov 3, 2020
66091a1
chore(deps): update dependency google-api-python-client to v1.12.5 (#44)
renovate-bot Nov 11, 2020
38a7893
chore(deps): update dependency google-cloud-language to v2 (#48)
renovate-bot Nov 11, 2020
f80bd63
chore(deps): update dependency google-auth to v1.23.0 (#52)
renovate-bot Nov 12, 2020
7291c06
chore(deps): update dependency numpy to v1.19.4 (#53)
renovate-bot Nov 13, 2020
e340975
chore(deps): update dependency google-api-python-client to v1.12.8 (#54)
renovate-bot Nov 25, 2020
191191c
chore: update templates (#56)
yoshi-automation Dec 28, 2020
d20843b
chore(deps): update dependency numpy to v1.19.5 (#67)
renovate-bot Jan 13, 2021
bff86e4
chore(deps): update dependency google-auth to v1.24.0 (#65)
renovate-bot Jan 13, 2021
57306c6
chore(deps): update dependency google-auth to v1.25.0 (#73)
renovate-bot Feb 10, 2021
144c629
chore(deps): update dependency google-auth to v1.26.1 (#75)
renovate-bot Feb 11, 2021
796153f
chore(deps): update dependency numpy to v1.20.1 (#74)
renovate-bot Feb 12, 2021
1c0612e
chore(deps): update dependency google-auth to v1.27.0 (#76)
renovate-bot Feb 20, 2021
ee7677e
fix: use correct retry deadlines (#83)
yoshi-automation Apr 1, 2021
17b59f6
build: update .OwlBot.lock with new version of post-processor (#95)
gcf-owl-bot[bot] Apr 16, 2021
69d77ce
chore(deps): update dependency google-auth-httplib2 to v0.1.0 (#80)
renovate-bot May 20, 2021
df9369f
chore(deps): update dependency pytest to v6.2.4 (#97)
renovate-bot May 20, 2021
94c4136
chore(deps): update dependency google-auth to v1.30.0 (#79)
renovate-bot May 20, 2021
dfdb217
chore(deps): update dependency google-api-python-client to v2 (#81)
renovate-bot May 20, 2021
d236c1c
chore: new owl bot post processor docker image (#115)
gcf-owl-bot[bot] May 22, 2021
4e79a6b
chore(deps): update dependency google-auth to v1.30.1 (#117)
renovate-bot May 25, 2021
c414299
chore(deps): update dependency google-api-python-client to v2.6.0 (#118)
renovate-bot May 27, 2021
961d6d0
chore(deps): update dependency google-auth to v1.31.0 (#122)
renovate-bot Jun 11, 2021
b3044a8
chore(deps): update dependency google-api-python-client to v2.8.0 (#120)
renovate-bot Jun 11, 2021
bd356e2
docs: fix typos (#125)
parthea Jun 11, 2021
fb564e7
chore(deps): update dependency google-api-python-client to v2.9.0 (#128)
renovate-bot Jun 16, 2021
940c69b
chore(deps): update dependency google-cloud-language to v2.1.0 (#130)
renovate-bot Jun 20, 2021
8624ffc
chore(deps): update dependency google-api-python-client to v2.10.0 (#…
renovate-bot Jun 26, 2021
cd0bd70
chore(deps): update dependency google-auth to v1.32.0 (#137)
renovate-bot Jun 26, 2021
d8016d9
chore(deps): update dependency google-cloud-language to v2.2.0 (#146)
renovate-bot Jul 2, 2021
8f9714a
chore(deps): update dependency google-api-python-client to v2.11.0 (#…
renovate-bot Jul 3, 2021
e0d80af
chore(deps): update dependency google-api-python-client to v2.12.0 (#…
renovate-bot Jul 7, 2021
45ee821
chore(deps): update dependency google-auth to v1.32.1 (#145)
renovate-bot Jul 12, 2021
ab4601d
chore(deps): update dependency google-auth to v1.33.0 (#159)
renovate-bot Jul 15, 2021
58741c3
chore(deps): update dependency google-api-python-client to v2.13.0 (#…
renovate-bot Jul 16, 2021
4944961
feat: add Samples section to CONTRIBUTING.rst (#161)
gcf-owl-bot[bot] Jul 22, 2021
f1ed1a5
chore(deps): update dependency google-api-python-client to v2.14.1 (#…
renovate-bot Jul 27, 2021
61a1e3a
chore(deps): update dependency google-auth to v1.33.1 (#164)
renovate-bot Jul 27, 2021
cc1eb02
chore(deps): update dependency google-cloud-language to v2.2.1 (#165)
renovate-bot Jul 27, 2021
724ef07
chore(deps): update dependency google-api-python-client to v2.15.0 (#…
renovate-bot Jul 27, 2021
6c343fe
chore(deps): update dependency google-auth to v1.34.0 (#171)
renovate-bot Jul 28, 2021
b908dfb
chore(deps): update dependency google-cloud-language to v2.2.2 (#173)
renovate-bot Jul 28, 2021
067a056
chore: fix INSTALL_LIBRARY_FROM_SOURCE in noxfile.py (#175)
gcf-owl-bot[bot] Aug 11, 2021
5aa1f38
chore: drop mention of Python 2.7 from templates (#177)
gcf-owl-bot[bot] Aug 13, 2021
05d0d2c
chore(deps): update dependency google-auth to v1.35.0 (#178)
renovate-bot Aug 17, 2021
9b861df
chore(deps): update dependency google-auth to v2 (#180)
renovate-bot Aug 25, 2021
84f0d26
chore(deps): update dependency google-api-python-client to v2.18.0 (#…
renovate-bot Aug 25, 2021
067ab33
chore(deps): update dependency pytest to v6.2.5 (#184)
renovate-bot Aug 31, 2021
ff987d3
chore(deps): update dependency google-api-python-client to v2.19.0 (#…
renovate-bot Aug 31, 2021
a1f999c
chore(deps): update dependency google-auth to v2.0.2 (#186)
renovate-bot Sep 1, 2021
5dc0d4f
chore(deps): update dependency google-api-python-client to v2.19.1 (#…
renovate-bot Sep 2, 2021
d6f5d9a
chore: blacken samples noxfile template (#193)
gcf-owl-bot[bot] Sep 17, 2021
32bacdb
chore(deps): update all dependencies (#192)
renovate-bot Sep 21, 2021
7824814
chore(deps): update dependency google-auth to v2.2.0 (#197)
renovate-bot Sep 27, 2021
8e06646
chore(deps): update dependency google-api-python-client to v2.23.0 (#…
renovate-bot Sep 28, 2021
a906117
chore(deps): update dependency google-auth to v2.2.1 (#199)
renovate-bot Sep 29, 2021
7a775c2
chore: fail samples nox session if python version is missing (#200)
gcf-owl-bot[bot] Sep 30, 2021
7213781
chore(deps): update dependency google-api-python-client to v2.24.0 (#…
renovate-bot Oct 5, 2021
1e135ed
chore(python): Add kokoro configs for python 3.10 samples testing (#207)
gcf-owl-bot[bot] Oct 9, 2021
e3f9116
chore(deps): update dependency google-auth to v2.3.0 (#206)
renovate-bot Nov 2, 2021
5626a0f
chore(deps): update all dependencies (#216)
renovate-bot Nov 3, 2021
abf8e46
chore(deps): update dependency google-api-python-client to v2.30.0 (#…
renovate-bot Nov 9, 2021
a952f23
chore(python): run blacken session for all directories with a noxfile…
gcf-owl-bot[bot] Nov 11, 2021
f17eb0d
chore(deps): update dependency google-api-python-client to v2.31.0 (#…
renovate-bot Nov 18, 2021
2675486
chore: updating numpy (#226)
dinagraves Dec 3, 2021
a62a587
chore(deps): update dependency google-api-python-client to v2.32.0 (#…
renovate-bot Dec 3, 2021
524badd
chore(deps): update dependency google-api-python-client to v2.33.0 (#…
renovate-bot Dec 7, 2021
bc921db
fix: Document -> types.Document (#227)
andrewferlitsch Dec 7, 2021
639b58c
chore(deps): update dependency google-api-python-client to v2.34.0 (#…
renovate-bot Jan 8, 2022
393b605
chore(samples): Add check for tests in directory (#240)
gcf-owl-bot[bot] Jan 11, 2022
f1de617
chore(deps): update all dependencies (#238)
renovate-bot Jan 17, 2022
c4000fd
chore(python): Noxfile recognizes that tests can live in a folder (#246)
gcf-owl-bot[bot] Jan 19, 2022
885cbf3
chore(deps): update all dependencies (#247)
renovate-bot Jan 19, 2022
12d144f
chore: use gapic-generator-python 0.62.1 (#260)
gcf-owl-bot[bot] Feb 3, 2022
2a41dc6
chore(deps): update all dependencies (#253)
renovate-bot Feb 26, 2022
036ee3e
chore(deps): update all dependencies (#265)
renovate-bot Feb 28, 2022
895b3fc
chore(deps): update all dependencies (#269)
renovate-bot Mar 1, 2022
bccb3ff
chore: Adding support for pytest-xdist and pytest-parallel (#274)
gcf-owl-bot[bot] Mar 4, 2022
53ef0e2
chore(deps): update all dependencies (#278)
renovate-bot Mar 8, 2022
fb2ba09
chore(python): use black==22.3.0 (#283)
gcf-owl-bot[bot] Mar 28, 2022
90ca214
chore(deps): update all dependencies (#279)
renovate-bot Mar 30, 2022
01117be
chore: use === in requirements.txt for environment specific pins (#284)
renovate-bot Mar 30, 2022
4931fd7
chore(deps): update dependency google-api-python-client to v2.43.0 (#…
renovate-bot Apr 6, 2022
9fdd0e7
chore(deps): update dependency google-auth to v2.6.3 (#296)
renovate-bot Apr 7, 2022
cf7329b
chore(deps): update dependency google-api-python-client to v2.44.0 (#…
renovate-bot Apr 12, 2022
78fd609
chore(deps): update dependency google-auth to v2.6.4 (#300)
renovate-bot Apr 12, 2022
065dc6d
chore(deps): update dependency google-auth to v2.6.5 (#303)
renovate-bot Apr 15, 2022
364b085
chore(deps): update dependency google-api-python-client to v2.45.0 (#…
renovate-bot Apr 19, 2022
1db93cb
chore(python): add nox session to sort python imports (#305)
gcf-owl-bot[bot] Apr 21, 2022
6e76642
chore(deps): update dependency google-auth to v2.6.6 (#308)
renovate-bot Apr 22, 2022
3debf00
chore(deps): update dependency pytest to v7.1.2 (#310)
renovate-bot Apr 25, 2022
8cc85a3
chore(deps): update dependency google-api-python-client to v2.46.0 (#…
renovate-bot Apr 26, 2022
61f74ae
chore(deps): update dependency google-api-python-client to v2.47.0 (#…
renovate-bot May 3, 2022
0a81106
chore(deps): update dependency google-api-python-client to v2.48.0 (#…
renovate-bot May 17, 2022
875de18
chore(deps): update dependency google-cloud-language to v2.4.2 (#319)
renovate-bot May 19, 2022
e1b3fdd
chore(deps): update dependency numpy to v1.22.4 (#320)
renovate-bot May 22, 2022
1749119
chore(deps): update dependency google-api-python-client to v2.49.0 (#…
renovate-bot May 27, 2022
e7a3cf7
fix: require python 3.7+ (#336)
gcf-owl-bot[bot] Jul 7, 2022
210ce3c
chore(deps): update all dependencies (#329)
renovate-bot Jul 7, 2022
fe8d151
chore(deps): update all dependencies (#344)
renovate-bot Aug 2, 2022
40278f4
chore(deps): update all dependencies (#346)
renovate-bot Aug 6, 2022
e2acd1d
chore(deps): update all dependencies (#347)
renovate-bot Aug 9, 2022
da2d2c5
chore(deps): update dependency numpy to v1.23.2 (#352)
renovate-bot Aug 16, 2022
83fdbf6
chore(deps): update all dependencies (#353)
renovate-bot Aug 16, 2022
a89da92
chore(deps): update dependency google-auth to v2.11.0 (#354)
renovate-bot Aug 23, 2022
4eda97f
chore(deps): update dependency google-api-python-client to v2.58.0 (#…
renovate-bot Aug 23, 2022
0efea8c
chore(deps): update dependency pytest to v7.1.3 (#366)
renovate-bot Sep 6, 2022
0de31f6
chore(deps): update dependency google-api-python-client to v2.60.0 (#…
renovate-bot Sep 6, 2022
7cd4d6e
chore(deps): update dependency numpy to v1.23.3 (#370)
renovate-bot Sep 12, 2022
c0c088a
chore: detect samples tests in nested directories (#372)
gcf-owl-bot[bot] Sep 13, 2022
0c5254c
chore(deps): update dependency google-api-python-client to v2.61.0 (#…
renovate-bot Sep 14, 2022
57d64d3
chore(deps): update dependency google-auth to v2.11.1 (#374)
renovate-bot Sep 20, 2022
0205f39
chore(deps): update dependency google-api-python-client to v2.62.0 (#…
renovate-bot Sep 20, 2022
523b1f4
docs: update classification sample to use v2 model (#378)
wizeng23 Sep 27, 2022
7bf432c
chore(deps): update all dependencies (#382)
renovate-bot Oct 3, 2022
c883167
chore(deps): update dependency google-cloud-language to v2.6.0 (#383)
renovate-bot Oct 4, 2022
ce8bf8e
chore(deps): update dependency google-api-python-client to v2.64.0 (#…
renovate-bot Oct 4, 2022
0df3149
chore(deps): update all dependencies (#387)
renovate-bot Oct 18, 2022
422c0f1
chore(deps): update dependency google-api-python-client to v2.65.0 (#…
renovate-bot Oct 19, 2022
3c4810e
chore(deps): update dependency pytest to v7.2.0 (#390)
renovate-bot Oct 26, 2022
c3b44f4
chore(deps): update dependency google-auth to v2.14.0 (#395)
renovate-bot Nov 1, 2022
e3e3819
Merge remote-tracking branch 'migration/main' into python-language-mi…
m-strzelczyk Nov 18, 2022
7a9d480
Removing noxfiles + adding requirements.txt
m-strzelczyk Nov 18, 2022
aa1e878
Adding CODEOWNERS and blunderbuss config
m-strzelczyk Nov 18, 2022
9bdb8d8
Fixing license headers
m-strzelczyk Nov 18, 2022
c71cbf1
Fixing copywrite header
m-strzelczyk Nov 18, 2022
5df4e95
Adjusting header checker for language samples
m-strzelczyk Nov 18, 2022
a2cbc19
Lint fix
m-strzelczyk Nov 18, 2022
21184b7
Merge branch 'main' into python-language-migration
m-strzelczyk Nov 21, 2022
42995b9
Update .github/header-checker-lint.yml
dandhlee Nov 22, 2022
60ab144
Update .github/header-checker-lint.yml
dandhlee Nov 22, 2022
17e1c95
Merge remote-tracking branch 'origin/main' into python-language-migra…
m-strzelczyk Nov 22, 2022
14f760d
Adding copyright headers to YAML files
m-strzelczyk Nov 22, 2022
2317c60
Changing CODEOWNER for language
m-strzelczyk Nov 22, 2022
c5eb6ba
Apply suggestions from code review
dandhlee Nov 22, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
/kms/**/** @GoogleCloudPlatform/dee-infra @GoogleCloudPlatform/python-samples-reviewers
/kubernetes_engine/**/* @GoogleCloudPlatform/python-samples-reviewers
/kubernetes_engine/django_tutorial/**/* @glasnt @GoogleCloudPlatform/python-samples-reviewers
/language/**/* @GoogleCloudPlatform/dee-data-ai @GoogleCloudPlatform/python-samples-reviewers
/media_cdn/**/* @justin-mp @msampathkumar @GoogleCloudPlatform/python-samples-reviewers
/memorystore/**/* @GoogleCloudPlatform/python-samples-reviewers
/ml_engine/**/* @ivanmkc @GoogleCloudPlatform/python-samples-reviewers
Expand Down
4 changes: 4 additions & 0 deletions .github/blunderbuss.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,10 @@ assign_issues_by:
- 'api: cloudiot'
to:
- GoogleCloudPlatform/api-iot
- labels:
- 'api: language'
to:
- GoogleCloudPlatform/dee-data-ai
- labels:
- 'api: ml'
to:
Expand Down
2 changes: 2 additions & 0 deletions .github/header-checker-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ ignoreFiles:
- "**/ghcnd-stations.txt"
- "texttospeech/snippets/resources/example.txt"
- "texttospeech/snippets/resources/hello.txt"
- "language/**/resources/*.txt"
dandhlee marked this conversation as resolved.
Show resolved Hide resolved
- "language/snippets/classify_text/resources/texts/*.txt"

ignoreLicenseYear: true

Expand Down
1 change: 1 addition & 0 deletions language/AUTHORING_GUIDE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
See https://github.com/GoogleCloudPlatform/python-docs-samples/blob/master/AUTHORING_GUIDE.md
dandhlee marked this conversation as resolved.
Show resolved Hide resolved
1 change: 1 addition & 0 deletions language/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
See https://github.com/GoogleCloudPlatform/python-docs-samples/blob/master/CONTRIBUTING.md
dandhlee marked this conversation as resolved.
Show resolved Hide resolved
15 changes: 15 additions & 0 deletions language/snippets/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Google Cloud Natural Language API examples

[![Open in Cloud Shell][shell_img]][shell_link]

[shell_img]: http://gstatic.com/cloudssh/images/open-btn.png
[shell_link]: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=language/README.md

This directory contains Python examples that use the
[Google Cloud Natural Language API](https://cloud.google.com/natural-language/).

- [api](api) has a simple command line tool that shows off the API's features.

- [sentiment](sentiment) contains the [Sentiment Analysis
Tutorial](https://cloud.google.com/natural-language/docs/sentiment-tutorial)
code as used within the documentation.
98 changes: 98 additions & 0 deletions language/snippets/api/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
.. This file is automatically generated. Do not edit this file directly.

Google Cloud Natural Language API Python Samples
===============================================================================

.. image:: https://gstatic.com/cloudssh/images/open-btn.png
:target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=language/api/README.rst


This directory contains samples for Google Cloud Natural Language API. The `Google Cloud Natural Language API`_ provides natural language understanding technologies to developers, including sentiment analysis, entity recognition, and syntax analysis. This API is part of the larger Cloud Machine Learning API.




.. _Google Cloud Natural Language API: https://cloud.google.com/natural-language/docs/





Setup
-------------------------------------------------------------------------------


Authentication
++++++++++++++

This sample requires you to have authentication setup. Refer to the
`Authentication Getting Started Guide`_ for instructions on setting up
credentials for applications.

.. _Authentication Getting Started Guide:
https://cloud.google.com/docs/authentication/getting-started

Install Dependencies
++++++++++++++++++++

#. Clone python-docs-samples and change directory to the sample directory you want to use.

.. code-block:: bash

$ git clone https://github.com/GoogleCloudPlatform/python-docs-samples.git

#. Install `pip`_ and `virtualenv`_ if you do not already have them. You may want to refer to the `Python Development Environment Setup Guide`_ for Google Cloud Platform for instructions.

.. _Python Development Environment Setup Guide:
https://cloud.google.com/python/setup

#. Create a virtualenv. Samples are compatible with Python 2.7 and 3.4+.

.. code-block:: bash

$ virtualenv env
$ source env/bin/activate

#. Install the dependencies needed to run the samples.

.. code-block:: bash

$ pip install -r requirements.txt

.. _pip: https://pip.pypa.io/
.. _virtualenv: https://virtualenv.pypa.io/

Samples
-------------------------------------------------------------------------------

Analyze syntax
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

.. image:: https://gstatic.com/cloudssh/images/open-btn.png
:target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=language/api/analyze.py,language/api/README.rst




To run this sample:

.. code-block:: bash

$ python analyze.py

usage: analyze.py [-h] {entities,sentiment,syntax} text

Analyzes text using the Google Cloud Natural Language API.

positional arguments:
{entities,sentiment,syntax}
text

optional arguments:
-h, --help show this help message and exit





.. _Google Cloud SDK: https://cloud.google.com/sdk/
22 changes: 22 additions & 0 deletions language/snippets/api/README.rst.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# This file is used to generate README.rst

product:
name: Google Cloud Natural Language API
short_name: Cloud Natural Language API
url: https://cloud.google.com/natural-language/docs/
description: >
The `Google Cloud Natural Language API`_ provides natural language
understanding technologies to developers, including sentiment analysis,
entity recognition, and syntax analysis. This API is part of the larger
Cloud Machine Learning API.

setup:
- auth
- install_deps

samples:
- name: Analyze syntax
file: analyze.py
show_help: true

folder: language/api
92 changes: 92 additions & 0 deletions language/snippets/api/analyze.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
#!/usr/bin/env python

# Copyright 2016 Google, Inc
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

"""Analyzes text using the Google Cloud Natural Language API."""

import argparse
import json
import sys

import googleapiclient.discovery


def get_native_encoding_type():
"""Returns the encoding type that matches Python's native strings."""
if sys.maxunicode == 65535:
return "UTF16"
else:
return "UTF32"


def analyze_entities(text, encoding="UTF32"):
body = {
"document": {"type": "PLAIN_TEXT", "content": text},
"encoding_type": encoding,
}

service = googleapiclient.discovery.build("language", "v1")

request = service.documents().analyzeEntities(body=body)
response = request.execute()

return response


def analyze_sentiment(text, encoding="UTF32"):
body = {
"document": {"type": "PLAIN_TEXT", "content": text},
"encoding_type": encoding,
}

service = googleapiclient.discovery.build("language", "v1")

request = service.documents().analyzeSentiment(body=body)
response = request.execute()

return response


def analyze_syntax(text, encoding="UTF32"):
body = {
"document": {"type": "PLAIN_TEXT", "content": text},
"encoding_type": encoding,
}

service = googleapiclient.discovery.build("language", "v1")

request = service.documents().analyzeSyntax(body=body)
response = request.execute()

return response


if __name__ == "__main__":
parser = argparse.ArgumentParser(
description=__doc__, formatter_class=argparse.RawDescriptionHelpFormatter
)
parser.add_argument("command", choices=["entities", "sentiment", "syntax"])
parser.add_argument("text")

args = parser.parse_args()

if args.command == "entities":
result = analyze_entities(args.text, get_native_encoding_type())
elif args.command == "sentiment":
result = analyze_sentiment(args.text, get_native_encoding_type())
elif args.command == "syntax":
result = analyze_syntax(args.text, get_native_encoding_type())

print(json.dumps(result, indent=2))
Loading