Skip to content

Commit

Permalink
Cleanup App Engine samples and re-work tests. (#354)
Browse files Browse the repository at this point in the history
  • Loading branch information
jmdobry authored and Ace Nassri committed Apr 24, 2017
1 parent 188cfa3 commit 1236091
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 9 deletions.
35 changes: 31 additions & 4 deletions packages/google-cloud-videointelligence/samples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,22 +11,34 @@ detection, and shot change detection.
## Table of Contents

* [Setup](#setup)
* [Running](#running)
* [Samples](#samples)
* [Analyze](#analyze)
* [Running the tests](#running-the-tests)

## Setup

1. Read [Prerequisites][prereq] and [How to run a sample][run] first.
1. Install dependencies:
1. Read [Prerequisites][prereq] and [How to run a sample][run] first.
1. Install dependencies:

With `npm`:

npm install

With `yarn`:

yarn install

[prereq]: ../README.md#prerequisities
[run]: ../README.md#how-to-run-a-sample

## Running
## Samples

### Analyze

View the [documentation][analyze_docs] or the [source code][analyze_code].

__Usage:__ `node analyze.js --help`

```
Commands:
faces <gcsUri> Analyzes faces in a video using the Cloud Video Intelligence API.
Expand All @@ -46,3 +58,18 @@ For more information, see https://cloud.google.com/video-intelligence/docs

[analyze_docs]: https://cloud.google.com/video-intelligence/docs
[analyze_code]: analyze.js

## Running the tests

1. Set the `GCLOUD_PROJECT` and `GOOGLE_APPLICATION_CREDENTIALS` environment
variables.

1. Run the tests:

With `npm`:

npm test

With `yarn`:

yarn test
25 changes: 20 additions & 5 deletions packages/google-cloud-videointelligence/samples/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,31 @@
"name": "nodejs-docs-samples-videointelligence",
"version": "0.0.1",
"private": true,
"license": "Apache Version 2.0",
"license": "Apache-2.0",
"author": "Google Inc.",
"repository": {
"type": "git",
"url": "https://github.com/GoogleCloudPlatform/nodejs-docs-samples.git"
},
"cloud": {
"requiresKeyFile": true,
"requiresProjectId": true
},
"engines": {
"node": ">=4.3.2"
},
"scripts": {
"test": "cd ..; npm run st -- --verbose video/system-test/*.test.js"
"lint": "samples lint",
"pretest": "npm run lint",
"system-test": "ava -T 10m --verbose system-test/*.test.js",
"test": "npm run system-test"
},
"dependencies": {
"@google-cloud/videointelligence": "https://storage.googleapis.com/videointelligence-alpha/videointelligence-nodejs.tar.gz",
"yargs": "7.0.2"
"yargs": "7.1.0"
},
"engines": {
"node": ">=4.3.2"
"devDependencies": {
"@google-cloud/nodejs-repo-tools": "1.3.1",
"ava": "0.19.1"
}
}

0 comments on commit 1236091

Please sign in to comment.