Skip to content

Commit

Permalink
Increment dockerfile version pointer, fix minor test failures
Browse files Browse the repository at this point in the history
  • Loading branch information
Aaron Virshup authored and Aaron Virshup committed Sep 28, 2016
1 parent 4fef9e1 commit 6f2ef23
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion moldesign/_tests/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def _make_mol_with_n_hydrogens(n):
return mdt.Molecule([mdt.Atom('H') for i in xrange(n)])


class ZeroEnergy(mdt.models.EnergyModelBase):
class ZeroEnergy(mdt.models.base.EnergyModelBase):
""" All 0, all the time
"""
def prep(self):
Expand Down
2 changes: 1 addition & 1 deletion moldesign/compute/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@
default_python_image=None,
default_docker_host='unix://var/run/docker.sock',
default_docker_machine='default',
default_version_tag='0.7.2')
default_version_tag='0.7.3')

DEF_CONFIG = CONFIG_DEFAULTS.copy()
""" dict: default configuration to be written to moldesign.yml if it doesn't exist
Expand Down
3 changes: 2 additions & 1 deletion moldesign/molecules/bonds.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ class Bond(object):
Notes:
Comparisons and hashes involving bonds will return True if the atoms involved in the bonds
are the same. Bond orders are not compared.
are the same. Bond orders are not compared.
These objects are used to represent and pass bond data only - they are not used for storage.
Attributes:
Expand Down
5 changes: 4 additions & 1 deletion moldesign/units/quantity.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import operator
import copy
from os.path import join, abspath, dirname
import numbers

import numpy as np
from pint import UnitRegistry, set_application_registry, DimensionalityError
Expand Down Expand Up @@ -95,7 +96,9 @@ def __setitem__(self, key, value):
if not hasattr(value, 'value_in'): # deal with missing `value_in` method
if self.dimensionless: # case 1: this is OK if self is dimensionless
self.magnitude[key] = value
else: # case 2: User tried to pass a number without units
elif not isinstance(value, numbers.Number): # case 2: this is not a number
raise TypeError('"%s" is not a valid numeric value' % value)
else: # case 3: wrong units
raise DimensionalityError(self.units, ureg.dimensionless)
else: # case 3: attribute error is unrelated to this
raise
Expand Down

0 comments on commit 6f2ef23

Please sign in to comment.