Skip to content

Commit

Permalink
Merge pull request #32 from KrishnaswamyLab/dev
Browse files Browse the repository at this point in the history
graphtools v1.0.0
  • Loading branch information
scottgigante authored Feb 6, 2019
2 parents 352e8ff + dfd8321 commit 29b6f90
Show file tree
Hide file tree
Showing 11 changed files with 220 additions and 307 deletions.
17 changes: 15 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
language: python
python:
- "2.7"
- "3.5"
- "3.6"
- "3.7-dev"

sudo: required

cache: pip
cache:
- pip
- apt

addons:
apt:
Expand All @@ -18,5 +20,16 @@
- python setup.py test
- cd doc; make html; cd ..

deploy:
provider: pypi
user: scottgigante
password: ${PYPI_PASSWORD}
distributions: sdist bdist_wheel
skip_existing: true
skip_cleanup: true
on:
tags: true
branch: master

after_success:
- coveralls
28 changes: 28 additions & 0 deletions graphtools/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,9 @@ def _get_param_names(cls):
return parameters

def set_params(self, **kwargs):
# for k in kwargs:
# raise TypeError("set_params() got an unexpected "
# "keyword argument '{}'".format(k))
return self


Expand Down Expand Up @@ -866,3 +869,28 @@ def interpolate(self, transform, transitions=None, Y=None):
transitions = self.extend_to_data(Y)
Y_transform = transitions.dot(transform)
return Y_transform

def set_params(self, **params):
"""Set parameters on this object
Safe setter method - attributes should not be modified directly as some
changes are not valid.
Valid parameters:
- n_jobs
- verbose
Parameters
----------
params : key-value pairs of parameter name and new values
Returns
-------
self
"""
if 'n_jobs' in params:
self.n_jobs = params['n_jobs']
if 'verbose' in params:
self.verbose = params['verbose']
tasklogger.set_level(self.verbose)
super().set_params(**params)
return self
Loading

0 comments on commit 29b6f90

Please sign in to comment.