7 Commits
cli ... v2.0

Author SHA1 Message Date
f3b60856c2 add tags to readme 2019-01-21 22:44:19 -08:00
96821aa1db Fix travis shield link 2019-01-21 22:39:28 -08:00
c4fe27e883 upgrade pyyaml 2019-01-20 21:33:04 -08:00
7da5a5e4ba Update README.md 2019-01-17 14:20:33 -08:00
05816b006d typo sniper snipes a typo 2019-01-17 13:57:32 -08:00
31e2d0c3e1 banana -> bananas 2019-01-17 13:53:38 -08:00
d013ff2ddd Add command line interface, python package, and tests (#1)
* convert 2018-snakemake-cli to python package (setup.py)

converts the simple example in 2018-snakemake-cli,
which used a shell script sitting in a directory to
run the Snakemake workflow, into a full-fledged
python package that uses a setup.py file.

this is a way of bridging the complexity of taco
with the simplicity of 2018-snakemake-cli.

documentation/readme has not yet been updated.

tests have not yet been udpated.

* update how/where we look for Snakefile

* add Snakefile to manifest

* move config and params to test/

* include Snakefile with Manifest.in to make it run automagically

* update readme instructions

* manifest should include files, not graft them (graft is for directories)

* update gh-pages url in setup.py

* fix tests and fix the way we are looking for param and config files (use os.getcwd())

* clean up after test

* banana -> bananas. update gitignore.

* add .travis.yml

* change newline to trigger travis

* add shields

* python version >= 3.5

* remove unused import

* travis.yml: python 3.7 -> 3.7-dev

* remove 3.7-dev from travis

* change newline to trigger travis
2019-01-17 13:51:40 -08:00
3 changed files with 17 additions and 9 deletions

View File

@@ -3,7 +3,7 @@ language: python
python:
- "3.5"
- "3.6"
- "3.7-dev"
#- "3.7-dev" # fails due to datrie build failure (snakemake dependency)
# command to install dependencies
install:
- pip install -r requirements.txt
@@ -11,3 +11,4 @@ install:
# command to run tests
script:
- pytest

View File

@@ -1,6 +1,6 @@
# 2019-snakemake-cli
[![travis](https://img.shields.io/travis/charlesreid1/2019-snakemake-cli.svg)](https://travis-ci.org/charlesreid1/2019-snakemake-cli.svg)
[![travis](https://img.shields.io/travis/charlesreid1/2019-snakemake-cli.svg)](https://travis-ci.org/charlesreid1/2019-snakemake-cli)
[![license](https://img.shields.io/github/license/charlesreid1/2019-snakemake-cli.svg)](https://github.com/charlesreid1/2019-snakemake-cli/blob/master/LICENSE)
An example of a Snakemake command line interface
@@ -18,7 +18,7 @@ a command line tool called `bananas`.
This runs through the installation and usage
of 2019-snakemake-cli.
## Installing banana
## Installing bananas
Start by setting up a virtual environment,
and install the required packages into the
@@ -37,13 +37,13 @@ python setup.py build install
Now you can run
```
which banana
which bananas
```
and you should see `bananas` in your Python
distribution's `bin/` directory.
and you should see `bananas` in your virtual
environment's `bin/` directory.
## Running banana
## Running bananas
Move to the `test/` directory and run the tests
with the provided config and params files.
@@ -66,7 +66,7 @@ Run the goodbye workflow with Beth params:
```
rm -f goodbye.txt
./run workflow-goodbye params-beth
bananas workflow-goodbye params-beth
```
# Details
@@ -80,3 +80,10 @@ An alternative arrangement would be for users
to provide a Snakefile via rules in the working
directory, or via a Github URL or a remote URL.
# Tags
* `v1.0` - initial version, [ctb/2018-snakemake-cli](https://github.com/ctb/2018-snakemake-cli)
* `v2.0` - Snakemake workflow bundled as installable Python package, Snakefile bundled with
Python package, command line interface provided to wrap Snakemake API call

View File

@@ -8,7 +8,7 @@ gitdb2==2.0.5
GitPython==2.1.11
idna==2.8
jsonschema==2.6.0
PyYAML==3.13
PyYAML>=4.2b1
ratelimiter==1.2.0.post0
requests==2.21.0
smmap2==2.0.5