Skip to content

Commit d138f0c

Browse files
author
Landon Clipp
authored
Class refactor (#2)
* beginning to refractor classes for better OO design * Refactoring class structure. Now have something semi-working. Need to add more tests and extend functionality. * Adding more test cases. Fixed many bugs. Class refactoring is mostly done and in a good state. * changes to travis * travis * travis * travis * travis * travis * travis * removing dependency import * missed other dependency import * Added cycle detection test.
1 parent ff044b2 commit d138f0c

File tree

10 files changed

+204
-250
lines changed

10 files changed

+204
-250
lines changed

.travis.yml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
1-
install: true
21
sudo: required
2+
language: python
3+
python:
4+
- "3.5"
5+
install:
6+
- pip install pyyaml
7+
- pip install pytest
8+
- pip install setuptools
9+
- export PYTHONUSERBASE="${HOME}"
10+
- export PYTHONPATH="$PYTHONPATH:/home/travis/.local/lib/python2.7/site-packages"
11+
- python --version
12+
- sudo python setup.py install --user
13+
- python -c "import sys; print( sys.path )"
314
script:
4-
- ./install.sh
15+
- pytest ./tests
516

batch4py/__init__.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1-
from .dependency import Dependency
2-
from .jobchain import JobChain
3-
from .job import Job
4-
1+
from . import constants
2+
import yaml
3+
with open( constants.CONFIG_PATH, 'r' ) as f:
4+
constants.CONFIG = yaml.load(f)
55

6+
from .job import Job
7+
from .jobchain import JobChain

batch4py/config.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
11
# This file describes the semantics used for various batch schedulers.
22

33
torque:
4-
sys_exe: qsub
4+
exe: qsub
5+
resource: '-l'
56
nodes: '-l nodes={}:ppn={}'
6-
node_type: ':{}'
7+
ppn: 'ppn={}'
8+
node_type: '{}'
79
account: '-A'
810
depend: '-W depend={}'
11+
walltime: '-l walltime={}'
912
delimit: ':'
1013
supported_dep:
1114
- after

batch4py/constants.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
__email__ = '[email protected]'
55

66
PBS_DIR = os.path.join( os.path.dirname( __file__ ), 'pbs_files' )
7+
CONFIG_PATH = os.path.join( os.path.dirname( __file__ ), 'config.yml' )
8+
CONFIG = None
79

810
max_pbs_num = 5000
911
'''maximum number of PBS files to store in PBS_DIR'''

batch4py/dependency.py

Lines changed: 0 additions & 73 deletions
This file was deleted.

0 commit comments

Comments
 (0)