Table of Contents
A simple ChRIS fs app demo. If called directly, i.e. from the command line, the input directory is an actual specification on an actual filesystem. If called from a client that is talking to CUBE, this input directory is interpreted to mean a location within swift storage, and is not a file system location.
simplefsapp is a simple ChRIS-based application that demonstrates how to run the "File System"
class of plugin in ChRIS. This type, FS, is used to create new top-level data trees that constitute
the root node in a ChRIS Feed.
python simplefsapp.py
[-h] [--help]
[--json]
[--man]
[--meta]
[--savejson <DIR>]
[-v <level>] [--verbosity <level>]
[--version]
<outputDir>
--dir <DIR>
[--sleepLength SECONDS]
[-h] [--help] If specified, show help message and exit. [--json] If specified, show json representation of app and exit. [--man] If specified, print (this) man page and exit. [--meta] If specified, print plugin meta data and exit. [--savejson <DIR>] If specified, save json representation file to DIR and exit. [-v <level>] [--verbosity <level>] Verbosity level for app. Not used currently. [--version] If specified, print version number and exit. <outputDir> Output directory. --dir <DIR> Required, it's a string representing a comma-separated list of one or more directories. [--sleepLength SECONDS] If specified, the plugin sleeps before performing any action.
Getting inline help is:
docker run --rm fnndsc/pl-simplefsapp simplefsapp --manYou need you need to specify input and output directories using the -v flag to docker run.
docker run --rm -u $(id -u) -v $(pwd)/out:/outgoing \
fnndsc/pl-simplefsapp simplefsapp /outgoing --dir <DIR>The above will print the contents of <DIR> to the file out.txt. This file
will be saved to the container's /outgoing which in turn has been volume mapped to the host
$(pwd)/out directory. In addition, the /outgoing diretory will contain zero-length files
with name corresponding to each file in <DIR>.
Build the Docker container:
docker build -t local/pl-simplefsapp .Run unit tests:
docker run --rm local/pl-simplefsapp nosetestsdocker run --rm -v $(pwd)/out:/outgoing fnndsc/pl-simplefsapp \
simplefsapp /outgoing --dir './,/tmp'