Skip to main content

copy from (openstorage) to output directory

Project description

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

Abstract

pacscopy is a simple plugin that copies data from open storage to create a new top level ChRIS Feed. It’s core utility is in demonstrating how to create a largely trivial FS plugin/app for the ChRIS system.

Synopsis

python pacscopy.py                                              \
    [-v <level>] [--verbosity <level>]                          \
    [-d <dir>] [--dir <dir>]                                    \
    [--version]                                                 \
    [--man]                                                     \
    [--meta]                                                    \
    <outputDir>

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 pacscopy

and run with

pacscopy.py --man /tmp /tmp

to get inline help. To copy from one directory to another, simply do

pacscopy.py --dir /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-pacscopy pacscopy.py                              \

Thus, getting inline help is:

docker run --rm -v $(pwd)/in:/incoming -v $(pwd)/out:/outgoing      \
        fnndsc/pl-pacscopy pacscopy.py                              \
        --man                                                       \
        /outgoing

Examples

Copy a directory dataset/MPRAGE to the output directory. If called from ChRIS, the input directory spec refers to a location in openstorage, otherwise it is interpreted as a system directory spec.

mkdir out
docker run --rm -v $(pwd)/in:/incoming -v $(pwd)/out:/outgoing      \
        fnndsc/pl-pacscopy pacscopy.py                              \
        --dir dataset/MPRAGE                                        \
        /outgoing

Project details


Download files

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

Files for pacscopy, version 1.0.4
Filename, size File type Python version Upload date Hashes
Filename, size pacscopy-1.0.4.tar.gz (3.6 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