From fbab54a51b1af936983ecc9bb0c167e6bef56efd Mon Sep 17 00:00:00 2001 From: Johannes Otepka Date: Wed, 11 Feb 2026 22:20:17 +0100 Subject: [PATCH 01/18] test code for labels added --- ipyparallel/tests/test_label.py | 108 ++++++++++++++++++++++++++++++++ 1 file changed, 108 insertions(+) create mode 100644 ipyparallel/tests/test_label.py diff --git a/ipyparallel/tests/test_label.py b/ipyparallel/tests/test_label.py new file mode 100644 index 00000000..8820b863 --- /dev/null +++ b/ipyparallel/tests/test_label.py @@ -0,0 +1,108 @@ +"""Tests for task label functionality""" + +# Copyright (c) IPython Development Team. +# Distributed under the terms of the Modified BSD License. +import logging +import os +from unittest import TestCase + +import pytest + +import ipyparallel as ipp +from ipyparallel.cluster.launcher import LocalControllerLauncher + + +def speudo_wait(t): + import time + + tic = time.time() + print(f"waiting for {t}s...") + # time.sleep(t) # do NOT wait for t seconds to speed up tests + print("done") + return time.time() - tic + + +class TaskLabelTest: + def setUp(self): + self.cluster = ipp.Cluster( + n=2, log_level=10, controller=self.get_controller_launcher() + ) + self.cluster.start_cluster_sync() + + self.rc = self.cluster.connect_client_sync() + self.rc.wait_for_engines(n=2) + + def get_controller_launcher(self): + raise NotImplementedError + + def tearDown(self): + self.cluster.stop_engines() + self.cluster.stop_controller() + # self.cluster.close() + + def run_tasks(self, view): + ar_list = [] + # use context to set label + with view.temp_flags(label="mylabel_map"): + ar_list.append(view.map_async(speudo_wait, [1.1, 1.2, 1.3, 1.4, 1.5])) + # use set_flags to set label + ar_list.extend( + [ + view.set_flags(label=f"mylabel_apply_{i:02}").apply_async( + speudo_wait, 2 + i / 10 + ) + for i in range(5) + ] + ) + view.wait(ar_list) + + # build list of used labels + map_labels = ["mylabel_map"] + apply_labels = [] + for i in range(5): + apply_labels.append(f"mylabel_apply_{i:02}") + return map_labels, apply_labels + + def check_labels(self, labels): + # query database + data = self.rc.db_query({'label': {"$nin": ""}}, keys=['msg_id', 'label']) + for d in data: + msg_id = d['msg_id'] + label = d['label'] + assert label in labels + labels.remove(label) + + assert len(labels) == 0 + + def clear_db(self): + self.rc.purge_everything() + + def test_balanced_view(self): + bview = self.rc.load_balanced_view() + map_labels, apply_labels = self.run_tasks(bview) + labels = map_labels * 5 + apply_labels + self.check_labels(labels) + self.clear_db() + + def test_direct_view(self): + dview = self.rc[:] + map_labels, apply_labels = self.run_tasks(dview) + labels = map_labels * 2 + apply_labels * 2 + self.check_labels(labels) + self.clear_db() + + +class TestLabelDictDB(TaskLabelTest, TestCase): + def get_controller_launcher(self): + class dictDB(LocalControllerLauncher): + controller_args = ["--dictdb"] + + return dictDB + + +class TestLabelSqliteDB(TaskLabelTest, TestCase): + def get_controller_launcher(self): + class sqliteDB(LocalControllerLauncher): + controller_args = ["--sqlitedb"] + + return sqliteDB From 171bc98c1bb3b6b54774add1d121d795aa5cdbac Mon Sep 17 00:00:00 2001 From: Johannes Otepka Date: Thu, 12 Feb 2026 18:52:01 +0100 Subject: [PATCH 02/18] tzinfo got lost when storing in mongodb --- ipyparallel/controller/mongodb.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/ipyparallel/controller/mongodb.py b/ipyparallel/controller/mongodb.py index 7f247ac3..ea1883f4 100644 --- a/ipyparallel/controller/mongodb.py +++ b/ipyparallel/controller/mongodb.py @@ -15,6 +15,7 @@ from traitlets import Dict, Instance, List, Unicode from .dictdb import BaseDB +from datetime import datetime, timezone # we need to determine the pymongo version because of API changes. see # https://pymongo.readthedocs.io/en/stable/migrate-to-pymongo4.html @@ -25,6 +26,16 @@ # MongoDB class # ----------------------------------------------------------------------------- +def _ensure_utc(obj): + if isinstance(obj, datetime): + obj = obj.replace(tzinfo=timezone.utc) + return obj + +def _ensure_utc_for_record(rec): + for key in ('submitted', 'started', 'completed', 'received'): + if key in rec: + rec[key] = _ensure_utc(rec[key]) + class MongoDB(BaseDB): """MongoDB TaskRecord backend.""" @@ -91,6 +102,7 @@ def get_record(self, msg_id): if not r: # r will be '' if nothing is found raise KeyError(msg_id) + _ensure_utc_for_record(r) return r def update_record(self, msg_id, rec): @@ -125,6 +137,7 @@ def find_records(self, check, keys=None): matches = list(self._records.find(check, keys)) for rec in matches: rec.pop('_id') + _ensure_utc_for_record(rec) return matches def get_history(self): From 2f1293f234157da846d393d06bf0f2950c4d64cf Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Thu, 12 Feb 2026 17:53:34 +0000 Subject: [PATCH 03/18] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- ipyparallel/controller/mongodb.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ipyparallel/controller/mongodb.py b/ipyparallel/controller/mongodb.py index 6c102fd3..ad580007 100644 --- a/ipyparallel/controller/mongodb.py +++ b/ipyparallel/controller/mongodb.py @@ -11,10 +11,11 @@ except ImportError: from bson import Binary +from datetime import datetime, timezone + from traitlets import Dict, Instance, List, Unicode from .dictdb import BaseDB -from datetime import datetime, timezone # we need to determine the pymongo version because of API changes. see # https://pymongo.readthedocs.io/en/stable/migrate-to-pymongo4.html @@ -25,11 +26,13 @@ # MongoDB class # ----------------------------------------------------------------------------- + def _ensure_utc(obj): if isinstance(obj, datetime): obj = obj.replace(tzinfo=timezone.utc) return obj + def _ensure_utc_for_record(rec): for key in ('submitted', 'started', 'completed', 'received'): if key in rec: From 7f0400a1f4570d97335dec511060cab99c44193e Mon Sep 17 00:00:00 2001 From: Johannes Otepka Date: Thu, 12 Feb 2026 19:07:48 +0100 Subject: [PATCH 04/18] make mongodb tzinfo aware --- ipyparallel/controller/mongodb.py | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/ipyparallel/controller/mongodb.py b/ipyparallel/controller/mongodb.py index 6c102fd3..83cd9c4a 100644 --- a/ipyparallel/controller/mongodb.py +++ b/ipyparallel/controller/mongodb.py @@ -14,7 +14,7 @@ from traitlets import Dict, Instance, List, Unicode from .dictdb import BaseDB -from datetime import datetime, timezone +from bson.codec_options import CodecOptions # we need to determine the pymongo version because of API changes. see # https://pymongo.readthedocs.io/en/stable/migrate-to-pymongo4.html @@ -25,16 +25,6 @@ # MongoDB class # ----------------------------------------------------------------------------- -def _ensure_utc(obj): - if isinstance(obj, datetime): - obj = obj.replace(tzinfo=timezone.utc) - return obj - -def _ensure_utc_for_record(rec): - for key in ('submitted', 'started', 'completed', 'received'): - if key in rec: - rec[key] = _ensure_utc(rec[key]) - class MongoDB(BaseDB): """MongoDB TaskRecord backend.""" @@ -70,8 +60,11 @@ def __init__(self, **kwargs): ) if not self.database: self.database = self.session + options = CodecOptions(tz_aware=True) self._db = self._connection[self.database] - self._records = self._db['task_records'] + self._records = self._db.get_collection("task_records", options) + #self._records = self._db['task_records'] + if pymongo_version_major >= 4: # mimic the old API 3.x self._records.insert = self._records.insert_one @@ -101,7 +94,6 @@ def get_record(self, msg_id): if not r: # r will be '' if nothing is found raise KeyError(msg_id) - _ensure_utc_for_record(r) return r def update_record(self, msg_id, rec): @@ -136,7 +128,6 @@ def find_records(self, check, keys=None): matches = list(self._records.find(check, keys)) for rec in matches: rec.pop('_id') - _ensure_utc_for_record(rec) return matches def get_history(self): From a9e4266ba8d9941b31077c0b8aa26af961fd4a1c Mon Sep 17 00:00:00 2001 From: Johannes Otepka Date: Thu, 12 Feb 2026 19:09:17 +0100 Subject: [PATCH 05/18] make mongodb tzinfo aware --- ipyparallel/controller/mongodb.py | 1 - 1 file changed, 1 deletion(-) diff --git a/ipyparallel/controller/mongodb.py b/ipyparallel/controller/mongodb.py index 0cb55dca..83cd9c4a 100644 --- a/ipyparallel/controller/mongodb.py +++ b/ipyparallel/controller/mongodb.py @@ -94,7 +94,6 @@ def get_record(self, msg_id): if not r: # r will be '' if nothing is found raise KeyError(msg_id) - _ensure_utc_for_record(r) return r def update_record(self, msg_id, rec): From e473c818ede7db8e7d459db5cbf3e784add67b88 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Thu, 12 Feb 2026 18:09:42 +0000 Subject: [PATCH 06/18] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- ipyparallel/controller/mongodb.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ipyparallel/controller/mongodb.py b/ipyparallel/controller/mongodb.py index 83cd9c4a..acf60005 100644 --- a/ipyparallel/controller/mongodb.py +++ b/ipyparallel/controller/mongodb.py @@ -11,10 +11,10 @@ except ImportError: from bson import Binary +from bson.codec_options import CodecOptions from traitlets import Dict, Instance, List, Unicode from .dictdb import BaseDB -from bson.codec_options import CodecOptions # we need to determine the pymongo version because of API changes. see # https://pymongo.readthedocs.io/en/stable/migrate-to-pymongo4.html @@ -63,7 +63,7 @@ def __init__(self, **kwargs): options = CodecOptions(tz_aware=True) self._db = self._connection[self.database] self._records = self._db.get_collection("task_records", options) - #self._records = self._db['task_records'] + # self._records = self._db['task_records'] if pymongo_version_major >= 4: # mimic the old API 3.x From 5762cd60057fe7b1887c3382c3016c7924fb7282 Mon Sep 17 00:00:00 2001 From: Johannes Otepka Date: Thu, 12 Feb 2026 20:13:21 +0100 Subject: [PATCH 07/18] switch to new mongodb api --- ipyparallel/controller/mongodb.py | 33 +++++++++++++------------------ 1 file changed, 14 insertions(+), 19 deletions(-) diff --git a/ipyparallel/controller/mongodb.py b/ipyparallel/controller/mongodb.py index 83cd9c4a..d17378e1 100644 --- a/ipyparallel/controller/mongodb.py +++ b/ipyparallel/controller/mongodb.py @@ -16,11 +16,6 @@ from .dictdb import BaseDB from bson.codec_options import CodecOptions -# we need to determine the pymongo version because of API changes. see -# https://pymongo.readthedocs.io/en/stable/migrate-to-pymongo4.html -pymongo_version_major = int(version.split('.')[0]) -pymongo_version_minor = int(version.split('.')[1]) - # ----------------------------------------------------------------------------- # MongoDB class # ----------------------------------------------------------------------------- @@ -54,6 +49,14 @@ class MongoDB(BaseDB): def __init__(self, **kwargs): super().__init__(**kwargs) + + # make sure that pymongo version is at least 4.x because of API changes. see + # https://pymongo.readthedocs.io/en/stable/migrate-to-pymongo4.html + # for more details + pymongo_version_major = int(version.split('.')[0]) + if pymongo_version_major < 4: + raise Exception(f"pymongo package too old (current version={version}). Please update to version 4.0 or higher") + if self._connection is None: self._connection = MongoClient( *self.connection_args, **self.connection_kwargs @@ -64,16 +67,8 @@ def __init__(self, **kwargs): self._db = self._connection[self.database] self._records = self._db.get_collection("task_records", options) #self._records = self._db['task_records'] - - if pymongo_version_major >= 4: - # mimic the old API 3.x - self._records.insert = self._records.insert_one - self._records.update = self._records.update_one - self._records.ensure_index = self._records.create_index - self._records.remove = self._records.delete_many - - self._records.ensure_index('msg_id', unique=True) - self._records.ensure_index('submitted') # for sorting history + self._records.create_index('msg_id', unique=True) + self._records.create_index('submitted') # for sorting history # for rec in self._records.find def _binary_buffers(self, rec): @@ -86,7 +81,7 @@ def add_record(self, msg_id, rec): """Add a new Task Record, by msg_id.""" # print rec rec = self._binary_buffers(rec) - self._records.insert(rec) + self._records.insert_one(rec) def get_record(self, msg_id): """Get a specific Task Record, by msg_id.""" @@ -100,15 +95,15 @@ def update_record(self, msg_id, rec): """Update the data in an existing record.""" rec = self._binary_buffers(rec) - self._records.update({'msg_id': msg_id}, {'$set': rec}) + self._records.update_one({'msg_id': msg_id}, {'$set': rec}) def drop_matching_records(self, check): """Remove a record from the DB.""" - self._records.remove(check) + self._records.delete_many(check) def drop_record(self, msg_id): """Remove a record from the DB.""" - self._records.remove({'msg_id': msg_id}) + self._records.delete_many({'msg_id': msg_id}) def find_records(self, check, keys=None): """Find records matching a query dict, optionally extracting subset of keys. From 6a36864d3f27ea88b0b8c6417176671d70a53cef Mon Sep 17 00:00:00 2001 From: Johannes Otepka Date: Thu, 12 Feb 2026 20:16:21 +0100 Subject: [PATCH 08/18] mongodb installation added to github actions --- .github/workflows/test.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f38d5d27..6613bde6 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -128,6 +128,23 @@ jobs: pip install distributed joblib pip install --only-binary :all: matplotlib + - name: Start MongoDB + if: ${{ ! matrix.runs_on }} # only under linux/ubuntu + uses: supercharge/mongodb-github-action@1.12.1 # uses latest mongodb per default + + - name: Install pymongo package + if: ${{ ! matrix.runs_on }} # only under linux/ubuntu + run: pip install pymongo + + - name: Try to connect to mongodb + if: ${{ ! matrix.runs_on }} # only under linux/ubuntu + run: | + python3 < Date: Thu, 12 Feb 2026 20:23:52 +0100 Subject: [PATCH 09/18] ruff format changes --- ipyparallel/controller/mongodb.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/ipyparallel/controller/mongodb.py b/ipyparallel/controller/mongodb.py index aa2c1809..45a0f68c 100644 --- a/ipyparallel/controller/mongodb.py +++ b/ipyparallel/controller/mongodb.py @@ -11,10 +11,10 @@ except ImportError: from bson import Binary +from bson.codec_options import CodecOptions from traitlets import Dict, Instance, List, Unicode from .dictdb import BaseDB -from bson.codec_options import CodecOptions # ----------------------------------------------------------------------------- # MongoDB class @@ -55,7 +55,9 @@ def __init__(self, **kwargs): # for more details pymongo_version_major = int(version.split('.')[0]) if pymongo_version_major < 4: - raise Exception(f"pymongo package too old (current version={version}). Please update to version 4.0 or higher") + raise Exception( + f"pymongo package too old (current version={version}). Please update to version 4.0 or higher" + ) if self._connection is None: self._connection = MongoClient( @@ -66,7 +68,7 @@ def __init__(self, **kwargs): options = CodecOptions(tz_aware=True) self._db = self._connection[self.database] self._records = self._db.get_collection("task_records", options) - #self._records = self._db['task_records'] + # self._records = self._db['task_records'] self._records.create_index('msg_id', unique=True) self._records.create_index('submitted') # for sorting history # for rec in self._records.find From 1a2624e6c4a7df63c8a19a16250610a79753584a Mon Sep 17 00:00:00 2001 From: Johannes Otepka Date: Thu, 12 Feb 2026 22:22:11 +0100 Subject: [PATCH 10/18] exclude mongodb isntall from slurm --- .github/workflows/test.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 6613bde6..b56f9f29 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -129,15 +129,15 @@ jobs: pip install --only-binary :all: matplotlib - name: Start MongoDB - if: ${{ ! matrix.runs_on }} # only under linux/ubuntu + if: ${{ ! matrix.runs_on && matrix.cluster_type != 'slurm' }} # only under linux/ubuntu uses: supercharge/mongodb-github-action@1.12.1 # uses latest mongodb per default - name: Install pymongo package - if: ${{ ! matrix.runs_on }} # only under linux/ubuntu + if: ${{ ! matrix.runs_on && matrix.cluster_type != 'slurm' }} # only under linux/ubuntu run: pip install pymongo - name: Try to connect to mongodb - if: ${{ ! matrix.runs_on }} # only under linux/ubuntu + if: ${{ ! matrix.runs_on && matrix.cluster_type != 'slurm' }} # only under linux/ubuntu run: | python3 < Date: Thu, 12 Feb 2026 23:33:32 +0100 Subject: [PATCH 11/18] Update test.yml --- .github/workflows/test.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b56f9f29..867be574 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -129,15 +129,15 @@ jobs: pip install --only-binary :all: matplotlib - name: Start MongoDB - if: ${{ ! matrix.runs_on && matrix.cluster_type != 'slurm' }} # only under linux/ubuntu + if: ${{ ! matrix.runs_on || matrix.cluster_type != 'slurm' }} # only under linux/ubuntu uses: supercharge/mongodb-github-action@1.12.1 # uses latest mongodb per default - name: Install pymongo package - if: ${{ ! matrix.runs_on && matrix.cluster_type != 'slurm' }} # only under linux/ubuntu + if: ${{ ! matrix.runs_on || matrix.cluster_type != 'slurm' }} # only under linux/ubuntu run: pip install pymongo - name: Try to connect to mongodb - if: ${{ ! matrix.runs_on && matrix.cluster_type != 'slurm' }} # only under linux/ubuntu + if: ${{ ! matrix.runs_on || matrix.cluster_type != 'slurm' }} # only under linux/ubuntu run: | python3 < Date: Thu, 12 Feb 2026 23:40:28 +0100 Subject: [PATCH 12/18] Update test.yml --- .github/workflows/test.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 867be574..4cb71e9e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -129,15 +129,15 @@ jobs: pip install --only-binary :all: matplotlib - name: Start MongoDB - if: ${{ ! matrix.runs_on || matrix.cluster_type != 'slurm' }} # only under linux/ubuntu + if: ${{ (! matrix.runs_on) && matrix.cluster_type != 'slurm' }} # only under linux/ubuntu uses: supercharge/mongodb-github-action@1.12.1 # uses latest mongodb per default - name: Install pymongo package - if: ${{ ! matrix.runs_on || matrix.cluster_type != 'slurm' }} # only under linux/ubuntu + if: ${{ (! matrix.runs_on) && matrix.cluster_type != 'slurm' }} # only under linux/ubuntu run: pip install pymongo - name: Try to connect to mongodb - if: ${{ ! matrix.runs_on || matrix.cluster_type != 'slurm' }} # only under linux/ubuntu + if: ${{ (! matrix.runs_on) && matrix.cluster_type != 'slurm' }} # only under linux/ubuntu run: | python3 < Date: Thu, 12 Feb 2026 23:46:53 +0100 Subject: [PATCH 13/18] Update test.yml --- .github/workflows/test.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 4cb71e9e..3b0ed761 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -129,15 +129,15 @@ jobs: pip install --only-binary :all: matplotlib - name: Start MongoDB - if: ${{ (! matrix.runs_on) && matrix.cluster_type != 'slurm' }} # only under linux/ubuntu + if: ${{ (! matrix.runs_on) && (matrix.cluster_type != 'slurm') }} # only under linux/ubuntu uses: supercharge/mongodb-github-action@1.12.1 # uses latest mongodb per default - name: Install pymongo package - if: ${{ (! matrix.runs_on) && matrix.cluster_type != 'slurm' }} # only under linux/ubuntu + if: ${{ (! matrix.runs_on) && (matrix.cluster_type != 'slurm') }} # only under linux/ubuntu run: pip install pymongo - name: Try to connect to mongodb - if: ${{ (! matrix.runs_on) && matrix.cluster_type != 'slurm' }} # only under linux/ubuntu + if: ${{ (! matrix.runs_on) && (matrix.cluster_type != 'slurm') }} # only under linux/ubuntu run: | python3 < Date: Fri, 13 Feb 2026 15:58:19 +0100 Subject: [PATCH 14/18] work-a-round fix for image already exists --- .github/workflows/test.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 3b0ed761..94043b99 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -84,11 +84,14 @@ jobs: - name: Set up slurm if: ${{ matrix.cluster_type == 'slurm' }} + # docker build can lead to race condition -> image "docker.io/library/ipp-cluster:slurm": already exists + # see https://github.com/mlflow/mlflow/pull/20779 + # work-a-round fix: docker compose again if first call failed run: | export DOCKER_BUILDKIT=1 export COMPOSE_DOCKER_CLI_BUILD=1 cd ci/slurm - docker compose up -d --build + docker compose up -d --build || docker compose up -d --build - name: Install Python (conda) ${{ matrix.python }} if: ${{ matrix.cluster_type == 'mpi' }} From 84009a616e568abbdd379665a30337ed76f1ab95 Mon Sep 17 00:00:00 2001 From: Johannes Otepka Date: Fri, 13 Feb 2026 16:16:05 +0100 Subject: [PATCH 15/18] pre-commit format changes --- .github/workflows/test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 94043b99..ac5d9c09 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -86,7 +86,7 @@ jobs: if: ${{ matrix.cluster_type == 'slurm' }} # docker build can lead to race condition -> image "docker.io/library/ipp-cluster:slurm": already exists # see https://github.com/mlflow/mlflow/pull/20779 - # work-a-round fix: docker compose again if first call failed + # work-a-round fix: docker compose again if first call failed run: | export DOCKER_BUILDKIT=1 export COMPOSE_DOCKER_CLI_BUILD=1 @@ -133,7 +133,7 @@ jobs: - name: Start MongoDB if: ${{ (! matrix.runs_on) && (matrix.cluster_type != 'slurm') }} # only under linux/ubuntu - uses: supercharge/mongodb-github-action@1.12.1 # uses latest mongodb per default + uses: supercharge/mongodb-github-action@1.12.1 # uses latest mongodb per default - name: Install pymongo package if: ${{ (! matrix.runs_on) && (matrix.cluster_type != 'slurm') }} # only under linux/ubuntu From 0d94418875b2538014908e39e281fec6a7fef0a6 Mon Sep 17 00:00:00 2001 From: Johannes Otepka Date: Fri, 13 Feb 2026 17:08:27 +0100 Subject: [PATCH 16/18] enable mongodb for slurm test environment as well --- .github/workflows/test.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index ac5d9c09..c1308a78 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -132,15 +132,15 @@ jobs: pip install --only-binary :all: matplotlib - name: Start MongoDB - if: ${{ (! matrix.runs_on) && (matrix.cluster_type != 'slurm') }} # only under linux/ubuntu + if: ${{ ! matrix.runs_on }} # only under linux/ubuntu uses: supercharge/mongodb-github-action@1.12.1 # uses latest mongodb per default - name: Install pymongo package - if: ${{ (! matrix.runs_on) && (matrix.cluster_type != 'slurm') }} # only under linux/ubuntu + if: ${{ ! matrix.runs_on }} # only under linux/ubuntu run: pip install pymongo - name: Try to connect to mongodb - if: ${{ (! matrix.runs_on) && (matrix.cluster_type != 'slurm') }} # only under linux/ubuntu + if: ${{ ! matrix.runs_on }} # only under linux/ubuntu run: | python3 < Date: Fri, 13 Feb 2026 17:46:28 +0100 Subject: [PATCH 17/18] enable mongodb only under linux with no cluster --- .github/workflows/test.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index c1308a78..fdc88c30 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -132,15 +132,15 @@ jobs: pip install --only-binary :all: matplotlib - name: Start MongoDB - if: ${{ ! matrix.runs_on }} # only under linux/ubuntu + if: ${{ (! matrix.runs_on) && (! matrix.cluster_type) }} # only under linux with no cluster uses: supercharge/mongodb-github-action@1.12.1 # uses latest mongodb per default - name: Install pymongo package - if: ${{ ! matrix.runs_on }} # only under linux/ubuntu + if: ${{ (! matrix.runs_on) && (! matrix.cluster_type) }} # only under linux with no cluster run: pip install pymongo - name: Try to connect to mongodb - if: ${{ ! matrix.runs_on }} # only under linux/ubuntu + if: ${{ (! matrix.runs_on) && (! matrix.cluster_type) }} # only under linux with no cluster run: | python3 < Date: Fri, 13 Feb 2026 17:48:24 +0100 Subject: [PATCH 18/18] pre-commit format correction --- .github/workflows/test.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index fdc88c30..b9a249ed 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -132,15 +132,15 @@ jobs: pip install --only-binary :all: matplotlib - name: Start MongoDB - if: ${{ (! matrix.runs_on) && (! matrix.cluster_type) }} # only under linux with no cluster + if: ${{ (! matrix.runs_on) && (! matrix.cluster_type) }} # only under linux with no cluster uses: supercharge/mongodb-github-action@1.12.1 # uses latest mongodb per default - name: Install pymongo package - if: ${{ (! matrix.runs_on) && (! matrix.cluster_type) }} # only under linux with no cluster + if: ${{ (! matrix.runs_on) && (! matrix.cluster_type) }} # only under linux with no cluster run: pip install pymongo - name: Try to connect to mongodb - if: ${{ (! matrix.runs_on) && (! matrix.cluster_type) }} # only under linux with no cluster + if: ${{ (! matrix.runs_on) && (! matrix.cluster_type) }} # only under linux with no cluster run: | python3 <