-
Notifications
You must be signed in to change notification settings - Fork 209
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
Resolve compset issue #1981
Resolve compset issue #1981
Changes from 5 commits
7c34888
67d064e
f3b4fd9
256e373
b4fe515
9414d1d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -80,7 +80,7 @@ def _get_component_archive_entries(case, archive): | |
case's compset components. | ||
""" | ||
compset_comps = case.get_compset_components() | ||
compset_comps.append('cpl') | ||
compset_comps.append('drv') | ||
compset_comps.append('dart') | ||
|
||
for compname in compset_comps: | ||
|
@@ -180,6 +180,9 @@ def _archive_history_files(case, archive, archive_entry, | |
if not os.path.exists(archive_histdir): | ||
os.makedirs(archive_histdir) | ||
logger.debug("created directory {}".format(archive_histdir)) | ||
# the compname is drv but the files are named cpl | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could you please give an example of what files are named cpl currently so that we can have this documented. |
||
if compname == 'drv': | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please add a comment as to why you are doing this. |
||
compname = 'cpl' | ||
|
||
# determine ninst and ninst_string | ||
ninst, ninst_string = _get_ninst_info(case, compclass) | ||
|
@@ -319,6 +322,10 @@ def _archive_restarts_date_comp(case, archive, archive_entry, | |
last_restart_file_fn = shutil.copy | ||
last_restart_file_fn_msg = "copying" | ||
|
||
# the compname is drv but the files are named cpl | ||
if compname == 'drv': | ||
compname = 'cpl' | ||
|
||
# get file_extension suffixes | ||
for suffix in archive.get_rest_file_extensions(archive_entry): | ||
for i in range(ninst): | ||
|
@@ -337,7 +344,7 @@ def _archive_restarts_date_comp(case, archive, archive_entry, | |
pattern = suffix + datename | ||
pfile = re.compile(pattern) | ||
restfiles = [f for f in files if pfile.search(f)] | ||
|
||
logger.debug("Pattern is {} restfiles {}".format(pattern, restfiles)) | ||
for restfile in restfiles: | ||
restfile = os.path.basename(restfile) | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it always the case that the new node will be after the original node - this is assumed in that your are removing samenodes[0] - the first node. Also - could you please document what this routine is doing in terms of the new functionality we are building in (you are taking the entry from the .config_files in $SRCROOT and overwriting the entry here with that one).