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

Fix .md files to pass scanCode.py and comply with policy #271

Merged
merged 2 commits into from May 1, 2018
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
23 changes: 12 additions & 11 deletions CONTRIBUTING.md
@@ -1,22 +1,23 @@
[![License](https://img.shields.io/badge/license-Apache--2.0-blue.svg)](http://www.apache.org/licenses/LICENSE-2.0)
<!--
#
# Licensed to the Apache Software Foundation (ASF) under one or more contributor
# license agreements. See the NOTICE file distributed with this work for additional
# Licensed to the Apache Software Foundation (ASF) under one or more contributor
# license agreements. See the NOTICE file distributed with this work for additional
# information regarding copyright ownership. The ASF licenses this file to you
# 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
# 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
# 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.
#
-->

[![License](https://img.shields.io/badge/license-Apache--2.0-blue.svg)](http://www.apache.org/licenses/LICENSE-2.0)

# Contributing to Apache OpenWhisk

Anyone can contribute to the OpenWhisk project and we welcome your contributions.
Expand All @@ -36,18 +37,18 @@ Instructions on how to do this can be found here:
[http://www.apache.org/licenses/#clas](http://www.apache.org/licenses/#clas)

Once submitted, you will receive a confirmation email from the Apache Software Foundation (ASF) and be added to
the following list: http://people.apache.org/unlistedclas.html.
the following list: http://people.apache.org/unlistedclas.html.

Project committers will use this list to verify pull requests (PRs) come from contributors that have signed a CLA.

We look forward to your contributions!
We look forward to your contributions!

## Raising issues

Please raise any bug reports on the respective project repository's GitHub issue tracker. Be sure to search the
Please raise any bug reports on the respective project repository's GitHub issue tracker. Be sure to search the
list to see if your issue has already been raised.

A good bug report is one that make it easy for us to understand what you were trying to do and what went wrong.
A good bug report is one that make it easy for us to understand what you were trying to do and what went wrong.
Provide as much context as possible so we can try to recreate the issue.

### Discussion
Expand Down
22 changes: 11 additions & 11 deletions README.md
@@ -1,16 +1,16 @@
<!--
#
# Licensed to the Apache Software Foundation (ASF) under one or more contributor
# license agreements. See the NOTICE file distributed with this work for additional
# Licensed to the Apache Software Foundation (ASF) under one or more contributor
# license agreements. See the NOTICE file distributed with this work for additional
# information regarding copyright ownership. The ASF licenses this file to you
# 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
# 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
# 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.
#
Expand All @@ -23,10 +23,10 @@

This openwhisk-catalog maintains the package catalogs of openwhisk. In OpenWhisk, the catalog
of packages gives you an easy way to enhance your app with useful capabilities, and to access
external services in the ecosystem. Examples of external services that are OpenWhisk-enabled
include IBM Watson API, the Weather Company, Slack, and GitHub.system packages and sample packages.
external services in the ecosystem. Examples of external services that are OpenWhisk-enabled
include IBM Watson API, the Weather Company, Slack, and GitHub.system packages and sample packages.

The catalog is available as packages in the `/whisk.system` namespace. See [Browsing packages](https://github.com/openwhisk/openwhisk/blob/master/docs/packages.md#browsing-packages)
The catalog is available as packages in the `/whisk.system` namespace. See [Browsing packages](https://github.com/openwhisk/openwhisk/blob/master/docs/packages.md#browsing-packages)
for information about how to browse the catalog by using the command line tool.

## How to install openWhisk-catalog
Expand All @@ -35,6 +35,7 @@ for information about how to browse the catalog by using the command line tool.
- [openwhisk](https://github.com/openwhisk/openwhisk/blob/master/README.md) is installed.
- Environment variable `OPENWHISK_HOME` is configured as the path to `openwhisk` source code directory.


### Install openwhisk-catalog

We should be able to run the script installCatalog.sh to install the catalog like:
Expand All @@ -60,7 +61,7 @@ in the format of IP or hostname.
| [/whisk.system/websocket](./packages/websocket/README.md) | Package to send messages to Web Socket server|

<!--
TODO: place holder until we have a README for samples
TODO: place holder until we have a README for samples
| [/whisk.system/samples](./packages/samples/README.md) | offers sample actions in different programming languages |
-->
<!--
Expand All @@ -74,4 +75,3 @@ If you want to create your own packages, [openwhisk-package-template](https://g
is a good package creation template to help you build, test and integrate new packages.

For more details about how to use these packages, you can go to the README.md under each package folder.

25 changes: 12 additions & 13 deletions packages/github/README.md
@@ -1,16 +1,16 @@
<!--
#
# Licensed to the Apache Software Foundation (ASF) under one or more contributor
# license agreements. See the NOTICE file distributed with this work for additional
# Licensed to the Apache Software Foundation (ASF) under one or more contributor
# license agreements. See the NOTICE file distributed with this work for additional
# information regarding copyright ownership. The ASF licenses this file to you
# 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
# 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
# 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.
#
Expand Down Expand Up @@ -41,25 +41,24 @@ The `/whisk.system/github/webhook` feed configures a service to fire a trigger w
The following is an example of creating a trigger that will be fired each time that there is a new commit to a GitHub repository.

1. Generate a GitHub [personal access token](https://github.com/settings/tokens).

The access token will be used in the next step.

2. Create a package binding that is configured for your GitHub repository and with your access token.

```
wsk package bind /whisk.system/github myGit \
--param username myGitUser \
--param repository myGitRepo \
--param accessToken aaaaa1111a1a1a1a1a111111aaaaaa1111aa1a1a
```

3. Create a trigger for the GitHub `push` event type by using your `myGit/webhook` feed.

```
wsk trigger create myGitTrigger --feed myGit/webhook --param events push
```

A commit to the GitHub repository by using a `git push` causes the trigger to be fired by the webhook. If there is a rule that matches the trigger, then the associated action will be invoked.
The action receives the GitHub webhook payload as an input parameter. Each GitHub webhook event has a similar JSON schema, but is a unique payload object that is determined by its event type.
For more information about the payload content, see the [GitHub events and payload](https://developer.github.com/v3/activity/events/types/) API documentation.

25 changes: 13 additions & 12 deletions packages/slack/README.md
@@ -1,16 +1,16 @@
<!--
#
# Licensed to the Apache Software Foundation (ASF) under one or more contributor
# license agreements. See the NOTICE file distributed with this work for additional
# Licensed to the Apache Software Foundation (ASF) under one or more contributor
# license agreements. See the NOTICE file distributed with this work for additional
# information regarding copyright ownership. The ASF licenses this file to you
# 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
# 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
# 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.
#
Expand All @@ -29,6 +29,7 @@ The package includes the following actions:

Creating a package binding with the `username`, `url`, and `channel` values is suggested. With binding, you don't need to specify the values each time that you invoke the action in the package.


## Posting a message to a Slack channel

The `/whisk.system/slack/post` action posts a message to a specified Slack channel. The parameters are as follows:
Expand All @@ -42,25 +43,25 @@ The `/whisk.system/slack/post` action posts a message to a specified Slack chann
The following is an example of configuring Slack, creating a package binding, and posting a message to a channel.

1. Configure a Slack [incoming webhook](https://api.slack.com/incoming-webhooks) for your team.

After Slack is configured, you get a webhook URL that looks like `https://hooks.slack.com/services/aaaaaaaaa/bbbbbbbbb/cccccccccccccccccccccccc`. You'll need this in the next step.

2. Create a package binding with your Slack credentials, the channel that you want to post to, and the user name to post as.

```
wsk package bind /whisk.system/slack mySlack \
--param url "https://hooks.slack.com/services/..." \
--param username "Bob" \
--param channel "#MySlackChannel"
```

3. Invoke the `post` action in your package binding to post a message to your Slack channel.

```
wsk action invoke mySlack/post --blocking --result \
--param text "Hello from OpenWhisk!"
```


## Using the Slack token-based API

Expand Down
29 changes: 14 additions & 15 deletions packages/watson-speechToText/README.md
@@ -1,16 +1,16 @@
<!--
#
# Licensed to the Apache Software Foundation (ASF) under one or more contributor
# license agreements. See the NOTICE file distributed with this work for additional
# Licensed to the Apache Software Foundation (ASF) under one or more contributor
# license agreements. See the NOTICE file distributed with this work for additional
# information regarding copyright ownership. The ASF licenses this file to you
# 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
# 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
# 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.
#
Expand All @@ -34,11 +34,11 @@ The package includes the following actions.
If you're using OpenWhisk from Bluemix, OpenWhisk automatically creates package bindings for your Bluemix Watson service instances.

1. Create a Watson Speech to Text service instance in your Bluemix [dashboard](http://console.ng.Bluemix.net).

Be sure to remember the name of the service instance and the Bluemix organization and space you're in.

2. Refresh the packages in your namespace. The refresh automatically creates a package binding for the Watson service instance that you created.

```
wsk package refresh
```
Expand All @@ -53,18 +53,18 @@ If you're using OpenWhisk from Bluemix, OpenWhisk automatically creates package
packages
/myBluemixOrg_myBluemixSpace/Bluemix_Watson_SpeechToText_Credentials-1 private
```


## Setting up a Watson Speech to Text package outside Bluemix

If you're not using OpenWhisk in Bluemix or if you want to set up your Watson Speech to Text outside of Bluemix, you must manually create a package binding for your Watson Speech to Text service. You need the Watson Speech to Text service user name, and password.

- Create a package binding that is configured for your Watson Speech to Text service.

```
wsk package bind /whisk.system/watson-speechToText myWatsonSpeechToText -p username MYUSERNAME -p password MYPASSWORD
```


## Converting speech to text

Expand All @@ -87,10 +87,10 @@ The `/whisk.system/watson-speechToText/speechToText` action converts audio speec
- `word_alternatives_threshold`: A confidence value that is the lower bound for identifying a hypothesis as a possible word alternative.
- `word_confidence`: Indicates whether a confidence measure in the range of 0 to 1 is to be returned for each word.
- `X-Watson-Learning-Opt-Out`: Indicates whether to opt out of data collection for the call.


- Invoke the `speechToText` action in your package binding to convert the encoded audio.

```
wsk action invoke myWatsonSpeechToText/speechToText --blocking --result --param payload <base64 encoding of a .wav file> --param content_type 'audio/wav' --param encoding 'base64'
```
Expand All @@ -99,4 +99,3 @@ The `/whisk.system/watson-speechToText/speechToText` action converts audio speec
"data": "Hello Watson"
}
```

29 changes: 14 additions & 15 deletions packages/watson-textToSpeech/README.md
@@ -1,16 +1,16 @@
<!--
#
# Licensed to the Apache Software Foundation (ASF) under one or more contributor
# license agreements. See the NOTICE file distributed with this work for additional
# Licensed to the Apache Software Foundation (ASF) under one or more contributor
# license agreements. See the NOTICE file distributed with this work for additional
# information regarding copyright ownership. The ASF licenses this file to you
# 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
# 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
# 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.
#
Expand All @@ -34,11 +34,11 @@ The package includes the following actions.
If you're using OpenWhisk from Bluemix, OpenWhisk automatically creates package bindings for your Bluemix Watson service instances.

1. Create a Watson Text to Speech service instance in your Bluemix [dashboard](http://console.ng.Bluemix.net).

Be sure to remember the name of the service instance and the Bluemix organization and space you're in.

2. Refresh the packages in your namespace. The refresh automatically creates a package binding for the Watson service instance that you created.

```
wsk package refresh
```
Expand All @@ -53,18 +53,18 @@ If you're using OpenWhisk from Bluemix, OpenWhisk automatically creates package
packages
/myBluemixOrg_myBluemixSpace/Bluemix_Watson_TextToSpeec_Credentials-1 private
```


## Setting up a Watson Text to Speech package outside Bluemix

If you're not using OpenWhisk in Bluemix or if you want to set up your Watson Text to Speech outside of Bluemix, you must manually create a package binding for your Watson Text to Speech service. You need the Watson Text to Speech service user name, and password.

- Create a package binding that is configured for your Watson Speech to Text service.

```
wsk package bind /whisk.system/watson-textToSpeech myWatsonTextToSpeech -p username MYUSERNAME -p password MYPASSWORD
```


## Converting some text to speech

Expand All @@ -79,7 +79,7 @@ The `/whisk.system/watson-textToSpeech/textToSpeech` action converts some text i


- Invoke the `textToSpeech` action in your package binding to convert the text.

```
wsk action invoke myWatsonTextToSpeech/textToSpeech --blocking --result --param payload 'Hey.' --param voice 'en-US_MichaelVoice' --param accept 'audio/wav' --param encoding 'base64'
```
Expand All @@ -88,4 +88,3 @@ The `/whisk.system/watson-textToSpeech/textToSpeech` action converts some text i
"payload": "<base64 encoding of a .wav file>"
}
```