Skip to content

Commit

Permalink
move flush_file and index classes to cli directory
Browse files Browse the repository at this point in the history
  • Loading branch information
adammoody committed Jul 22, 2021
1 parent 6731804 commit 987f0fa
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 6 deletions.
2 changes: 2 additions & 0 deletions scripts/pyfe/pyfe/cli/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Wrappers for SCR command line interface
The classes in this directory provide python interfaces around SCR command line tools.
2 changes: 2 additions & 0 deletions scripts/pyfe/pyfe/cli/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
from .scr_index import SCRIndex
from .scr_flush_file import SCRFlushFile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

from pyfe.scr_common import runproc

class FlushFile:
class SCRFlushFile:
def __init__(self, bindir, prefix):
self.bindir = bindir # path to SCR bin directory
self.prefix = prefix # path to SCR_PREFIX
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

from pyfe.scr_common import runproc

class Index:
class SCRIndex:
def __init__(self, bindir, prefix):
self.bindir = bindir # path to SCR bin directory
self.prefix = prefix # path to SCR_PREFIX
Expand Down
7 changes: 3 additions & 4 deletions scripts/pyfe/pyfe/postrun.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@
from pyfe.scr_scavenge import scr_scavenge
from pyfe.list_down_nodes import list_down_nodes
from pyfe.scr_glob_hosts import scr_glob_hosts
from pyfe.flush_file import FlushFile
from pyfe.index import Index
from pyfe.cli import SCRIndex, SCRFlushFile

def postrun(prefix_dir=None,scr_env=None,verbose=False):
if scr_env is None or scr_env.resmgr is None:
Expand Down Expand Up @@ -43,8 +42,8 @@ def postrun(prefix_dir=None,scr_env=None,verbose=False):
if pardir=='':
return 1

scr_flush_file = FlushFile(bindir, pardir)
scr_index = Index(bindir, pardir)
scr_index = SCRIndex(bindir, pardir)
scr_flush_file = SCRFlushFile(bindir, pardir)

# all parameters checked out, start normal output
print('scr_postrun: Started: '+str(datetime.now()))
Expand Down

0 comments on commit 987f0fa

Please sign in to comment.