Skip to content
This repository has been archived by the owner on Jul 13, 2023. It is now read-only.

feat!: initial generation of beta client #5

Merged
merged 2 commits into from
Nov 6, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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 .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
src/**/doc/*
build/
docs/
protos/
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ If you are still having issues, please be sure to include as much information as
- OS:
- Node.js version:
- npm version:
- `@google-cloud/document` version:
- `@google-cloud/documentai` version:

#### Steps to reproduce

Expand Down
7 changes: 7 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
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](https://github.com/googleapis/nodejs-document-ai/issues/new/choose) 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 #<issue_number_goes_here> 🦕
1 change: 1 addition & 0 deletions .github/release-please.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
releaseType: node
2 changes: 1 addition & 1 deletion .jsdoc.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ module.exports = {
copyright: 'Copyright 2018 Google, LLC.',
includeDate: false,
sourceFiles: false,
systemName: '@google-cloud/document',
systemName: '@google-cloud/documentai',
theme: 'lumen'
},
markdown: {
Expand Down
28 changes: 0 additions & 28 deletions .kokoro/continuous/node10/test.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -7,31 +7,3 @@ before_action {
}
}
}

# tokens used by release-please to keep an up-to-date release PR.
before_action {
fetch_keystore {
keystore_resource {
keystore_config_id: 73713
keyname: "github-magic-proxy-key-release-please"
}
}
}

before_action {
fetch_keystore {
keystore_resource {
keystore_config_id: 73713
keyname: "github-magic-proxy-token-release-please"
}
}
}

before_action {
fetch_keystore {
keystore_resource {
keystore_config_id: 73713
keyname: "github-magic-proxy-url-release-please"
}
}
}
2 changes: 1 addition & 1 deletion .kokoro/publish.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ python3 -m releasetool publish-reporter-script > /tmp/publisher-script; source /

cd $(dirname $0)/..

NPM_TOKEN=$(cat $KOKORO_KEYSTORE_DIR/73713_google-cloud-document-npm-token)
NPM_TOKEN=$(cat $KOKORO_KEYSTORE_DIR/73713_google-cloud-documentai-npm-token)
echo "//wombat-dressing-room.appspot.com/:_authToken=${NPM_TOKEN}" > ~/.npmrc

npm install
Expand Down
2 changes: 1 addition & 1 deletion .kokoro/release/publish.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ before_action {
fetch_keystore {
keystore_resource {
keystore_config_id: 73713
keyname: "google-cloud-document-npm-token"
keyname: "google-cloud-documentai-npm-token"
}
}
}
Expand Down
9 changes: 0 additions & 9 deletions .kokoro/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,3 @@ if npx [email protected] --silent --node $COVERAGE_NODE; then
else
echo "coverage is only reported for Node $COVERAGE_NODE"
fi

# if release-please keys set, we kick off a task to update the release-PR.
if [ -f ${KOKORO_KEYSTORE_DIR}/73713_github-magic-proxy-url-release-please ]; then
npx release-please release-pr --token=${KOKORO_KEYSTORE_DIR}/73713_github-magic-proxy-token-release-please \
--repo-url=googleapis/nodejs-document-ai \
--package-name=@google-cloud/document \
--api-url=${KOKORO_KEYSTORE_DIR}/73713_github-magic-proxy-url-release-please \
--proxy-key=${KOKORO_KEYSTORE_DIR}/73713_github-magic-proxy-key-release-please
fi
1 change: 0 additions & 1 deletion .nycrc
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
"**/docs",
"**/samples",
"**/scripts",
"**/src/**/v*/**/*.js",
"**/protos",
"**/test",
".jsdoc.js",
Expand Down
12 changes: 6 additions & 6 deletions .repo-metadata.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"name": "document",
"name": "documentai",
"name_pretty": "Document AI",
"product_documentation": "https://cloud.google.com/document/docs/",
"client_documentation": "https://googleapis.dev/nodejs/document/latest/index.html",
"product_documentation": "https://cloud.google.com/document-understanding/docs/",
"client_documentation": "https://googleapis.dev/nodejs/documentai/latest/index.html",
"issue_tracker": "",
"release_level": "alpha",
"release_level": "beta",
"language": "nodejs",
"repo": "googleapis/nodejs-document-ai",
"distribution_name": "@google-cloud/document",
"api_id": "document.googleapis.com",
"distribution_name": "@google-cloud/documentai",
"api_id": "documentai.googleapis.com",
"requires_billing": true
}
10 changes: 10 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ accept your pull requests.
1. Ensure that your code adheres to the existing style in the code to which
you are contributing.
1. Ensure that your code has an appropriate set of tests which all pass.
1. Title your pull request following [Conventional Commits](https://www.conventionalcommits.org/) styling.
1. Submit a pull request.

## Running the tests
Expand All @@ -46,8 +47,17 @@ accept your pull requests.

1. Run the tests:

# Run unit tests.
npm test

# Run sample integration tests.
gcloud auth application-default login
npm run samples-test

# Run all system tests.
gcloud auth application-default login
npm run system-test

1. Lint (and maybe fix) any changes:

npm run fix
Expand Down
21 changes: 11 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

# [Document AI: Node.js Client](https://github.com/googleapis/nodejs-document-ai)

[![release level](https://img.shields.io/badge/release%20level-alpha-orange.svg?style=flat)](https://cloud.google.com/terms/launch-stages)
[![npm version](https://img.shields.io/npm/v/@google-cloud/document.svg)](https://www.npmjs.org/package/@google-cloud/document)
[![release level](https://img.shields.io/badge/release%20level-beta-yellow.svg?style=flat)](https://cloud.google.com/terms/launch-stages)
[![npm version](https://img.shields.io/npm/v/@google-cloud/documentai.svg)](https://www.npmjs.org/package/@google-cloud/documentai)
[![codecov](https://img.shields.io/codecov/c/github/googleapis/nodejs-document-ai/master.svg?style=flat)](https://codecov.io/gh/googleapis/nodejs-document-ai)


Expand Down Expand Up @@ -48,7 +48,7 @@ Google APIs Client Libraries, in [Client Libraries Explained][explained].
### Installing the client library

```bash
npm install @google-cloud/document
npm install @google-cloud/documentai
```


Expand All @@ -58,7 +58,7 @@ npm install @google-cloud/document
async function batchProcessDocument() {
const {
DocumentUnderstandingServiceClient,
} = require('@google-cloud/document');
} = require('@google-cloud/documentai');
const client = new DocumentUnderstandingServiceClient();
// TODO: write sample here that demonstrates batch processing of documents.
console.info(client);
Expand Down Expand Up @@ -88,10 +88,11 @@ This library follows [Semantic Versioning](http://semver.org/).



This library is considered to be in **beta**. This means it is expected to be
mostly stable while we work toward a general availability release; however,
complete stability is not guaranteed. We will address issues and requests
against beta libraries with a high priority.

This library is considered to be in **alpha**. This means it is still a
work-in-progress and under active development. Any release is subject to
backwards-incompatible changes at any time.



Expand All @@ -109,10 +110,10 @@ Apache Version 2.0

See [LICENSE](https://github.com/googleapis/nodejs-document-ai/blob/master/LICENSE)

[client-docs]: https://googleapis.dev/nodejs/document/latest/index.html
[product-docs]: https://cloud.google.com/document/docs/
[client-docs]: https://googleapis.dev/nodejs/documentai/latest/index.html
[product-docs]: https://cloud.google.com/document-understanding/docs/
[shell_img]: https://gstatic.com/cloudssh/images/open-btn.png
[projects]: https://console.cloud.google.com/project
[billing]: https://support.google.com/cloud/answer/6293499#enable-billing
[enable_api]: https://console.cloud.google.com/flows/enableapi?apiid=document.googleapis.com
[enable_api]: https://console.cloud.google.com/flows/enableapi?apiid=documentai.googleapis.com
[auth]: https://cloud.google.com/docs/authentication/getting-started
8 changes: 8 additions & 0 deletions linkinator.config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@

{
"recurse": true,
"skip": [
"googleapis.dev.*",
"https://www.npmjs.org/package/.*"
]
}
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@google-cloud/document",
"name": "@google-cloud/documentai",
"repository": "googleapis/nodejs-document-ai",
"version": "1.0.0",
"version": "0.0.1",
"author": "Google LLC",
"description": "Cloud Document API client for Node.js",
"main": "src/index.js",
Expand Down Expand Up @@ -35,21 +35,21 @@
"lint": "eslint .",
"test": "c8 mocha test/*.js",
"predocs-test": "npm run docs",
"docs-test": "linkinator docs -r --skip 'www.npmjs.org/package/@google-cloud/web-risk'",
"docs-test": "linkinator docs",
"samples-test": "cd samples/ && npm link ../ && c8 npm test && cd ../",
"system-test": "c8 mocha --timeout=5000 system-test/*.js"
},
"license": "Apache-2.0",
"devDependencies": {
"c8": "^5.0.1",
"c8": "^6.0.1",
"chai": "^4.2.0",
"eslint": "^6.3.0",
"eslint-config-prettier": "^6.3.0",
"eslint-plugin-node": "^10.0.0",
"eslint-plugin-prettier": "^3.0.1",
"jsdoc": "^3.6.2",
"jsdoc-fresh": "^1.0.1",
"linkinator": "^1.4.0",
"linkinator": "^1.6.3",
"mocha": "^6.1.4",
"null-loader": "^3.0.0",
"prettier": "^1.17.0",
Expand Down
Loading