Skip to main content

A simple DS type ChRIS application specifically created for the Massachusetts Open Cloud remote computing environment.

Project description

https://badge.fury.io/py/simpledsapp_moc.svg https://travis-ci.org/FNNDSC/simpledsapp_moc.svg?branch=master https://img.shields.io/badge/python-3.5%2B-blue.svg

Abstract

A simple DS type ChRIS application specifically created for the Massachusetts Open Cloud remote computing environment.

Synopsis

python simpledsapp_moc.py                                       \
    [--prefix <filePrefixString>]                               \
    [--sleepLength <sleepLength>]                               \
    [--ignoreInputDir]                                          \
    [-v <level>] [--verbosity <level>]                          \
    [--version]                                                 \
    [--man]                                                     \
    [--meta]                                                    \
    <inputDir>
    <outputDir>

Description

simpledsapp_moc.py is a ChRIS-based application that basically does an explicit copy of each file in an input directory to the output directory, prefixing an optional string to each filename.

Agruments

[--prefix <prefixString>]
If specified, a prefix string to append to each file copied.

[--sleepLength <sleepLength>]
If specified, sleep for <sleepLength> seconds before starting script processing. This is to simulate a possibly long running  process.

[--ignoreInputDir]
If specified, ignore the input directory. Simply write a single json  file to the output dir that is a timestamp. Useful if the input  directory contains large nested file trees.

[-v <level>] [--verbosity <level>]
Verbosity level for app. Not used currently.

[--version]
If specified, print version number.

[--man]
If specified, print (this) man page.

[--meta]
If specified, print plugin meta data.

Run

This plugin can be run in two modes: natively as a python package or as a containerized docker image.

Using PyPI

To run from PyPI, simply do a

pip install simpledsapp_moc

and run with

simpledsapp_moc.py --man /tmp /tmp

to get inline help. The app should also understand being called with only two positional arguments

simpledsapp_moc.py /some/input/directory /destination/directory

Using docker run

To run using docker, be sure to assign an “input” directory to /incoming and an output directory to /outgoing. Make sure that the $(pwd)/out directory is world writable!

Now, prefix all calls with

docker run --rm -v $(pwd)/out:/outgoing                             \
        fnndsc/pl-simpledsapp_moc simpledsapp_moc.py                \

Thus, getting inline help is:

mkdir in out && chmod 777 out
docker run --rm -v $(pwd)/in:/incoming -v $(pwd)/out:/outgoing      \
        fnndsc/pl-simpledsapp_moc simpledsapp_moc.py                \
        --man                                                       \
        /incoming /outgoing

Project details


Release history Release notifications

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for simpledsapp-moc, version 1.0.0
Filename, size File type Python version Upload date Hashes
Filename, size simpledsapp_moc-1.0.0.tar.gz (5.0 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page