Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

better insty tests #1944

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
Open

Conversation

jamesmkrieger
Copy link
Contributor

Now each InSty calculation is run in its own test rather than having them all in the setup function and only some of them are saved and loaded

Copy link
Contributor

@karolamik13 karolamik13 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is what I've got when running test on proteins only:

nosetests prody.tests.proteins

...............S...EEEEEEEE.....................................EEEE....

ERROR: Test for all types of interactions.

Traceback (most recent call last):
File "/home/karolamik/test_ProDy/ProDy_2.5_beforeRelease/ProDy/prody/tests/proteins/test_insty.py", line 34, in setUp
self.data_all = self.INTERACTIONS_ALL.calcProteinInteractionsTrajectory(self.ATOMS)
File "/home/karolamik/test_ProDy/ProDy_2.5_beforeRelease/ProDy/prody/proteins/interactions.py", line 3529, in calcProteinInteractionsTrajectory
hydrogen_bonds = calcHydrogenBonds(atoms.protein, **kwargs)
File "/home/karolamik/test_ProDy/ProDy_2.5_beforeRelease/ProDy/prody/proteins/interactions.py", line 434, in calcHydrogenBonds
contacts = findNeighbors(atoms.heavy, distA)
File "/home/karolamik/test_ProDy/ProDy_2.5_beforeRelease/ProDy/prody/measure/contacts.py", line 306, in findNeighbors
return list(iterNeighbors(atoms, radius, atoms2, unitcell, seqsep))
File "/home/karolamik/test_ProDy/ProDy_2.5_beforeRelease/ProDy/prody/measure/contacts.py", line 217, in iterNeighbors
for (i, j), r in zip(*kdtree(radius)):
File "/home/karolamik/test_ProDy/ProDy_2.5_beforeRelease/ProDy/prody/kdtree/kdtree.py", line 179, in call
return self.getIndices(), self.getDistances()
File "/home/karolamik/test_ProDy/ProDy_2.5_beforeRelease/ProDy/prody/kdtree/kdtree.py", line 259, in getIndices
if self.getCount():
File "/home/karolamik/test_ProDy/ProDy_2.5_beforeRelease/ProDy/prody/kdtree/kdtree.py", line 291, in getCount
return self._kdtree.neighbor_get_count()
AttributeError: 'C KDTree' object has no attribute 'neighbor_get_count'
-------------------- >> begin captured logging << --------------------
.prody: DEBUG: 1231 atoms and 15 coordinate set(s) were parsed in 0.04s.
.prody: INFO: Model: 0
--------------------- >> end captured logging << ---------------------

======================================================================
ERROR: Test for disulfide bonds interactions.

Traceback (most recent call last):
File "/home/karolamik/test_ProDy/ProDy_2.5_beforeRelease/ProDy/prody/tests/proteins/test_insty.py", line 34, in setUp
self.data_all = self.INTERACTIONS_ALL.calcProteinInteractionsTrajectory(self.ATOMS)
File "/home/karolamik/test_ProDy/ProDy_2.5_beforeRelease/ProDy/prody/proteins/interactions.py", line 3529, in calcProteinInteractionsTrajectory
hydrogen_bonds = calcHydrogenBonds(atoms.protein, **kwargs)
File "/home/karolamik/test_ProDy/ProDy_2.5_beforeRelease/ProDy/prody/proteins/interactions.py", line 434, in calcHydrogenBonds
contacts = findNeighbors(atoms.heavy, distA)
File "/home/karolamik/test_ProDy/ProDy_2.5_beforeRelease/ProDy/prody/measure/contacts.py", line 306, in findNeighbors
return list(iterNeighbors(atoms, radius, atoms2, unitcell, seqsep))
File "/home/karolamik/test_ProDy/ProDy_2.5_beforeRelease/ProDy/prody/measure/contacts.py", line 217, in iterNeighbors
for (i, j), r in zip(*kdtree(radius)):
File "/home/karolamik/test_ProDy/ProDy_2.5_beforeRelease/ProDy/prody/kdtree/kdtree.py", line 179, in call
return self.getIndices(), self.getDistances()
File "/home/karolamik/test_ProDy/ProDy_2.5_beforeRelease/ProDy/prody/kdtree/kdtree.py", line 259, in getIndices
if self.getCount():
File "/home/karolamik/test_ProDy/ProDy_2.5_beforeRelease/ProDy/prody/kdtree/kdtree.py", line 291, in getCount
return self._kdtree.neighbor_get_count()
AttributeError: 'C KDTree' object has no attribute 'neighbor_get_count'
-------------------- >> begin captured logging << --------------------
.prody: DEBUG: 1231 atoms and 15 coordinate set(s) were parsed in 0.04s.
.prody: INFO: Model: 0
--------------------- >> end captured logging << ---------------------

======================================================================
ERROR: Test for hydrogen bonds.

Traceback (most recent call last):
File "/home/karolamik/test_ProDy/ProDy_2.5_beforeRelease/ProDy/prody/tests/proteins/test_insty.py", line 34, in setUp
self.data_all = self.INTERACTIONS_ALL.calcProteinInteractionsTrajectory(self.ATOMS)
File "/home/karolamik/test_ProDy/ProDy_2.5_beforeRelease/ProDy/prody/proteins/interactions.py", line 3529, in calcProteinInteractionsTrajectory
hydrogen_bonds = calcHydrogenBonds(atoms.protein, **kwargs)
File "/home/karolamik/test_ProDy/ProDy_2.5_beforeRelease/ProDy/prody/proteins/interactions.py", line 434, in calcHydrogenBonds
contacts = findNeighbors(atoms.heavy, distA)
File "/home/karolamik/test_ProDy/ProDy_2.5_beforeRelease/ProDy/prody/measure/contacts.py", line 306, in findNeighbors
return list(iterNeighbors(atoms, radius, atoms2, unitcell, seqsep))
File "/home/karolamik/test_ProDy/ProDy_2.5_beforeRelease/ProDy/prody/measure/contacts.py", line 217, in iterNeighbors
for (i, j), r in zip(*kdtree(radius)):
File "/home/karolamik/test_ProDy/ProDy_2.5_beforeRelease/ProDy/prody/kdtree/kdtree.py", line 179, in call
return self.getIndices(), self.getDistances()
File "/home/karolamik/test_ProDy/ProDy_2.5_beforeRelease/ProDy/prody/kdtree/kdtree.py", line 259, in getIndices
if self.getCount():
File "/home/karolamik/test_ProDy/ProDy_2.5_beforeRelease/ProDy/prody/kdtree/kdtree.py", line 291, in getCount
return self._kdtree.neighbor_get_count()
AttributeError: 'C KDTree' object has no attribute 'neighbor_get_count'
-------------------- >> begin captured logging << --------------------
.prody: DEBUG: 1231 atoms and 15 coordinate set(s) were parsed in 0.04s.
.prody: INFO: Model: 0
--------------------- >> end captured logging << ---------------------

======================================================================
ERROR: Test for hydrophobic interactions.

Traceback (most recent call last):
File "/home/karolamik/test_ProDy/ProDy_2.5_beforeRelease/ProDy/prody/tests/proteins/test_insty.py", line 34, in setUp
self.data_all = self.INTERACTIONS_ALL.calcProteinInteractionsTrajectory(self.ATOMS)
File "/home/karolamik/test_ProDy/ProDy_2.5_beforeRelease/ProDy/prody/proteins/interactions.py", line 3529, in calcProteinInteractionsTrajectory
hydrogen_bonds = calcHydrogenBonds(atoms.protein, **kwargs)
File "/home/karolamik/test_ProDy/ProDy_2.5_beforeRelease/ProDy/prody/proteins/interactions.py", line 434, in calcHydrogenBonds
contacts = findNeighbors(atoms.heavy, distA)
File "/home/karolamik/test_ProDy/ProDy_2.5_beforeRelease/ProDy/prody/measure/contacts.py", line 306, in findNeighbors
return list(iterNeighbors(atoms, radius, atoms2, unitcell, seqsep))
File "/home/karolamik/test_ProDy/ProDy_2.5_beforeRelease/ProDy/prody/measure/contacts.py", line 217, in iterNeighbors
for (i, j), r in zip(*kdtree(radius)):
File "/home/karolamik/test_ProDy/ProDy_2.5_beforeRelease/ProDy/prody/kdtree/kdtree.py", line 179, in call
return self.getIndices(), self.getDistances()
File "/home/karolamik/test_ProDy/ProDy_2.5_beforeRelease/ProDy/prody/kdtree/kdtree.py", line 259, in getIndices
if self.getCount():
File "/home/karolamik/test_ProDy/ProDy_2.5_beforeRelease/ProDy/prody/kdtree/kdtree.py", line 291, in getCount
return self._kdtree.neighbor_get_count()
AttributeError: 'C KDTree' object has no attribute 'neighbor_get_count'
-------------------- >> begin captured logging << --------------------
.prody: DEBUG: 1231 atoms and 15 coordinate set(s) were parsed in 0.04s.
.prody: INFO: Model: 0
--------------------- >> end captured logging << ---------------------

======================================================================
ERROR: Test for pi-stacking interactions.

Traceback (most recent call last):
File "/home/karolamik/test_ProDy/ProDy_2.5_beforeRelease/ProDy/prody/tests/proteins/test_insty.py", line 34, in setUp
self.data_all = self.INTERACTIONS_ALL.calcProteinInteractionsTrajectory(self.ATOMS)
File "/home/karolamik/test_ProDy/ProDy_2.5_beforeRelease/ProDy/prody/proteins/interactions.py", line 3529, in calcProteinInteractionsTrajectory
hydrogen_bonds = calcHydrogenBonds(atoms.protein, **kwargs)
File "/home/karolamik/test_ProDy/ProDy_2.5_beforeRelease/ProDy/prody/proteins/interactions.py", line 434, in calcHydrogenBonds
contacts = findNeighbors(atoms.heavy, distA)
File "/home/karolamik/test_ProDy/ProDy_2.5_beforeRelease/ProDy/prody/measure/contacts.py", line 306, in findNeighbors
return list(iterNeighbors(atoms, radius, atoms2, unitcell, seqsep))
File "/home/karolamik/test_ProDy/ProDy_2.5_beforeRelease/ProDy/prody/measure/contacts.py", line 217, in iterNeighbors
for (i, j), r in zip(*kdtree(radius)):
File "/home/karolamik/test_ProDy/ProDy_2.5_beforeRelease/ProDy/prody/kdtree/kdtree.py", line 179, in call
return self.getIndices(), self.getDistances()
File "/home/karolamik/test_ProDy/ProDy_2.5_beforeRelease/ProDy/prody/kdtree/kdtree.py", line 259, in getIndices
if self.getCount():
File "/home/karolamik/test_ProDy/ProDy_2.5_beforeRelease/ProDy/prody/kdtree/kdtree.py", line 291, in getCount
return self._kdtree.neighbor_get_count()
AttributeError: 'C KDTree' object has no attribute 'neighbor_get_count'
-------------------- >> begin captured logging << --------------------
.prody: DEBUG: 1231 atoms and 15 coordinate set(s) were parsed in 0.04s.
.prody: INFO: Model: 0
--------------------- >> end captured logging << ---------------------

======================================================================
ERROR: Test for pi-stacking interactions.

Traceback (most recent call last):
File "/home/karolamik/test_ProDy/ProDy_2.5_beforeRelease/ProDy/prody/tests/proteins/test_insty.py", line 34, in setUp
self.data_all = self.INTERACTIONS_ALL.calcProteinInteractionsTrajectory(self.ATOMS)
File "/home/karolamik/test_ProDy/ProDy_2.5_beforeRelease/ProDy/prody/proteins/interactions.py", line 3529, in calcProteinInteractionsTrajectory
hydrogen_bonds = calcHydrogenBonds(atoms.protein, **kwargs)
File "/home/karolamik/test_ProDy/ProDy_2.5_beforeRelease/ProDy/prody/proteins/interactions.py", line 434, in calcHydrogenBonds
contacts = findNeighbors(atoms.heavy, distA)
File "/home/karolamik/test_ProDy/ProDy_2.5_beforeRelease/ProDy/prody/measure/contacts.py", line 306, in findNeighbors
return list(iterNeighbors(atoms, radius, atoms2, unitcell, seqsep))
File "/home/karolamik/test_ProDy/ProDy_2.5_beforeRelease/ProDy/prody/measure/contacts.py", line 217, in iterNeighbors
for (i, j), r in zip(*kdtree(radius)):
File "/home/karolamik/test_ProDy/ProDy_2.5_beforeRelease/ProDy/prody/kdtree/kdtree.py", line 179, in call
return self.getIndices(), self.getDistances()
File "/home/karolamik/test_ProDy/ProDy_2.5_beforeRelease/ProDy/prody/kdtree/kdtree.py", line 259, in getIndices
if self.getCount():
File "/home/karolamik/test_ProDy/ProDy_2.5_beforeRelease/ProDy/prody/kdtree/kdtree.py", line 291, in getCount
return self._kdtree.neighbor_get_count()
AttributeError: 'C KDTree' object has no attribute 'neighbor_get_count'
-------------------- >> begin captured logging << --------------------
.prody: DEBUG: 1231 atoms and 15 coordinate set(s) were parsed in 0.05s.
.prody: INFO: Model: 0
--------------------- >> end captured logging << ---------------------

======================================================================
ERROR: Test for repulsive ionic bonding.

Traceback (most recent call last):
File "/home/karolamik/test_ProDy/ProDy_2.5_beforeRelease/ProDy/prody/tests/proteins/test_insty.py", line 34, in setUp
self.data_all = self.INTERACTIONS_ALL.calcProteinInteractionsTrajectory(self.ATOMS)
File "/home/karolamik/test_ProDy/ProDy_2.5_beforeRelease/ProDy/prody/proteins/interactions.py", line 3529, in calcProteinInteractionsTrajectory
hydrogen_bonds = calcHydrogenBonds(atoms.protein, **kwargs)
File "/home/karolamik/test_ProDy/ProDy_2.5_beforeRelease/ProDy/prody/proteins/interactions.py", line 434, in calcHydrogenBonds
contacts = findNeighbors(atoms.heavy, distA)
File "/home/karolamik/test_ProDy/ProDy_2.5_beforeRelease/ProDy/prody/measure/contacts.py", line 306, in findNeighbors
return list(iterNeighbors(atoms, radius, atoms2, unitcell, seqsep))
File "/home/karolamik/test_ProDy/ProDy_2.5_beforeRelease/ProDy/prody/measure/contacts.py", line 217, in iterNeighbors
for (i, j), r in zip(*kdtree(radius)):
File "/home/karolamik/test_ProDy/ProDy_2.5_beforeRelease/ProDy/prody/kdtree/kdtree.py", line 179, in call
return self.getIndices(), self.getDistances()
File "/home/karolamik/test_ProDy/ProDy_2.5_beforeRelease/ProDy/prody/kdtree/kdtree.py", line 259, in getIndices
if self.getCount():
File "/home/karolamik/test_ProDy/ProDy_2.5_beforeRelease/ProDy/prody/kdtree/kdtree.py", line 291, in getCount
return self._kdtree.neighbor_get_count()
AttributeError: 'C KDTree' object has no attribute 'neighbor_get_count'
-------------------- >> begin captured logging << --------------------
.prody: DEBUG: 1231 atoms and 15 coordinate set(s) were parsed in 0.05s.
.prody: INFO: Model: 0
--------------------- >> end captured logging << ---------------------

======================================================================
ERROR: Test for salt bridges.

Traceback (most recent call last):
File "/home/karolamik/test_ProDy/ProDy_2.5_beforeRelease/ProDy/prody/tests/proteins/test_insty.py", line 34, in setUp
self.data_all = self.INTERACTIONS_ALL.calcProteinInteractionsTrajectory(self.ATOMS)
File "/home/karolamik/test_ProDy/ProDy_2.5_beforeRelease/ProDy/prody/proteins/interactions.py", line 3529, in calcProteinInteractionsTrajectory
hydrogen_bonds = calcHydrogenBonds(atoms.protein, **kwargs)
File "/home/karolamik/test_ProDy/ProDy_2.5_beforeRelease/ProDy/prody/proteins/interactions.py", line 434, in calcHydrogenBonds
contacts = findNeighbors(atoms.heavy, distA)
File "/home/karolamik/test_ProDy/ProDy_2.5_beforeRelease/ProDy/prody/measure/contacts.py", line 306, in findNeighbors
return list(iterNeighbors(atoms, radius, atoms2, unitcell, seqsep))
File "/home/karolamik/test_ProDy/ProDy_2.5_beforeRelease/ProDy/prody/measure/contacts.py", line 217, in iterNeighbors
for (i, j), r in zip(*kdtree(radius)):
File "/home/karolamik/test_ProDy/ProDy_2.5_beforeRelease/ProDy/prody/kdtree/kdtree.py", line 179, in call
return self.getIndices(), self.getDistances()
File "/home/karolamik/test_ProDy/ProDy_2.5_beforeRelease/ProDy/prody/kdtree/kdtree.py", line 259, in getIndices
if self.getCount():
File "/home/karolamik/test_ProDy/ProDy_2.5_beforeRelease/ProDy/prody/kdtree/kdtree.py", line 291, in getCount
return self._kdtree.neighbor_get_count()
AttributeError: 'C KDTree' object has no attribute 'neighbor_get_count'
-------------------- >> begin captured logging << --------------------
.prody: DEBUG: 1231 atoms and 15 coordinate set(s) were parsed in 0.04s.
.prody: INFO: Model: 0
--------------------- >> end captured logging << ---------------------

======================================================================
ERROR: testSaveWaterBridges (prody.tests.proteins.test_waterbridges.TestWaterBridges)

Traceback (most recent call last):
File "/home/karolamik/test_ProDy/ProDy_2.5_beforeRelease/ProDy/prody/tests/proteins/test_waterbridges.py", line 30, in setUp
self.waterBridgesChain = calcWaterBridges(self.atoms)
File "/home/karolamik/test_ProDy/ProDy_2.5_beforeRelease/ProDy/prody/proteins/waterbridges.py", line 419, in calcWaterBridges
tooFarAtoms = atoms.select(
File "/home/karolamik/test_ProDy/ProDy_2.5_beforeRelease/ProDy/prody/atomic/atomic.py", line 234, in select
return SELECT.select(self, selstr, **kwargs)
File "/home/karolamik/test_ProDy/ProDy_2.5_beforeRelease/ProDy/prody/atomic/select.py", line 895, in select
indices = self.getIndices(atoms, selstr, **kwargs)
File "/home/karolamik/test_ProDy/ProDy_2.5_beforeRelease/ProDy/prody/atomic/select.py", line 953, in getIndices
torf = self.getBoolArray(atoms, selstr, **kwargs)
File "/home/karolamik/test_ProDy/ProDy_2.5_beforeRelease/ProDy/prody/atomic/select.py", line 1005, in getBoolArray
tokens = parser(selstr, parseAll=True)
File "/home/karolamik/test_ProDy/ProDy_2.5_beforeRelease/ProDy/prody/atomic/select.py", line 1110, in _noParser
return [self._default(selstr, 0, selstr.split())]
File "/home/karolamik/test_ProDy/ProDy_2.5_beforeRelease/ProDy/prody/atomic/select.py", line 1128, in _default
torf, err = self._and2(sel, loc, tokens)
File "/home/karolamik/test_ProDy/ProDy_2.5_beforeRelease/ProDy/prody/atomic/select.py", line 1495, in _and2
arr, err = self._unary(sel, loc, unary.pop(0))
File "/home/karolamik/test_ProDy/ProDy_2.5_beforeRelease/ProDy/prody/atomic/select.py", line 1560, in _unary
which, err = self._and2(sel, loc, which)
File "/home/karolamik/test_ProDy/ProDy_2.5_beforeRelease/ProDy/prody/atomic/select.py", line 1489, in _and2
torf, err = self._unary(sel, loc, unary.pop(0))
File "/home/karolamik/test_ProDy/ProDy_2.5_beforeRelease/ProDy/prody/atomic/select.py", line 1571, in _unary
return self._within(sel, loc, tokens)
File "/home/karolamik/test_ProDy/ProDy_2.5_beforeRelease/ProDy/prody/atomic/select.py", line 1671, in _within
search(within, xyz)
File "/home/karolamik/test_ProDy/ProDy_2.5_beforeRelease/ProDy/prody/kdtree/kdtree.py", line 205, in search
self._kdtree.search_center_radius(center, radius)
AttributeError: 'C KDTree' object has no attribute 'search_center_radius'
-------------------- >> begin captured logging << --------------------
.prody: DEBUG: 7641 atoms and 1 coordinate set(s) were parsed in 0.07s.
--------------------- >> end captured logging << ---------------------

======================================================================
ERROR: testSingleWaterBridgesChain (prody.tests.proteins.test_waterbridges.TestWaterBridges)

Traceback (most recent call last):
File "/home/karolamik/test_ProDy/ProDy_2.5_beforeRelease/ProDy/prody/tests/proteins/test_waterbridges.py", line 30, in setUp
self.waterBridgesChain = calcWaterBridges(self.atoms)
File "/home/karolamik/test_ProDy/ProDy_2.5_beforeRelease/ProDy/prody/proteins/waterbridges.py", line 419, in calcWaterBridges
tooFarAtoms = atoms.select(
File "/home/karolamik/test_ProDy/ProDy_2.5_beforeRelease/ProDy/prody/atomic/atomic.py", line 234, in select
return SELECT.select(self, selstr, **kwargs)
File "/home/karolamik/test_ProDy/ProDy_2.5_beforeRelease/ProDy/prody/atomic/select.py", line 895, in select
indices = self.getIndices(atoms, selstr, **kwargs)
File "/home/karolamik/test_ProDy/ProDy_2.5_beforeRelease/ProDy/prody/atomic/select.py", line 953, in getIndices
torf = self.getBoolArray(atoms, selstr, **kwargs)
File "/home/karolamik/test_ProDy/ProDy_2.5_beforeRelease/ProDy/prody/atomic/select.py", line 1005, in getBoolArray
tokens = parser(selstr, parseAll=True)
File "/home/karolamik/test_ProDy/ProDy_2.5_beforeRelease/ProDy/prody/atomic/select.py", line 1110, in _noParser
return [self._default(selstr, 0, selstr.split())]
File "/home/karolamik/test_ProDy/ProDy_2.5_beforeRelease/ProDy/prody/atomic/select.py", line 1128, in _default
torf, err = self._and2(sel, loc, tokens)
File "/home/karolamik/test_ProDy/ProDy_2.5_beforeRelease/ProDy/prody/atomic/select.py", line 1495, in _and2
arr, err = self._unary(sel, loc, unary.pop(0))
File "/home/karolamik/test_ProDy/ProDy_2.5_beforeRelease/ProDy/prody/atomic/select.py", line 1560, in _unary
which, err = self._and2(sel, loc, which)
File "/home/karolamik/test_ProDy/ProDy_2.5_beforeRelease/ProDy/prody/atomic/select.py", line 1489, in _and2
torf, err = self._unary(sel, loc, unary.pop(0))
File "/home/karolamik/test_ProDy/ProDy_2.5_beforeRelease/ProDy/prody/atomic/select.py", line 1571, in _unary
return self._within(sel, loc, tokens)
File "/home/karolamik/test_ProDy/ProDy_2.5_beforeRelease/ProDy/prody/atomic/select.py", line 1671, in _within
search(within, xyz)
File "/home/karolamik/test_ProDy/ProDy_2.5_beforeRelease/ProDy/prody/kdtree/kdtree.py", line 205, in search
self._kdtree.search_center_radius(center, radius)
AttributeError: 'C KDTree' object has no attribute 'search_center_radius'
-------------------- >> begin captured logging << --------------------
.prody: DEBUG: 7641 atoms and 1 coordinate set(s) were parsed in 0.06s.
--------------------- >> end captured logging << ---------------------

======================================================================
ERROR: testSingleWaterBridgesCluster (prody.tests.proteins.test_waterbridges.TestWaterBridges)

Traceback (most recent call last):
File "/home/karolamik/test_ProDy/ProDy_2.5_beforeRelease/ProDy/prody/tests/proteins/test_waterbridges.py", line 30, in setUp
self.waterBridgesChain = calcWaterBridges(self.atoms)
File "/home/karolamik/test_ProDy/ProDy_2.5_beforeRelease/ProDy/prody/proteins/waterbridges.py", line 419, in calcWaterBridges
tooFarAtoms = atoms.select(
File "/home/karolamik/test_ProDy/ProDy_2.5_beforeRelease/ProDy/prody/atomic/atomic.py", line 234, in select
return SELECT.select(self, selstr, **kwargs)
File "/home/karolamik/test_ProDy/ProDy_2.5_beforeRelease/ProDy/prody/atomic/select.py", line 895, in select
indices = self.getIndices(atoms, selstr, **kwargs)
File "/home/karolamik/test_ProDy/ProDy_2.5_beforeRelease/ProDy/prody/atomic/select.py", line 953, in getIndices
torf = self.getBoolArray(atoms, selstr, **kwargs)
File "/home/karolamik/test_ProDy/ProDy_2.5_beforeRelease/ProDy/prody/atomic/select.py", line 1005, in getBoolArray
tokens = parser(selstr, parseAll=True)
File "/home/karolamik/test_ProDy/ProDy_2.5_beforeRelease/ProDy/prody/atomic/select.py", line 1110, in _noParser
return [self._default(selstr, 0, selstr.split())]
File "/home/karolamik/test_ProDy/ProDy_2.5_beforeRelease/ProDy/prody/atomic/select.py", line 1128, in _default
torf, err = self._and2(sel, loc, tokens)
File "/home/karolamik/test_ProDy/ProDy_2.5_beforeRelease/ProDy/prody/atomic/select.py", line 1495, in _and2
arr, err = self._unary(sel, loc, unary.pop(0))
File "/home/karolamik/test_ProDy/ProDy_2.5_beforeRelease/ProDy/prody/atomic/select.py", line 1560, in _unary
which, err = self._and2(sel, loc, which)
File "/home/karolamik/test_ProDy/ProDy_2.5_beforeRelease/ProDy/prody/atomic/select.py", line 1489, in _and2
torf, err = self._unary(sel, loc, unary.pop(0))
File "/home/karolamik/test_ProDy/ProDy_2.5_beforeRelease/ProDy/prody/atomic/select.py", line 1571, in _unary
return self._within(sel, loc, tokens)
File "/home/karolamik/test_ProDy/ProDy_2.5_beforeRelease/ProDy/prody/atomic/select.py", line 1671, in _within
search(within, xyz)
File "/home/karolamik/test_ProDy/ProDy_2.5_beforeRelease/ProDy/prody/kdtree/kdtree.py", line 205, in search
self._kdtree.search_center_radius(center, radius)
AttributeError: 'C KDTree' object has no attribute 'search_center_radius'
-------------------- >> begin captured logging << --------------------
.prody: DEBUG: 7641 atoms and 1 coordinate set(s) were parsed in 0.07s.
--------------------- >> end captured logging << ---------------------

======================================================================
ERROR: testSingleWaterBridgesOutputInfo (prody.tests.proteins.test_waterbridges.TestWaterBridges)

Traceback (most recent call last):
File "/home/karolamik/test_ProDy/ProDy_2.5_beforeRelease/ProDy/prody/tests/proteins/test_waterbridges.py", line 30, in setUp
self.waterBridgesChain = calcWaterBridges(self.atoms)
File "/home/karolamik/test_ProDy/ProDy_2.5_beforeRelease/ProDy/prody/proteins/waterbridges.py", line 419, in calcWaterBridges
tooFarAtoms = atoms.select(
File "/home/karolamik/test_ProDy/ProDy_2.5_beforeRelease/ProDy/prody/atomic/atomic.py", line 234, in select
return SELECT.select(self, selstr, **kwargs)
File "/home/karolamik/test_ProDy/ProDy_2.5_beforeRelease/ProDy/prody/atomic/select.py", line 895, in select
indices = self.getIndices(atoms, selstr, **kwargs)
File "/home/karolamik/test_ProDy/ProDy_2.5_beforeRelease/ProDy/prody/atomic/select.py", line 953, in getIndices
torf = self.getBoolArray(atoms, selstr, **kwargs)
File "/home/karolamik/test_ProDy/ProDy_2.5_beforeRelease/ProDy/prody/atomic/select.py", line 1005, in getBoolArray
tokens = parser(selstr, parseAll=True)
File "/home/karolamik/test_ProDy/ProDy_2.5_beforeRelease/ProDy/prody/atomic/select.py", line 1110, in _noParser
return [self._default(selstr, 0, selstr.split())]
File "/home/karolamik/test_ProDy/ProDy_2.5_beforeRelease/ProDy/prody/atomic/select.py", line 1128, in _default
torf, err = self._and2(sel, loc, tokens)
File "/home/karolamik/test_ProDy/ProDy_2.5_beforeRelease/ProDy/prody/atomic/select.py", line 1495, in _and2
arr, err = self._unary(sel, loc, unary.pop(0))
File "/home/karolamik/test_ProDy/ProDy_2.5_beforeRelease/ProDy/prody/atomic/select.py", line 1560, in _unary
which, err = self._and2(sel, loc, which)
File "/home/karolamik/test_ProDy/ProDy_2.5_beforeRelease/ProDy/prody/atomic/select.py", line 1489, in _and2
torf, err = self._unary(sel, loc, unary.pop(0))
File "/home/karolamik/test_ProDy/ProDy_2.5_beforeRelease/ProDy/prody/atomic/select.py", line 1571, in _unary
return self._within(sel, loc, tokens)
File "/home/karolamik/test_ProDy/ProDy_2.5_beforeRelease/ProDy/prody/atomic/select.py", line 1671, in _within
search(within, xyz)
File "/home/karolamik/test_ProDy/ProDy_2.5_beforeRelease/ProDy/prody/kdtree/kdtree.py", line 205, in search
self._kdtree.search_center_radius(center, radius)
AttributeError: 'C KDTree' object has no attribute 'search_center_radius'
-------------------- >> begin captured logging << --------------------
.prody: DEBUG: 7641 atoms and 1 coordinate set(s) were parsed in 0.07s.
--------------------- >> end captured logging << ---------------------


Ran 72 tests in 120.559s

FAILED (SKIP=1, errors=12)

@jamesmkrieger
Copy link
Contributor Author

I think there's a problem with nosetests seeing the extensions. I also saw something similar

@jamesmkrieger
Copy link
Contributor Author

Try using pytest instead

pip install pytest
pip install pytest-skip-slow
pytest -v --slow prody/tests/proteins/test_insty.py

@jamesmkrieger
Copy link
Contributor Author

Building with --inplace may help the tests find the extensions. See #1915

Copy link
Contributor

@karolamik13 karolamik13 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I installed pytest. This is the outcome:

====== short test summary info =========
FAILED ../ProDy/prody/tests/proteins/test_insty.py::TestInteractions::testAllInteractionsCalc - AttributeError: 'C KDTree' object has no attribute 'neighbor_get_count'
FAILED ../ProDy/prody/tests/proteins/test_insty.py::TestInteractions::testAllInteractionsSave - AttributeError: 'C KDTree' object has no attribute 'neighbor_get_count'
FAILED ../ProDy/prody/tests/proteins/test_insty.py::TestInteractions::testHydrogenBonds - AttributeError: 'C KDTree' object has no attribute 'neighbor_get_count'
FAILED ../ProDy/prody/tests/proteins/test_insty.py::TestInteractions::testHydrophobicInteractions - IndexError: list index out of range
FAILED ../ProDy/prody/tests/proteins/test_insty.py::TestInteractions::testPiCation - ValueError: Missing atoms from the side chains of the structure. Use addMissingAtoms.
FAILED ../ProDy/prody/tests/proteins/test_insty.py::TestInteractions::testRepulsiveIonicBonding - AttributeError: 'C KDTree' object has no attribute 'search_center_radius'
FAILED ../ProDy/prody/tests/proteins/test_insty.py::TestInteractions::testSaltBridgesCalc - AttributeError: 'C KDTree' object has no attribute 'search_center_radius'
FAILED ../ProDy/prody/tests/proteins/test_insty.py::TestInteractions::testSaltBridgesSave - AttributeError: 'C KDTree' object has no attribute 'search_center_radius'
ERROR ../ProDy/prody/tests/proteins/test_insty.py::TestInteractions::testSaltBridgesSave - FileNotFoundError: [Errno 2] No such file or directory: 'test_2k39_all.npy'
========= 8 failed, 4 passed, 372 warnings, 1 error in 39.19s ==========

@jamesmkrieger
Copy link
Contributor Author

That’s still a problem with the c extensions. Did you try installing prody with build_ext and --inplace?

Copy link
Contributor

@karolamik13 karolamik13 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Installation with build_ext and --inplace helped.

collected 12 items

../ProDy/prody/tests/proteins/test_insty.py::TestInteractions::testAllInteractionsCalc PASSED [ 8%]
../ProDy/prody/tests/proteins/test_insty.py::TestInteractions::testAllInteractionsSave PASSED [ 16%]
../ProDy/prody/tests/proteins/test_insty.py::TestInteractions::testDisulfideBondsCalc PASSED [ 25%]
../ProDy/prody/tests/proteins/test_insty.py::TestInteractions::testDisulfideBondsSave PASSED [ 33%]
../ProDy/prody/tests/proteins/test_insty.py::TestInteractions::testHydrogenBonds PASSED [ 41%]
../ProDy/prody/tests/proteins/test_insty.py::TestInteractions::testHydrophobicInteractions PASSED [ 50%]
../ProDy/prody/tests/proteins/test_insty.py::TestInteractions::testImportHpb PASSED [ 58%]
../ProDy/prody/tests/proteins/test_insty.py::TestInteractions::testPiCation PASSED [ 66%]
../ProDy/prody/tests/proteins/test_insty.py::TestInteractions::testPiStacking PASSED [ 75%]
../ProDy/prody/tests/proteins/test_insty.py::TestInteractions::testRepulsiveIonicBonding PASSED [ 83%]
../ProDy/prody/tests/proteins/test_insty.py::TestInteractions::testSaltBridgesCalc PASSED [ 91%]
../ProDy/prody/tests/proteins/test_insty.py::TestInteractions::testSaltBridgesSave PASSED [100%]

=========================================== warnings summary ============================================
../ProDy/prody/utilities/misctools.py:425
/home/karolamik/test_ProDy/ProDy_JK__/ProDy/prody/utilities/misctools.py:425: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
import pkg_resources

../../../anaconda3/envs/prody_tests/lib/python3.10/site-packages/pkg_resources/init.py:3154
/home/karolamik/anaconda3/envs/prody_tests/lib/python3.10/site-packages/pkg_resources/init.py:3154: DeprecationWarning: Deprecated call to pkg_resources.declare_namespace('mpl_toolkits').
Implementing implicit namespace packages (as specified in PEP 420) is preferred to pkg_resources.declare_namespace. See https://setuptools.pypa.io/en/latest/references/keywords.html#keyword-namespace-packages
declare_namespace(pkg)

prody/tests/proteins/test_insty.py: 115 warnings
/home/karolamik/test_ProDy/ProDy_JK__/ProDy/prody/tests/proteins/test_insty.py:140: DeprecationWarning: The truth value of an empty array is ambiguous. Returning False, but in future this will result in an error. Use array.size > 0 to check that an array is not empty.
assert_equal(sorted([i[-1][-1] for i in data_test if i]), sorted([i[-1][-1] for i in self.DISU_INTERACTIONS if i]),

prody/tests/proteins/test_insty.py: 115 warnings
/home/karolamik/test_ProDy/ProDy_JK__/ProDy/prody/tests/proteins/test_insty.py:147: DeprecationWarning: The truth value of an empty array is ambiguous. Returning False, but in future this will result in an error. Use array.size > 0 to check that an array is not empty.
assert_equal(sorted([i[-1][-1] for i in data_test if i]), sorted([i[-1][-1] for i in self.DISU_INTERACTIONS if i]),

prody/tests/proteins/test_insty.py: 129 warnings
/home/karolamik/test_ProDy/ProDy_JK__/ProDy/prody/tests/proteins/test_insty.py:153: DeprecationWarning: The truth value of an empty array is ambiguous. Returning False, but in future this will result in an error. Use array.size > 0 to check that an array is not empty.
assert_equal(sorted([i[-1][-1] for i in data_test if i]), sorted([i[-1][-1] for i in self.DISU_INTERACTIONS if i]),

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
============ 12 passed, 361 warnings in 188.56s (0:03:08) ============

@jamesmkrieger
Copy link
Contributor Author

I'm not sure why it's complaining about arrays being empty, but I've fixed the utilities misctools warning about pkg_resources

@jamesmkrieger
Copy link
Contributor Author

oh, because we're testing disulphides on a system without any disulphides

I'm not sure why it's complaining about arrays being empty, but I've fixed the utilities misctools warning about pkg_resources

@jamesmkrieger
Copy link
Contributor Author

We should probably have a test where there are disulphides too e.g. 3o21, which is also in our datafiles already. I'll try adding that

@jamesmkrieger
Copy link
Contributor Author

It also looks like we don't have tests without trajectory anyway, so that would anyway be good to have

Copy link
Contributor

@karolamik13 karolamik13 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

====================== test session starts =======================
platform linux -- Python 3.10.15, pytest-8.3.3, pluggy-1.5.0 -- /home/karolamik/anaconda3/envs/prody_tests/bin/python3.10
cachedir: .pytest_cache
configfile: pyproject.toml
plugins: skip-slow-0.0.5
collected 14 items

../ProDy/prody/tests/proteins/test_insty.py::TestInteractions::testAllInteractionsCalc PASSED [ 7%]
../ProDy/prody/tests/proteins/test_insty.py::TestInteractions::testAllInteractionsSave PASSED [ 14%]
../ProDy/prody/tests/proteins/test_insty.py::TestInteractions::testDisulfideBondsCalcNone PASSED [ 21%]
../ProDy/prody/tests/proteins/test_insty.py::TestInteractions::testDisulfideBondsCalcSomeNotTraj PASSED [ 28%]
../ProDy/prody/tests/proteins/test_insty.py::TestInteractions::testDisulfideBondsSaveNone PASSED [ 35%]
../ProDy/prody/tests/proteins/test_insty.py::TestInteractions::testDisulfideBondsSaveSomeNotTraj PASSED [ 42%]
../ProDy/prody/tests/proteins/test_insty.py::TestInteractions::testHydrogenBonds PASSED [ 50%]
../ProDy/prody/tests/proteins/test_insty.py::TestInteractions::testHydrophobicInteractions PASSED [ 57%]
../ProDy/prody/tests/proteins/test_insty.py::TestInteractions::testImportHpb PASSED [ 64%]
../ProDy/prody/tests/proteins/test_insty.py::TestInteractions::testPiCation PASSED [ 71%]
../ProDy/prody/tests/proteins/test_insty.py::TestInteractions::testPiStacking PASSED [ 78%]
../ProDy/prody/tests/proteins/test_insty.py::TestInteractions::testRepulsiveIonicBonding PASSED [ 85%]
../ProDy/prody/tests/proteins/test_insty.py::TestInteractions::testSaltBridgesCalc PASSED [ 92%]
../ProDy/prody/tests/proteins/test_insty.py::TestInteractions::testSaltBridgesSave PASSED [100%]
============== 14 passed in 189.43s (0:03:09) =======

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants