File tree Expand file tree Collapse file tree 10 files changed +169
-118
lines changed Expand file tree Collapse file tree 10 files changed +169
-118
lines changed Original file line number Diff line number Diff line change 10
10
import io
11
11
import subprocess
12
12
13
- __version__ = "1.2.0 "
13
+ __version__ = "1.2.1 "
14
14
15
15
# fixed parameters
16
16
DAVAI_RC_DIR = os .path .join (os .environ ['HOME' ], '.davairc' )
17
17
DAVAI_XP_COUNTER = os .path .join (DAVAI_RC_DIR , '.last_xp' )
18
18
DAVAI_XPID_SYNTAX = 'dv-{xpid_num:04}-{host}@{user}'
19
- DAVAI_XPID_RE = re .compile ('^' + DAVAI_XPID_SYNTAX .replace ('{xpid_num:04}' , '\d+' ).
20
- replace ('-{host}' , '(-\w+)?' ).
21
- replace ('{user}' , '\w+' ) + '$' )
19
+ DAVAI_XPID_RE = re .compile (r'^dv-(?P<num>\d{4})-(?P<host>\w+)@(?P<user>\w+)$' )
20
+ #DAVAI_XPID_RE = re.compile('^' + DAVAI_XPID_SYNTAX.replace('{xpid_num:04}', '\d+').
21
+ # replace('-{host}', '(-\w+)?').
22
+ # replace('{user}', '\w+') + '$')
22
23
CONFIG_USER_FILE = os .path .join (DAVAI_RC_DIR , 'user_config.ini' )
23
24
25
+ #: usecases implemented
26
+ usecases = ('NRV' , 'ELP' )
27
+ #: vortex application
28
+ vapp = 'davai'
29
+
24
30
25
31
def guess_host ():
26
32
"""
Original file line number Diff line number Diff line change 3
3
4
4
import argparse
5
5
6
- from ..experiment import ThisXP
6
+ from ..experiment import XP
7
7
8
8
__all__ = ['main' ]
9
9
10
10
11
11
def main ():
12
12
args = get_args ()
13
- this_xp = ThisXP ( )
13
+ this_xp = XP ( args . experiment )
14
14
this_xp .build (
15
15
skip_fetching_sources = args .skip_fetching_sources ,
16
16
drymode = args .drymode ,
@@ -22,7 +22,16 @@ def main():
22
22
23
23
24
24
def get_args ():
25
- parser = argparse .ArgumentParser (description = 'Fetch sources (interactively) and build executables (batch/scheduler). To be executed from the XP directory !' )
25
+ parser = argparse .ArgumentParser (description = " " .join ([
26
+ 'Fetch sources (interactively) and build executables (batch/scheduler).'
27
+ 'To be executed from the XP directory !' ]))
28
+ parser .add_argument ('experiment' ,
29
+ help = " " .join (["An xpid (e.g. 'dv-0054-belenos@mary') or" ,
30
+ "a piece of path to grab the experiment." ,
31
+ "Defaults to current working directory." ,
32
+ ]),
33
+ nargs = '?' ,
34
+ default = '.' )
26
35
parser .add_argument ('-s' , '--skip_fetching_sources' ,
27
36
action = 'store_true' ,
28
37
help = "Skip fetching the sources (assuming they have been fetched / and pack preexists for gmkpack)." )
Original file line number Diff line number Diff line change 3
3
4
4
import argparse
5
5
6
- from ..experiment import ThisXP
6
+ from ..experiment import XP
7
7
8
8
__all__ = ['main' ]
9
9
10
10
def main ():
11
11
parser = argparse .ArgumentParser (description = "(Re-)Initialize experiment in Ciboulai dashboard server. " +
12
12
"To be executed from the XP directory !" )
13
+ parser .add_argument ('experiment' ,
14
+ help = " " .join (["An xpid (e.g. 'dv-0054-belenos@mary') or" ,
15
+ "a piece of path to grab the experiment." ,
16
+ "Defaults to current working directory." ,
17
+ ]),
18
+ nargs = '?' ,
19
+ default = '.' )
13
20
args = parser .parse_args ()
14
- this_xp = ThisXP ( )
21
+ this_xp = XP ( args . experiment )
15
22
this_xp .ciboulai_init ()
16
23
Original file line number Diff line number Diff line change 3
3
4
4
import argparse
5
5
6
- from ..experiment import ThisXP
6
+ from ..experiment import XP
7
7
8
8
__all__ = ['main' ]
9
9
@@ -16,7 +16,7 @@ def main():
16
16
action = 'store_true' ,
17
17
help = "Silent mode" )
18
18
args = parser .parse_args ()
19
- this_xp = ThisXP ()
19
+ this_xp = XP ()
20
20
if not args .silent :
21
21
print (this_xp .xpid )
22
22
Original file line number Diff line number Diff line change 3
3
4
4
import argparse
5
5
6
- from ..experiment import ThisXP
6
+ from ..experiment import XP
7
7
8
8
__all__ = ['main' ]
9
9
@@ -12,7 +12,7 @@ def main():
12
12
13
13
args = get_args ()
14
14
15
- this_xp = ThisXP ( )
15
+ this_xp = XP ( args . experiment )
16
16
if args .list_jobs :
17
17
this_xp .print_jobs ()
18
18
else :
@@ -23,7 +23,14 @@ def main():
23
23
24
24
def get_args ():
25
25
parser = argparse .ArgumentParser (description = 'Launch tests. To be ran from the XP directory only !' )
26
- parser .add_argument ('only_job' ,
26
+ parser .add_argument ('experiment' ,
27
+ help = " " .join (["An xpid (e.g. 'dv-0054-belenos@mary') or" ,
28
+ "a piece of path to grab the experiment." ,
29
+ "Defaults to current working directory." ,
30
+ ]),
31
+ nargs = '?' ,
32
+ default = '.' )
33
+ parser .add_argument ('-j' , '--only_job' ,
27
34
nargs = '?' ,
28
35
default = None ,
29
36
help = "Restrict the launch to the given job only (which may contain several tests)" )
Original file line number Diff line number Diff line change 3
3
4
4
import argparse
5
5
6
- from ..experiment import ThisXP
6
+ from ..experiment import XP
7
7
8
8
__all__ = ['main' ]
9
9
10
10
11
11
def main ():
12
12
args = parser .parse_args ()
13
- this_xp = ThisXP ( )
13
+ this_xp = XP ( args . experiment )
14
14
this_xp .ciboulai_init ()
15
15
# build
16
16
this_xp .build (
@@ -29,6 +29,13 @@ def main():
29
29
30
30
def get_args ():
31
31
parser = argparse .ArgumentParser (description = 'Run experiment: ciboulai_init, build, run_tests. To be executed from the XP directory !' )
32
+ parser .add_argument ('experiment' ,
33
+ help = " " .join (["An xpid (e.g. 'dv-0054-belenos@mary') or" ,
34
+ "a piece of path to grab the experiment." ,
35
+ "Defaults to current working directory." ,
36
+ ]),
37
+ nargs = '?' ,
38
+ default = '.' )
32
39
# build arguments
33
40
parser .add_argument ('-s' , '--skip_fetching_sources' ,
34
41
action = 'store_true' ,
Original file line number Diff line number Diff line change 3
3
4
4
import argparse
5
5
6
- from ..experiment import ThisXP
6
+ from ..experiment import XP
7
7
8
8
__all__ = ['main' ]
9
9
10
10
11
11
def main ():
12
12
parser = argparse .ArgumentParser (description = 'Prints the version of tests currently in use in this experiment.' )
13
+ parser .add_argument ('experiment' ,
14
+ help = " " .join (["An xpid (e.g. 'dv-0054-belenos@mary') or" ,
15
+ "a piece of path to grab the experiment." ,
16
+ "Defaults to current working directory." ,
17
+ ]),
18
+ nargs = '?' ,
19
+ default = '.' )
13
20
parser .parse_args ()
14
- this_xp = ThisXP ( )
21
+ this_xp = XP ( args . experiment )
15
22
print (this_xp .davai_tests_version )
16
23
Original file line number Diff line number Diff line change 6
6
7
7
import argparse
8
8
9
- from ..experiment import ThisXP
9
+ from ..experiment import XP
10
10
11
11
12
12
def main ():
13
13
args = get_args ()
14
- this_xp = ThisXP ( )
14
+ this_xp = XP ( args . experiment )
15
15
this_xp .status (args .task )
16
16
17
17
@@ -21,6 +21,13 @@ def get_args():
21
21
'Works with tasks summaries in cache,' ,
22
22
'hence files may be missing if used too long after' ,
23
23
'the experiment has been run.' ]))
24
+ parser .add_argument ('experiment' ,
25
+ help = " " .join (["An xpid (e.g. 'dv-0054-belenos@mary') or" ,
26
+ "a piece of path to grab the experiment." ,
27
+ "Defaults to current working directory." ,
28
+ ]),
29
+ nargs = '?' ,
30
+ default = '.' )
24
31
parser .add_argument ('-t' , '--task' ,
25
32
default = None ,
26
33
help = "Specify a task name to get the filepath to its detailed summary." )
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ IAL_bundle_repository = https://github.com/ACCORD-NWP/IAL-bundle
8
8
9
9
[paths]
10
10
IAL_repository = ~/repositories/IAL
11
- experiments = ~ /davai/experiments
11
+ experiments = $SCRATCH /davai/experiments
12
12
logs = ~/davai/logs
13
13
14
14
[hosts]
You can’t perform that action at this time.
0 commit comments