Skip to content

Commit

Permalink
Merge pull request #44 from markheger/master
Browse files Browse the repository at this point in the history
0.9.1
  • Loading branch information
markheger committed Feb 10, 2020
2 parents 9083167 + 51aa297 commit 9b69ac9
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 6 deletions.
2 changes: 1 addition & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
# The short X.Y version.
version = '0.9'
# The full version, including alpha/beta/rc tags.
release = '0.9.0'
release = '0.9.1'

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down
4 changes: 2 additions & 2 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
streamsx.standard package
#########################

Overview
========
Standard toolkit integration for IBM Streams
============================================

This package exposes functionality from the IBM Streams SPL
Standard toolkit for Python topologies (``Topology``).
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
packages = ['streamsx.standard'],
include_package_data=True,
version = streamsx.standard._version.__version__,
description = 'IBM Streams standard toolkit',
description = 'Standard toolkit integration for IBM Streams',
long_description = open('DESC.txt').read(),
author = 'IBM Streams @ github.com',
author_email = 'debrunne@us.ibm.com',
Expand Down
2 changes: 1 addition & 1 deletion streamsx/standard/_version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__='0.9.0'
__version__='0.9.1'
14 changes: 14 additions & 0 deletions streamsx/standard/files.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ class DirectoryScan(streamsx.topology.composite.Source):
dir = streamsx.spl.op.Expression.expression('getApplicationDir()+"'+'/etc"')
s = topo.source(files.DirectoryScan(directory=dir))
Example, scanning for files with "csv" file extension::
s = topo.source(files.DirectoryScan(directory='/opt/ibm/streams-ext/input', pattern='.*\.csv$'))
Attributes
----------
directory : str|Expression
Expand Down Expand Up @@ -576,6 +580,8 @@ class CSVReader(streamsx.topology.composite.Source):
.. note:: Reads a single file only
.. seealso:: Use :py:meth:`~streamsx.standard.files.CSVFilesReader` for reading multiple files, each input tuple holds the file name to be read
Example for reading a file from application directory (file is part of application bundle)::
import streamsx.standard.files as files
Expand Down Expand Up @@ -642,6 +648,14 @@ class CSVFilesReader(streamsx.topology.composite.Map):
.. seealso:: Use :py:meth:`~streamsx.standard.files.CSVReader` for single file given as parameter
Example, scanning for files with "csv" file extension and reading them::
import streamsx.standard.files as files
from streamsx.topology.topology import Topology
s = topo.source(files.DirectoryScan(directory='/opt/ibm/streams-ext/input', pattern='.*\.csv$'))
r = s.map(files.CSVFilesReader(), schema=StreamSchema('tuple<rstring a, int32 b>'))
Args:
header: Does the file contain a header.
encoding: Specifies the character set encoding that is used in the output file.
Expand Down
2 changes: 1 addition & 1 deletion streamsx/standard/tests/test_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ def test_dir_scan(self):
topo.add_file_dependency(sample_file, 'etc') # add sample file to etc dir in bundle
fn = os.path.join('etc', 'data.csv') # file name relative to application dir
dir = streamsx.spl.op.Expression.expression('getApplicationDir()+"'+'/etc"')
scanned = topo.source(files.DirectoryScan(directory=dir))
scanned = topo.source(files.DirectoryScan(directory=dir, pattern='.*\.csv$'))
r = scanned.map(files.CSVFilesReader(), schema=StreamSchema('tuple<rstring a, int32 b>'))
r.print()

Expand Down

0 comments on commit 9b69ac9

Please sign in to comment.