Skip to content

Commit

Permalink
Merge pull request #2 from stephenhky/py3test
Browse files Browse the repository at this point in the history
Py3test
  • Loading branch information
stephenhky authored Jun 14, 2018
2 parents 31cf9c1 + cd9af80 commit 335e326
Show file tree
Hide file tree
Showing 7 changed files with 27 additions and 18 deletions.
24 changes: 10 additions & 14 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,17 @@
sudo: true
dist: trusty
sudo: required
language: python
python:
- "2.7"
before_install:
- wget 'http://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh' -O miniconda.sh
- chmod +x miniconda.sh
- ./miniconda.sh -b
- export PATH=/home/travis/miniconda2/bin:$PATH
- conda update --yes conda
- sudo apt-get update
- "3.5"
- "3.5-dev" # 3.5 development branch
- "3.6"
- "3.6-dev" # 3.6 development branch
# - "3.7-dev" # 3.7 development branch # failing at 3.7-dev
# command to install dependencies
install:
- sudo apt-get install libc6
- sudo apt-get install gfortran
install:
- conda create --yes -n graphflow-test python=$TRAVIS_PYTHON_VERSION pip numpy scipy
- source activate graphflow-test
- pip install -U pandas
- pip install -U .
# command to run tests
script:
- python setup.py test
- pytest # or py.test for Python versions 3.5 and below
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# graphflow : Algorithms for Graph Flow Analysis

[![Build Status](https://travis-ci.org/stephenhky/GraphFlow.svg?branch=master)](https://travis-ci.org/stephenhky/GraphFlow)

This Python package provides numerical routines for graph flow analysis, particularly:

* PageRank
Expand All @@ -17,5 +19,6 @@ After ensuring they have been installed, type the following to install `graphflo

# News

* 06/14/2018: `graphflow` 0.1.3 released.
* 06/06/2018: `graphflow` 0.1.2 released.
* 04/12/2018: `graphflow` 0.1.1 released.
2 changes: 1 addition & 1 deletion doc/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
# The short X.Y version.
version = u'0.1'
# The full version, including alpha/beta/rc tags.
release = u'0.1.2'
release = u'0.1.3'

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down
3 changes: 3 additions & 0 deletions doc/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
Welcome to GraphFlow's documentation!
=====================================

.. image:: https://travis-ci.org/stephenhky/GraphFlow.svg?branch=master
:target: https://travis-ci.org/stephenhky/GraphFlow

Contents:

.. toctree::
Expand Down
7 changes: 7 additions & 0 deletions doc/source/news.rst
Original file line number Diff line number Diff line change
@@ -1,12 +1,19 @@
News
====

* 06/14/2018: `graphflow` 0.1.3 released.
* 06/06/2018: `graphflow` 0.1.2 released.
* 04/12/2018: `graphflow` 0.1.1 released.

What's New
----------

Release 0.1.3 (Jun 14, 2018)
----------------------------

* Compatibility with Python 3.5 and 3.6.


Release 0.1.2 (Jun 06, 2018)
----------------------------

Expand Down
4 changes: 2 additions & 2 deletions graphflow/simvoltage/resistancedist.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ def __init__(self, nodes=default_nodes, edges=default_edges):
self.Omega = self.computeResistanceDistance()

def getResistance(self, node1, node2):
if self.nodesIdx.has_key(node1) and self.nodesIdx.has_key(node2):
if (node1 in self.nodesIdx) and (node2 in self.nodesIdx):
idx0 = self.nodesIdx[node1]
idx1 = self.nodesIdx[node2]
return self.Omega[idx0, idx1]
else:
unknown_keys = [node for node in [node1, node2] if not self.nodesIdx.has_key(node)]
unknown_keys = [node for node in [node1, node2] if not node in self.nodesIdx]
raise Exception('Unknown key(s): '+' '.join(unknown_keys))

def initializeClass(self, nodes, edges):
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ def readme():


setup(name='graphflow',
version="0.1.2",
version="0.1.3",
description="Algorithms for Graph Flow Analysis",
long_description="Numerical routines for analyzing data represented by graphs",
classifiers=[
Expand Down

0 comments on commit 335e326

Please sign in to comment.