-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from IBMStreams/develop
0.1
- Loading branch information
Showing
19 changed files
with
1,500 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,81 @@ | ||
# pypi.streamsx.sttgateway | ||
[INCUBATION] This is a step in allowing natural use of Streams for a Python developer. A project that will be registered with PyPi to allow 'pip install' of Python packages that support Python developers interacting with IBM Streams. | ||
# Python streamsx.sttgateway package | ||
|
||
This exposes SPL operators in the `com.ibm.streamsx.sttgateway` toolkit as Python methods. | ||
|
||
Package is organized using standard packaging to upload to PyPi. | ||
|
||
The package is uploaded to PyPi in the standard way: | ||
``` | ||
cd package | ||
python setup.py sdist bdist_wheel upload -r pypi | ||
``` | ||
Note: This is done using the `ibmstreams` account at pypi.org and requires `.pypirc` file containing the credentials in your home directory. | ||
|
||
Package details: https://pypi.python.org/pypi/streamsx.sttgateway | ||
|
||
Documentation is using Sphinx and can be built locally using: | ||
``` | ||
cd package/docs | ||
make html | ||
``` | ||
|
||
or | ||
|
||
ant doc | ||
|
||
and viewed using | ||
``` | ||
firefox package/docs/build/html/index.html | ||
``` | ||
|
||
The documentation is also setup at `readthedocs.io`. | ||
|
||
Documentation links: | ||
* http://streamsxsttgateway.readthedocs.io | ||
|
||
## Version update | ||
|
||
To change the version information of the Python package, edit following files: | ||
|
||
- ./package/docs/source/conf.py | ||
- ./package/streamsx/sttgateway/\_\_init\_\_.py | ||
|
||
When the development status changes, edit the *classifiers* in | ||
|
||
- ./package/setup.py | ||
|
||
When the documented sample must be changed, change it here: | ||
|
||
- ./package/streamsx/sttgateway/\_\_init\_\_.py | ||
- ./package/DESC.txt | ||
|
||
## Environment | ||
|
||
You need the streamsx package in version 1.14.7 to use and test the streamsx.sttgateway package. Install it like this: | ||
|
||
pip install streamsx==1.14.7 | ||
|
||
In addition you should unset the PYTHONPATH variable to not use the streams package included in your local Streams installation: | ||
|
||
unset PYTHONPATH | ||
|
||
## Test | ||
|
||
When using local build (e.g. not forcing remote build), then you need to specifiy the toolkit location, for example: | ||
|
||
export STREAMS_STTGATEWAY_TOOLKIT=<PATH_TO_STTGATEWAY_TOOLKIT>/com.ibm.streamsx.sttgateway | ||
|
||
|
||
### Test | ||
|
||
Run the (build-only) test with: | ||
|
||
ant test | ||
|
||
|
||
``` | ||
cd package | ||
python3 -u -m unittest streamsx.sttgateway.tests.test_sttgateway.Test | ||
``` | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
<project name="PypackageTests" default="test" basedir="." xmlns:if="ant:if"> | ||
|
||
<property name="package" location="package"/> | ||
|
||
<target name="clean"> | ||
<delete> | ||
<fileset dir="${basedir}" includes="**/*.pyc,**/streamsx*.sab,**/streamsx*.json"/> | ||
</delete> | ||
<delete includeemptydirs="true"> | ||
<fileset dir="${basedir}" includes="**/__pycache__/**"/> | ||
</delete> | ||
<delete includeemptydirs="true"> | ||
<fileset dir="${basedir}" includes="**/tk*/**"/> | ||
</delete> | ||
<delete includeemptydirs="true"> | ||
<fileset dir="${package}" includes="**/build/**,dist/**,streamsx.*.egg-info/**"/> | ||
</delete> | ||
<delete> | ||
<fileset dir="${package}" includes="job*.tar.gz"/> | ||
</delete> | ||
<delete> | ||
<fileset dir="${package}" includes="**/toolkit.xml"/> | ||
</delete> | ||
</target> | ||
|
||
<target name="doc"> | ||
<echo message="Generate html doc"/> | ||
<exec executable="make" failonerror="true" dir="${package}/docs"> | ||
<arg value="-f" /> | ||
<arg value="Makefile" /> | ||
<arg value="html" /> | ||
</exec> | ||
</target> | ||
|
||
<target name="test" depends="clean"> | ||
<exec executable="/bin/sh" | ||
outputproperty="toolkit.test.output" errorproperty="toolkit.test.error" resultproperty="toolkit.test.result" | ||
dir="${package}"> | ||
<arg value="-c"/> | ||
<arg value="python3 -u -m unittest streamsx.sttgateway.tests.test_sttgateway.Test"/> | ||
</exec> | ||
<echo message="${toolkit.test.output}" if:set="toolkit.test.output"/> | ||
<echo message="${toolkit.test.error}" if:set="toolkit.test.error"/> | ||
<fail message="The test failed - result ${toolkit.test.result}."> | ||
<condition> | ||
<not> | ||
<equals arg1="${toolkit.test.result}" arg2="0"/> | ||
</not> | ||
</condition> | ||
</fail> | ||
</target> | ||
|
||
</project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
Overview | ||
======== | ||
|
||
Provides functions and classes for use with Streaming Analytics service on | ||
IBM Cloud and IBM Streams including IBM Cloud Pak for Data. | ||
|
||
Transcribes audio into text via the IBM Watson STT (Speech To Text) service running on the IBM Cloud or on the IBM Cloud Pak for Data. | ||
|
||
* `Streaming Analytics service <https://console.ng.bluemix.net/catalog/services/streaming-analytics>`_ | ||
* `IBM Streams developer community <https://developer.ibm.com/streamsdev/>`_ | ||
* `Watson Speech to Text <https://www.ibm.com/cloud/watson-speech-to-text>`_ | ||
|
||
Documentation | ||
============= | ||
|
||
* `streamsx.sttgateway package documentation <http://streamsxsttgateway.readthedocs.io>`_ |
Oops, something went wrong.