Skip to content

Commit

Permalink
Add: Support for anaconda builds
Browse files Browse the repository at this point in the history
This changeset adds main() entry points to all csb apps to make them compliant with anaconda's meta.yaml syntax.
  • Loading branch information
ivan-kalev committed Jan 18, 2014
1 parent a6ff0ce commit 495220f
Show file tree
Hide file tree
Showing 10 changed files with 53 additions and 32 deletions.
8 changes: 6 additions & 2 deletions csb/apps/bfit.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,10 @@ def main(self):
m.to_pdb(self.args.outfile)



if __name__ == '__main__':
def main():
AppRunner().run()


if __name__ == '__main__':
main()

7 changes: 5 additions & 2 deletions csb/apps/bfite.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,11 @@ def main(self):
out_ensemble.models.append(model)

out_ensemble.to_pdb(self.args.outfile)



if __name__ == '__main__':
def main():
AppRunner().run()


if __name__ == '__main__':
main()
8 changes: 5 additions & 3 deletions csb/apps/buildhmm.py
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,9 @@ def format_structure(self):
return pdb



if __name__ == '__main__':
def main():
AppRunner().run()

AppRunner().run()

if __name__ == '__main__':
main()
10 changes: 5 additions & 5 deletions csb/apps/csfrag.py
Original file line number Diff line number Diff line change
Expand Up @@ -533,9 +533,9 @@ def _task(helper, subject, qs, qe, qcs, scs):
return []




if __name__ == '__main__':

def main():
AppRunner().run()



if __name__ == '__main__':
main()
8 changes: 5 additions & 3 deletions csb/apps/embd.py
Original file line number Diff line number Diff line change
Expand Up @@ -275,9 +275,11 @@ def run(self, iterations):
"""
for i in range(iterations):
self.run_once()



if __name__ == '__main__':

def main():
AppRunner().run()


if __name__ == '__main__':
main()
9 changes: 6 additions & 3 deletions csb/apps/helloworld.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,11 @@ def main(self):

self.log(text)
self.log('HW: done.')


if __name__ == '__main__':

def main():
AppRunner(sys.argv).run()

AppRunner(sys.argv).run()

if __name__ == '__main__':
main()
9 changes: 5 additions & 4 deletions csb/apps/hhfrag.py
Original file line number Diff line number Diff line change
Expand Up @@ -581,10 +581,11 @@ def addall(self, ri):

for i in ri:
self.add(i)



def main():
AppRunner().run()


if __name__ == '__main__':

AppRunner().run()

main()
8 changes: 5 additions & 3 deletions csb/apps/hhsearch.py
Original file line number Diff line number Diff line change
Expand Up @@ -271,9 +271,11 @@ def runmany(self, contexts, workers=mp.cpu_count(), cpu=1):
pool.terminate()

return results



def main():
AppRunner().run()


if __name__ == '__main__':

AppRunner().run()
main()
8 changes: 5 additions & 3 deletions csb/apps/precision.py
Original file line number Diff line number Diff line change
Expand Up @@ -313,9 +313,11 @@ def rmsd(target, source, fragments, pdb, save=None):
continue

return matches



if __name__ == '__main__':

def main():
AppRunner().run()


if __name__ == '__main__':
main()
10 changes: 6 additions & 4 deletions csb/apps/promix.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
Reference: Hirsch M, Habeck M. - Bioinformatics. 2008 Oct 1;24(19):2184-92
"""

import sys
import numpy

import csb.apps
Expand Down Expand Up @@ -102,7 +101,10 @@ def main_conformers(self, ensemble, X):

ek.to_pdb(outfile)

if __name__ == '__main__':
AppRunner(sys.argv).run()

# vi:expandtab:smarttab:sw=4
def main():
AppRunner().run()


if __name__ == '__main__':
main()

0 comments on commit 495220f

Please sign in to comment.