Skip to content

Commit

Permalink
Update the 'refactor/subparsers' branch from #245. (#722)
Browse files Browse the repository at this point in the history
  • Loading branch information
ctb authored and luizirber committed Aug 24, 2019
1 parent c265796 commit 185c3d3
Show file tree
Hide file tree
Showing 567 changed files with 15,847 additions and 62,110 deletions.
12 changes: 10 additions & 2 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
[run]
include=sourmash,sourmash_lib/*.py
omit=setup.py,tests/test__minhash.py,tests/test_sourmash.py,tests/sourmash_tst_utils.py,third-party/smhasher/MurmurHash3.cc
include=
sourmash/*.py
sourmash_lib/*.py
omit =
doc/conf.py
setup.py
tests/*
third-party/smhasher/MurmurHash3.cc
.tox/*
benchmarks/*
1 change: 1 addition & 0 deletions .git_archival.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ref-names: $Format:%D$
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.git_archival.txt export-subst
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,8 @@ _minhash.so
.coverage
sourmash_lib/_minhash.cpp
sourmash/_minhash.cpp
.asv/
.eggs/
.pytest_cache
.python-version
sourmash/version.py
5 changes: 0 additions & 5 deletions .pyup.yml

This file was deleted.

119 changes: 77 additions & 42 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,48 +1,83 @@
language: python
services:
- redis-server
- docker
os: linux
dist: xenial

cache:
directories:
- $HOME/.cache/pip

branches:
only:
- master
- "/^v.*$/"
matrix:
fast_finish: true

script: tox

install: pip install tox-travis

jobs:
allow_failures:
- name: integration (ipfs/redis)
include:
- os: linux
python: '2.7'
sudo: required
dist: xenial
env:
- TOX_ENV=py27
- os: linux
python: '3.5'
sudo: required
dist: xenial
env:
- TOX_ENV=py35
- os: linux
python: '3.6'
sudo: required
dist: xenial
env:
- TOX_ENV=py36
install:
- pip install tox
- sudo snap install ipfs
script:
- "/snap/bin/ipfs daemon --init --offline &"
- tox -e $TOX_ENV
before_deploy:
- git clean -xfd
- docker run --rm -v `pwd`:/io quay.io/pypa/manylinux1_x86_64 $PRE_CMD /io/.travis/build-wheels.sh
$TOX_ENV
deploy:
provider: releases
api_key:
secure: CTO7kiWKLper/nJU093pp796P6MhV2IPz4M2Ws0//YOqU2gKZalyGmAdJtqsFk0+eZthnOp0GQzuSJYpN0+jOx3IU+SInnMg7HdLooyfLxgjDri9xOMBtTiCzSbY77NnLKNk4Nj8idb3Gfjp0F+/5TIRlpInTZ7iYGoG1ZYM/kCyBiTkzDd8tO1LBKhWBad3h3bv099OcmoYT7GETuS9LMmUYJLOe/aotOfOhSttNxYIIIY2RmjFQjWBZCAWPx9P8PnTdhDmrMQL9kRBz+z9/E+ikaaMgtx9QTsF75mZn1qix0+a0LwvRaXKCzYCZ7KGUaSs/npIrBbtXxxA7wK4GFTGb2ERpJOzp4MGzwLiToQlNOHZ48F2N3RgQVL0v+rfvGjt14csWRA21jfrvP2yk4G8lrHZsVxdBeMyPw8/4EnFm307zZbd8LY21byz2K9450mzExLGTx+0AWKQGyygT6PPOXYsNqxC5XEMNZDKTknaGQ1RjiZwRnZAq9quk4KNNmfbgRnuEVKcK0SXeudq3wRwbyA5jT/cYaScfBAdhAgge6tto9aEss+mUEEhm1ZmCxSAfTRKJgE3+ug4npTSSb0KLdGWW4V+ygQ2t+kA9G+1j7U01CGG3jY7aPc/mnJF7Sb2XP0+PNS9eLZpXa6rlJ/1ieMSqppuvvgQgHmKHVs=
file_glob: true
file: dist/sourmash*.whl
skip_cleanup: true
on:
tags: true
- &check
stage: check # do a pre-screen to make sure this is even worth testing
python: 3.7

- &test
stage: test
python: 2.7
- <<: *test
os: osx
language: generic
env:
- TOXENV=py36
- <<: *test
python: 3.7
name: integration (ipfs/redis)
before_install:
- sudo snap install ipfs
- "/snap/bin/ipfs --version"
- "/snap/bin/ipfs daemon --init --offline &>/dev/null &"
services:
- redis-server
- docker
- <<: *test
python: 3.6
- <<: *test
python: 3.5

- &wheel
stage: build wheel and send to github releases
python: 3.7
services:
- docker
env:
- PIP=pip
- CIBW_SKIP='*-manylinux1_i686'
install: skip
script:
- sudo $PIP install cibuildwheel==0.10.2
- cibuildwheel --output-dir wheelhouse
deploy:
provider: releases
api_key:
secure: "FZmx00gL0m0uNVN8fpvqbUZSI20EEk4sgrEv4wpGFr8SFNwPb/VuizQRTapeF2AW9qzbfbUv4bR/+oSKu5jxvd+7+p9HlOZT285a5yfxay9OA8YUbpQz4a9J0CETOpxrA2wRRWBDqzjEWzLTGUquOhyBZn4cwujvA9syOdB7OSNKsB6ARc+zhqPeoMKc9JcjzwiEIh7tcCHoZ1epN5zyfsjqFEY8XlylHTU/WSI3SS9KIGuBqWf6/haoYD7BH+f2g56GMHvBEmGjk5cf/lrCpqiho7Z3fGgJcYf3fRWM3qSVUM9JyHUIqPS6oPZIp7zP40TztiK4Oeen4EpcS/KdoSdu5CjfgMYgF/qdlL28ntgnVYhcA/6IDSRg6V4H3b20qjsn3NlaNVdsSNCu3GzkvM/dtvp5I/41XcFCNqMOljMr3tRw2ZVo44/1vYW0FB0b0FjhjNcnMyTOQjSRR78zetdoorewTJdEmxthMieHIw1Mqzwg4e6JvsC30sh1uSaFq4FHrj2Fe6lAlgwPs1e9vx4w0Zs0kxxusNAdbBB8FH8paFuUEGjgT0Jo9KHOLtvRy+OU2OacQePuhG1kGBRvJz7O4/prAFLGWIW8tyZDnMCuv1vmk6YZd6ih3omkL178X94pjzavtlUip/ugF0NIwS5o+zucRow9txAX2jXgDCM="
file_glob: true
file: wheelhouse/sourmash*.whl
skip_cleanup: true
on:
tags: true
- <<: *wheel
os: osx
osx_image: xcode10.1
language: generic
before_script:
- sudo $PIP install -U pip setuptools
env:
- PIP=pip2
- CIBW_ENVIRONMENT_MACOS='MACOSX_DEPLOYMENT_TARGET=10.11'

stages:
- check
- test
- wheel
20 changes: 0 additions & 20 deletions .travis/build-wheels.sh

This file was deleted.

4 changes: 4 additions & 0 deletions .travis/install_cargo.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#! /bin/sh
curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain stable
export PATH="$HOME/.cargo/bin:$PATH"
rustc -V
13 changes: 13 additions & 0 deletions CITATION.cff
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
cff-version: 1.0.3
message: If you use this software, please cite it as below.
title: sourmash: a library for MinHash sketching of DNA
version: 2.0.0
doi: 10.21105/joss.00027
date-released: 2019-01-10
authors:
- family-names: Brown
given-names: C. Titus
orcid: https://orcid.org/0000-0001-6001-2677
- family-names: Irber Junior
given-names: Luiz Carlos
orcid: https://orcid.org/0000-0003-4371-9659
75 changes: 75 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
[package]
name = "sourmash"
version = "0.3.0"
authors = ["Luiz Irber <[email protected]>"]
description = "MinHash sketches for genomic data"
repository = "https://github.com/luizirber/sourmash-rust"
keywords = ["minhash", "bioinformatics"]
categories = ["science", "algorithms", "data-structures"]
license = "BSD-3-Clause"
edition = "2018"

[lib]
name = "sourmash"
crate-type = ["cdylib", "rlib"]
bench = false

[profile.release]
lto=true

[features]
from-finch = ["finch", "needletail"]

[workspace]

#[build-dependencies]
#cbindgen = "~0.6.7"

[dependencies]
byteorder = "^1.2"
cfg-if = "0.1"
clap = { version = "~2.32", features = ["yaml"] }
env_logger = "0.6.0"
exitfailure = "0.5.1"
failure = "0.1.3"
failure_derive = "0.1.3"
finch = { version = "~0.1.6", optional = true }
fixedbitset = "^0.1.9"
human-panic = "1.0.1"
lazy_static = "1.0.0"
lazy-init = "0.3.0"
log = "0.4.0"
md5 = "0.6.0"
murmurhash3 = "~0.0.5"
needletail = { version = "~0.2.1", optional = true }
serde = "1.0"
serde_derive = "~1.0.58"
serde_json = "1.0.2"
ukhs = "0.3.4"
bio = { git = "https://github.com/luizirber/rust-bio", branch = "feature/fastx_reader" }
primal = "0.2.3"
pdatastructs = "0.5.0"
itertools = "0.8.0"
typed-builder = "0.3.0"
csv = "1.0.7"

[target.'cfg(target_arch = "wasm32")'.dependencies.wasm-bindgen]
version = "^0.2"
features = ["serde-serialize"]

[target.'cfg(not(target_arch = "wasm32"))'.dependencies.ocf]
version = "0.1"
path = "ocf"
default-features = false
features = ["bz2"]

[dev-dependencies]
proptest = "^0.8"
criterion = "^0.2"
rand = "^0.5"
tempfile = "3"
assert_matches = "1.2"

[[bench]]
name = "index"
harness = false
22 changes: 0 additions & 22 deletions Dockerfile

This file was deleted.

1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ global-exclude *.so
graft tests
global-exclude *.orig
global-exclude *.pyc
prune tests/test-data/
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ dist: FORCE
$(PYTHON) setup.py sdist

test: all
pip install '.[test]'
pip install -e '.[test]'
$(PYTHON) -m pytest

doc: .PHONY
Expand All @@ -35,4 +35,7 @@ wheel:
docker pull $${DOCKER_IMAGE} ; \
docker run --rm -v `pwd`:/io $${DOCKER_IMAGE} /io/travis/build-wheels.sh

last-tag:
git fetch -p -q; git tag -l | sort -V | tail -1

FORCE:
32 changes: 20 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# sourmash

[![Documentation](https://readthedocs.org/projects/sourmash/badge/?version=latest)](http://sourmash.readthedocs.io/en/latest/)
[![Build Status](https://travis-ci.org/dib-lab/sourmash.svg?branch=master)](https://travis-ci.org/dib-lab/sourmash)
[![Build Status](https://travis-ci.com/dib-lab/sourmash.svg?branch=master)](https://travis-ci.com/dib-lab/sourmash)
[![codecov](https://codecov.io/gh/dib-lab/sourmash/branch/master/graph/badge.svg)](https://codecov.io/gh/dib-lab/sourmash)
[![DOI](http://joss.theoj.org/papers/10.21105/joss.00027/status.svg)](http://joss.theoj.org/papers/10.21105/joss.00027)

Expand All @@ -13,11 +13,7 @@ Usage:
sourmash compare *.sig -o distances
sourmash plot distances

We have demo notebooks on binder that you can interact with:

[![Binder](http://mybinder.org/badge.svg)](http://mybinder.org/repo/dib-lab/sourmash)

Sourmash is [published on JOSS](http://dx.doi.org/10.21105/joss.00027).
Sourmash 1.0 is [published on JOSS](https://doi.org/10.21105/joss.00027); please cite that paper if you use sourmash (`doi: 10.21105/joss.00027`):.

----

Expand All @@ -26,18 +22,30 @@ combined with @ctb's love of whiskey.
([Sour mash](https://en.wikipedia.org/wiki/Sour_mash) is used in
making whiskey.)

Authors: [C. Titus Brown](mailto:[email protected]) ([@ctb](http://github.com/ctb)) and [Luiz C. Irber, Jr](mailto:[email protected]) ([@luizirber](http://github.com/luizirber)).
Primary authors: [C. Titus Brown](mailto:[email protected]) ([@ctb](http://github.com/ctb)) and [Luiz C. Irber, Jr](mailto:[email protected]) ([@luizirber](http://github.com/luizirber)).

sourmash is a product of the
[Lab for Data-Intensive Biology](http://ivory.idyll.org/lab/) at the
[UC Davis School of Veterinary Medicine](http://www.vetmed.ucdavis.edu).

## Installation

We currently recommend installing the 2.0 pre-release series.
You can use pip to do that like so:
We recommend using bioconda to install sourmash:

```
conda install sourmash
```
This will install the latest stable version of sourmash 2.

You can also use pip to install sourmash:

```
pip install sourmash
```

A quickstart tutorial [is available](https://sourmash.readthedocs.io/en/latest/tutorials.html).

pip install --pre sourmash
### Requirements

sourmash runs under both Python 2.7.x and Python 3.5+. The base
requirements are screed and ijson, together with a C++ development
Expand All @@ -55,7 +63,7 @@ For `search` and `gather` you also need `khmer` version 2.1+.
Bioconda is a channel for the [conda](http://conda.pydata.org/docs/intro.html) package manager with a focus on bioinformatics software. After installing conda you will need to add the bioconda channel as well as the [other channels](https://bioconda.github.io/index.html#set-up-channels) bioconda depends on. Once you have setup bioconda, you can install sourmash by running:

```bash
$ conda create -n sourmash_env sourmash python=3.6.4
$ conda create -n sourmash_env -c conda-forge -c bioconda sourmash python=3.7
$ source activate sourmash_env
$ sourmash compute -h
```
Expand Down Expand Up @@ -85,4 +93,4 @@ Please see [the developer notes](doc/developer.md) for more information.
----

CTB
June 2018
Dec 2018
Loading

0 comments on commit 185c3d3

Please sign in to comment.