Skip to content

Commit 8156083

Browse files
authored
Merge pull request #1547 from Libensemble/testing/some_coverage
Testing/some coverage + another attempt at dynamic versioning
2 parents 8da45e8 + edfa3c1 commit 8156083

4 files changed

Lines changed: 20 additions & 5 deletions

File tree

.codecov.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,4 @@ ignore:
33
- "libensemble/tools/forkable_pdb.py"
44
- "libensemble/tools/live_data/*"
55
- "libensemble/sim_funcs/executor_hworld.py"
6-
- "libensemble/gen_funcs/persistent_ax_multitask.py"
7-
- "libensemble/gen_funcs/persistent_gpCAM.py"
6+
- "libensemble/gen_funcs/persistent_tasmanian.py"

libensemble/resources/platforms.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -289,12 +289,10 @@ def known_envs():
289289
logger.manager_warning("Perlmutter detected, but no compute partition detected. Are you on login nodes?")
290290
if os.environ.get("SLURM_CLUSTER_NAME") == "lumi":
291291
partition = os.environ.get("SLURM_JOB_PARTITION")
292-
print(f"Lumi partition: {partition}")
293292
if not partition:
294293
logger.manager_warning("LUMI detected, but no compute partition detected. Are you on login nodes?")
295294
if partition and partition.endswith("-g"):
296295
name = "lumi_g"
297-
print(f"Lumi GPU detected: {name}")
298296
else:
299297
name = "lumi"
300298
return name

libensemble/tests/unit_tests/test_ufunc_runners.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,20 @@ def tupilize(arg1, arg2):
5454
simrunner.shutdown()
5555

5656

57+
def test_persis_info_from_none():
58+
calc_in, sim_specs, gen_specs = get_ufunc_args()
59+
60+
def tupilize(arg1, arg2):
61+
return (arg1, arg2)
62+
63+
sim_specs["sim_f"] = tupilize
64+
simrunner = Runner(sim_specs)
65+
libE_info = {"H_rows": np.array([2, 3, 4]), "workerID": 1, "comm": "fakecomm"}
66+
67+
result = simrunner.run(calc_in, {"libE_info": libE_info, "persis_info": None, "tag": 1})
68+
assert result == (calc_in, {})
69+
70+
5771
@pytest.mark.extra
5872
def test_globus_compute_runner_init():
5973
calc_in, sim_specs, gen_specs = get_ufunc_args()
@@ -122,6 +136,7 @@ def test_globus_compute_runner_fail():
122136
if __name__ == "__main__":
123137
test_normal_runners()
124138
test_thread_runners()
139+
test_persis_info_from_none()
125140
test_globus_compute_runner_init()
126141
test_globus_compute_runner_pass()
127142
test_globus_compute_runner_fail()

pyproject.toml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ classifiers = [
3030
"Topic :: Scientific/Engineering",
3131
"Topic :: Software Development :: Libraries :: Python Modules",
3232
]
33-
version = "1.5.0"
33+
dynamic = ["version"]
3434

3535
[project.urls]
3636
Documentation = "https://libensemble.readthedocs.io/en/main/"
@@ -45,6 +45,9 @@ requires = ["setuptools", "wheel", "pip>=24.3.1,<26", "setuptools>=75.1.0,<79",
4545
where = ["."]
4646
include = ["libensemble*"]
4747

48+
[tool.setuptools.dynamic]
49+
version = {attr = "libensemble.version.__version__"}
50+
4851
[tool.pixi.project]
4952
channels = ["conda-forge"]
5053
platforms = ["osx-arm64", "linux-64", "osx-64"]

0 commit comments

Comments
 (0)