Skip to content

Commit

Permalink
Updating travis
Browse files Browse the repository at this point in the history
  • Loading branch information
mortonjt committed Jul 6, 2016
1 parent 54c4860 commit a07bdd5
Show file tree
Hide file tree
Showing 5 changed files with 69 additions and 4 deletions.
18 changes: 18 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# this file is based on the examples provided on scikit-learn's .coveragerc

[run]
omit =
*/tests*
*/__init__.py
source = gneiss
branch = True
include = */gneiss/*

[report]
exclude_lines =
pragma: no cover
raise NotImplementedError
if __name__ == .__main__.:
omit =
*/tests*
*/__init__.py
5 changes: 4 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,17 @@ before_install:
# Update conda itself
- conda update --yes conda
# Useful for debugging any issues with conda
- conda info -a
install:
- conda create --yes -n test_env python=$PYVERSION --file ci/conda_requirements.txt -c biocore
- conda install --yes -n test_env cython
- source activate test_env
- pip install -r ci/pip_requirements.txt
- pip install -e .
script:
- make all
- WITH_COVERAGE=TRUE make all
after_success:
- coveralls
notifications:
webhooks:
on_success: change
Expand Down
6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
.DEFAULT_GOAL := help

TEST_COMMAND = nosetests --with-doctest
ifeq ($(WITH_COVERAGE), TRUE)
TEST_COMMAND = COVERAGE_FILE=.coverage coverage run --rcfile .coveragerc setup.py nosetests --with-doctest
else
TEST_COMMAND = nosetests --with-doctest
endif

help:
@echo 'Use "make test" to run all the unit tests and docstring tests.'
Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# gneiss


[[https://coveralls.io/github/biocore/micronota?branch=master][https://coveralls.io/repos/biocore/micronota/badge.svg?branch=master&service=github]]
[[https://travis-ci.org/biocore/micronota][https://travis-ci.org/biocore/micronota.svg?branch=master]]

Canonically pronouced *nice*

A compositional statistics and visualization toolbox
40 changes: 38 additions & 2 deletions gneiss/balances.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,14 @@ def _count_matrix(treenode):


def default_layout(node):
"""
Specifies the layout for the ete.TreeStyle object.
Parameters
----------
node: ete.Tree
Input node for specifying which attributes.
"""
if node.is_leaf():
# Add node name to leaf nodes
N = AttrFace("name", fsize=14, fgcolor="black")
Expand All @@ -157,6 +165,34 @@ def barchart_layout(node, name='name',
fsize=14, fgcolor="black",
alpha=0.5,
rotation=270):
"""
Specifies the layout for the ete.TreeStyle object.
Parameters
----------
node: ete.Tree
Input node for specifying which attributes.
name: str, optional
Attribute to look up the name of the node.
width: int, optional
Width of the barchart.
height: int, optional
Height of the barchart.
colors: list of str, optional
List of HTML colors to color the barchart values.
min_value: int, optional
Minimum value to set the scale of the chart.
max_value: int, optional
Maximum value to set the scale of the chart.
fsize: int, optional
Font size on the leafs.
fgcolor: str, optional
Font color of the leafs.
alpha: float, optional
Transparency of the barchart.
rotation: int, optional
Orientation of the barchart.
"""
if colors is None:
colors = ['#0000FF']
if node.is_leaf():
Expand All @@ -172,7 +208,7 @@ def barchart_layout(node, name='name',
else:
weight = node.weight
C = BarChartFace(values=weight, width=width, height=height,
colors=['#0000FF'], min_value=min_value,
colors=colors, min_value=min_value,
max_value=max_value)
# Let's make the sphere transparent
C.opacity = alpha
Expand Down Expand Up @@ -269,7 +305,7 @@ def balanceplot(balances, tree,
See Also
--------
TreeNode.levelorder
skbio.TreeNode.levelorder
"""
ete_tree = _attach_balances(balances, tree)

Expand Down

0 comments on commit a07bdd5

Please sign in to comment.