Skip to content

Commit 7c6221a

Browse files
author
Samuel Moors
committed
Merge branch 'develop' into data
2 parents 21ac77c + ae29588 commit 7c6221a

File tree

4 files changed

+18
-29
lines changed

4 files changed

+18
-29
lines changed

.github/workflows/eb_command.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
runs-on: ubuntu-20.04
1515
strategy:
1616
matrix:
17-
python: [3.5, 3.6, 3.7, 3.8, 3.9, '3.10', '3.11']
17+
python: [3.6, 3.7, 3.8, 3.9, '3.10', '3.11']
1818
fail-fast: false
1919
steps:
2020
- uses: actions/checkout@v3

.github/workflows/linting.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
runs-on: ubuntu-20.04
1414
strategy:
1515
matrix:
16-
python-version: [3.5, 3.6, 3.7, 3.8, 3.9, '3.10', '3.11']
16+
python-version: [3.6, 3.7, 3.8, 3.9, '3.10', '3.11']
1717

1818
steps:
1919
- uses: actions/checkout@v3

.github/workflows/unit_tests.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,6 @@ jobs:
3737
lc_all: [""]
3838
include:
3939
# Test different Python 3 versions with Lmod 8.x
40-
- python: 3.5
41-
modules_tool: ${{needs.setup.outputs.lmod8}}
4240
- python: 3.7
4341
modules_tool: ${{needs.setup.outputs.lmod8}}
4442
- python: 3.8

easybuild/framework/easyblock.py

Lines changed: 16 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1373,7 +1373,7 @@ def make_module_dep(self, unload_info=None):
13731373
multi_dep_mod_names[dep['name']].append(dep['short_mod_name'])
13741374

13751375
multi_dep_load_defaults = []
1376-
for depname, depmods in sorted(multi_dep_mod_names.items()):
1376+
for _, depmods in sorted(multi_dep_mod_names.items()):
13771377
stmt = self.module_generator.load_module(depmods[0], multi_dep_mods=depmods,
13781378
recursive_unload=recursive_unload,
13791379
depends_on=depends_on)
@@ -1777,10 +1777,7 @@ def make_extension_string(self, name_version_sep='-', ext_sep=', ', sort=True):
17771777
return ext_sep.join(exts_list)
17781778

17791779
def prepare_for_extensions(self):
1780-
"""
1781-
Also do this before (eg to set the template)
1782-
"""
1783-
pass
1780+
"""Ran before installing extensions (eg to set templates)"""
17841781

17851782
def skip_extensions(self):
17861783
"""
@@ -2206,9 +2203,9 @@ def handle_iterate_opts(self):
22062203
self.log.info("Current iteration index: %s", self.iter_idx)
22072204

22082205
# pop first element from all iterative easyconfig parameters as next value to use
2209-
for opt in self.iter_opts:
2210-
if len(self.iter_opts[opt]) > self.iter_idx:
2211-
self.cfg[opt] = self.iter_opts[opt][self.iter_idx]
2206+
for opt, value in self.iter_opts.items():
2207+
if len(value) > self.iter_idx:
2208+
self.cfg[opt] = value[self.iter_idx]
22122209
else:
22132210
self.cfg[opt] = '' # empty list => empty option as next value
22142211
self.log.debug("Next value for %s: %s" % (opt, str(self.cfg[opt])))
@@ -2220,12 +2217,12 @@ def post_iter_step(self):
22202217
"""Restore options that were iterated over"""
22212218
# disable templating, since we're messing about with values in self.cfg
22222219
with self.cfg.disable_templating():
2223-
for opt in self.iter_opts:
2224-
self.cfg[opt] = self.iter_opts[opt]
2220+
for opt, value in self.iter_opts.items():
2221+
self.cfg[opt] = value
22252222

22262223
# also need to take into account extensions, since those were iterated over as well
22272224
for ext in self.ext_instances:
2228-
ext.cfg[opt] = self.iter_opts[opt]
2225+
ext.cfg[opt] = value
22292226

22302227
self.log.debug("Restored value of '%s' that was iterated over: %s", opt, self.cfg[opt])
22312228

@@ -2761,10 +2758,7 @@ def _test_step(self):
27612758
self.report_test_failure(err)
27622759

27632760
def stage_install_step(self):
2764-
"""
2765-
Install in a stage directory before actual installation.
2766-
"""
2767-
pass
2761+
"""Install in a stage directory before actual installation."""
27682762

27692763
def install_step(self):
27702764
"""Install built software (abstract method)."""
@@ -3258,7 +3252,7 @@ def sanity_check_linked_shared_libs(self, subdirs=None):
32583252
required_libs.extend(self.cfg['required_linked_shared_libs'])
32593253

32603254
# early return if there are no banned/required libraries
3261-
if not (banned_libs + required_libs):
3255+
if not banned_libs + required_libs:
32623256
self.log.info("No banned/required libraries specified")
32633257
return []
32643258
else:
@@ -4473,7 +4467,7 @@ def copy_easyblocks_for_reprod(easyblock_instances, reprod_dir):
44734467
else:
44744468
easyblock_paths.add(easyblock_path)
44754469
for easyblock_path in easyblock_paths:
4476-
easyblock_basedir, easyblock_filename = os.path.split(easyblock_path)
4470+
easyblock_filename = os.path.basename(easyblock_path)
44774471
copy_file(easyblock_path, os.path.join(reprod_easyblock_dir, easyblock_filename))
44784472
_log.info("Dumped easyblock %s required for reproduction to %s", easyblock_filename, reprod_easyblock_dir)
44794473

@@ -4604,10 +4598,7 @@ def build_easyconfigs(easyconfigs, output_dir, test_results):
46044598

46054599

46064600
class StopException(Exception):
4607-
"""
4608-
StopException class definition.
4609-
"""
4610-
pass
4601+
"""Exception thrown to stop running steps"""
46114602

46124603

46134604
def inject_checksums_to_json(ecs, checksum_type):
@@ -4655,14 +4646,14 @@ def inject_checksums_to_json(ecs, checksum_type):
46554646

46564647
# actually inject new checksums or overwrite existing ones (if --force)
46574648
existing_checksums = app.get_checksums_from_json(always_read=True)
4658-
for filename in checksums:
4649+
for filename, checksum in checksums.items():
46594650
if filename not in existing_checksums:
4660-
existing_checksums[filename] = checksums[filename]
4651+
existing_checksums[filename] = checksum
46614652
# don't do anything if the checksum already exist and is the same
4662-
elif checksums[filename] != existing_checksums[filename]:
4653+
elif checksum != existing_checksums[filename]:
46634654
if build_option('force'):
46644655
print_warning("Found existing checksums for %s, overwriting them (due to --force)..." % ec_fn)
4665-
existing_checksums[filename] = checksums[filename]
4656+
existing_checksums[filename] = checksum
46664657
else:
46674658
raise EasyBuildError("Found existing checksum for %s, use --force to overwrite them" % filename)
46684659

0 commit comments

Comments
 (0)