Skip to content

Commit d7952d8

Browse files
committed
process reprod dirs when generating tarball overview
1 parent b1663f1 commit d7952d8

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

scripts/automated_ingestion/eessi_task_payload.py

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -69,25 +69,31 @@ def analyse_contents(self, config: Dict) -> str:
6969
swdirs = [ # all directory names with the pattern: <prefix>/software/<name>/<version>
7070
member.path
7171
for member in members
72-
if member.isdir() and PurePosixPath(member.path).match(os.path.join(prefix, "software", "*", "*"))
72+
if member.isdir() and PurePosixPath(member.path).match(os.path.join(prefix, 'software', '*', '*'))
7373
]
7474
modfiles = [ # all filenames with the pattern: <prefix>/modules/<category>/<name>/*.lua
7575
member.path
7676
for member in members
7777
if member.isfile()
78-
and PurePosixPath(member.path).match(os.path.join(prefix, "modules", "*", "*", "*.lua"))
78+
and PurePosixPath(member.path).match(os.path.join(prefix, 'modules', '*', '*', '*.lua'))
7979
]
80-
other = [ # anything that is not in <prefix>/software nor <prefix>/modules
80+
reprod_dirs = [
81+
member.path
82+
for member in members
83+
if member.isdir() and PurePosixPath(member.path).match(os.path.join(prefix, 'reprod', '*', '*', '*'))
84+
]
85+
other = [ # anything that is not in <prefix>/software nor <prefix>/modules nor <prefix>/reprod
8186
member.path
8287
for member in members
8388
if (
84-
not PurePosixPath(prefix).joinpath("software") in PurePosixPath(member.path).parents
85-
and not PurePosixPath(prefix).joinpath("modules") in PurePosixPath(member.path).parents
89+
not PurePosixPath(prefix).joinpath('software') in PurePosixPath(member.path).parents
90+
and not PurePosixPath(prefix).joinpath('modules') in PurePosixPath(member.path).parents
91+
and not PurePosixPath(prefix).joinpath('reprod') in PurePosixPath(member.path).parents
8692
)
8793
# if not fnmatch.fnmatch(m.path, os.path.join(prefix, 'software', '*'))
8894
# and not fnmatch.fnmatch(m.path, os.path.join(prefix, 'modules', '*'))
8995
]
90-
members_list = sorted(swdirs + modfiles + other)
96+
members_list = sorted(swdirs + modfiles + reprod_dirs + other)
9197

9298
# construct the overview
9399
overview = config["github"]["task_summary_payload_overview_template"].format(

0 commit comments

Comments
 (0)