From ef477d0760079d63e87be3b95ede60559c3d6437 Mon Sep 17 00:00:00 2001 From: "luka.pavageau" Date: Fri, 6 Mar 2026 15:27:19 +0100 Subject: [PATCH 01/40] proposed fix for https://github.com/snakemake/snakemake-executor-plugin-slurm/issues/419 --- snakemake_executor_plugin_slurm/__init__.py | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/snakemake_executor_plugin_slurm/__init__.py b/snakemake_executor_plugin_slurm/__init__.py index 7d3aaf83..db0616de 100644 --- a/snakemake_executor_plugin_slurm/__init__.py +++ b/snakemake_executor_plugin_slurm/__init__.py @@ -355,6 +355,18 @@ def __post_init__(self): auto_deploy_default_storage_provider=False, ) +def _select_logdir(workflow) : + """Selects where slurm_logdir should be created""" + logdir = workflow.executor_settings.logdir + # logdir is defined as absolute, keep "as is" + if logdir and str(logdir).startswith("/"): + return Path(logdir) + # logdir is relative, we ensure it stays relative to the wokflow's workdir + elif logdir : + return Path(workflow.workdir_init) / workflow.executor_settings.logdir + # logdir is unset + else : + return Path(".snakemake/slurm_logs").resolve() # Required: # Implementation of your executor @@ -398,11 +410,7 @@ def __post_init__(self, test_mode: bool = False): self._status_query_min_seconds = None self._status_query_max_seconds = 0.0 self._status_query_cycle_rows = [] - self.slurm_logdir = ( - Path(self.workflow.executor_settings.logdir) - if self.workflow.executor_settings.logdir - else Path(".snakemake/slurm_logs").resolve() - ) + self.slurm_logdir = _select_logdir(self.workflow) # Check the environment variable "SNAKEMAKE_SLURM_PARTITIONS", # if set, read the partitions from the given file. Let the CLI # option override this behavior. From b1df606c37d9a9f1f994c0c40f29348fe6fd6d51 Mon Sep 17 00:00:00 2001 From: meesters Date: Wed, 17 Jun 2026 16:38:48 +0200 Subject: [PATCH 02/40] feat: first non-tested, intermediate version --- pixi.toml | 27 ++++++++++++++++++++++++ pyproject.toml | 16 +++++++++----- setup.cfg | 9 -------- setup.py.bck | 57 ++++++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 95 insertions(+), 14 deletions(-) create mode 100644 pixi.toml delete mode 100644 setup.cfg create mode 100644 setup.py.bck diff --git a/pixi.toml b/pixi.toml new file mode 100644 index 00000000..1b896efb --- /dev/null +++ b/pixi.toml @@ -0,0 +1,27 @@ +[project] +name = "snakemake-executor-plugin-slurm" +channels = ["conda-forge", "bioconda"] +platforms = ["linux-64"] + +[dependencies] +python = "3.11.*" +ruff = ">=0.10.0,<0.11" +pytest = ">=9.0.3,<10" +coverage = ">=7.14.0,<8" +snakemake = ">=9.21.0,<10" + +[feature.dev.pypi-dependencies] +snakemake-executor-plugin-slurm = { path = ".", editable = true } + +[feature.conda_pkg.dependencies] +snakemake-executor-plugin-slurm = "==2.7.1" + +[environments] +default = { features = ["dev"] } +conda-pkg = { features = ["conda_pkg"] } + +[tasks] +format = "ruff format" +lint = "ruff check" +test = "coverage run -m pytest tests/ -sv --tb=short --disable-warnings" +coverage-report = "coverage report -m" \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 4dc84588..2b42073a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -20,12 +20,11 @@ snakemake-interface-executor-plugins = ">=9.4.0,<10" snakemake-executor-plugin-slurm-jobstep = ">=0.6.0,<1" pandas = ">=2.3.3,<4" numpy = ">=2.4.5,<3" -throttler = ">=1.2.3,<2" +throttler = ">=1.2.2,<2" pyyaml = ">=6.0.3,<7" [tool.poetry.group.dev.dependencies] -black = "==26.3.1" -flake8 = ">=6.1.0,<7" +ruff = ">=0.10.0,<0.11" coverage = ">=7.14.0,<8" pytest = ">=9.0.3,<10" snakemake = ">=9.21.0,<10" @@ -37,9 +36,16 @@ generate-slurm-partition-config = "snakemake_executor_plugin_slurm.cli:main" [tool.coverage.run] omit = [".*", "*/site-packages/*", "Snakefile"] -[tool.black] +[tool.ruff] line-length = 88 -extend-exclude = 'tests/test_scontrol_parsing\.py' +target-version = "py311" +extend-exclude = ["tests/test_scontrol_parsing.py"] + +[tool.ruff.lint] +ignore = ["E203"] + +[tool.ruff.lint.per-file-ignores] +"tests/test_scontrol_parsing.py" = ["E501"] [tool.pytest.ini_options] python_files = ["test_*.py", "tests.py"] diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index 34599d0e..00000000 --- a/setup.cfg +++ /dev/null @@ -1,9 +0,0 @@ -[flake8] -# Recommend matching the black line length (default 88), -# rather than using the flake8 default of 79: -max-line-length = 88 -extend-ignore = - # See https://github.com/PyCQA/pycodestyle/issues/373 - E203, -per-file-ignores = - tests/test_scontrol_parsing.py:E501 \ No newline at end of file diff --git a/setup.py.bck b/setup.py.bck new file mode 100644 index 00000000..d49d55ab --- /dev/null +++ b/setup.py.bck @@ -0,0 +1,57 @@ +import os +from setuptools import setup, find_packages, Extension +from Cython.Build import cythonize +import toml + +# Parse pyproject.toml for metadata +pyproject_path = os.path.join(os.path.dirname(__file__), "pyproject.toml") +with open(pyproject_path, "r") as f: + pyproject = toml.load(f) + +project = pyproject.get("tool", {}).get("poetry", {}) +dependencies = pyproject.get("tool", {}).get("poetry", {}).get("dependencies", {}).copy() + +# Remove python version constraint from dependencies +dependencies.pop("python", None) +dependencies.pop("Cython", None) + +# Collect all .py files in snakemake_executor_plugin_slurm directory for Cython compilation +base_dir = "snakemake_executor_plugin_slurm" +py_files = [] + +for filename in os.listdir(base_dir): + if filename.endswith(".py"): + file_path = os.path.join(base_dir, filename) + py_files.append(file_path) + +# Create a single Extension with all Python files +extensions = [ + Extension( + 'snakemake_executor_plugin_slurm._core', + py_files + ) +] + +# gcc arguments for optimization +os.environ["CFLAGS"] = "-O3" + +setup( + name=project.get("name", "snakemake-executor-plugin-slurm"), + version=project.get("version", "2.1.0"), + description=project.get("description", ""), + author=", ".join(project.get("authors", [])), + license=project.get("license", ""), + url=project.get("repository", ""), + py_modules=[], + ext_modules=cythonize(extensions, language_level=3, compiler_directives={"linetrace": True}), + install_requires=list(dependencies.keys()), + classifiers=[ + "Programming Language :: Python :: 3", + "License :: OSI Approved :: MIT License", + "Operating System :: OS Independent", + ], +) + + + + From 10e947d8aee26055003791da7971e7245c7dd001 Mon Sep 17 00:00:00 2001 From: Christian Meesters Date: Thu, 18 Jun 2026 18:41:46 +0200 Subject: [PATCH 03/40] fix: relaxing system requirements for local cluster OS --- pixi.toml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pixi.toml b/pixi.toml index 1b896efb..7af18a1b 100644 --- a/pixi.toml +++ b/pixi.toml @@ -24,4 +24,7 @@ conda-pkg = { features = ["conda_pkg"] } format = "ruff format" lint = "ruff check" test = "coverage run -m pytest tests/ -sv --tb=short --disable-warnings" -coverage-report = "coverage report -m" \ No newline at end of file +coverage-report = "coverage report -m" + +[system-requirements] +linux = "4.18" From f4a13a8430fefb65977fc956be6551072a726f4a Mon Sep 17 00:00:00 2001 From: meesters Date: Fri, 19 Jun 2026 10:06:45 +0200 Subject: [PATCH 04/40] fix: updated checkout versions --- .github/workflows/ci.yml | 38 +++++++++++++------------------------- 1 file changed, 13 insertions(+), 25 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f5954074..f93c6acf 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,41 +11,25 @@ jobs: runs-on: ubuntu-latest steps: - name: Check out the code - uses: actions/checkout@v4 + uses: actions/checkout@v6 - - uses: actions/setup-python@v5 - with: - python-version: "3.11" - - - name: Install poetry - run: pip install poetry - - - name: Install dependencies - run: | - poetry install --sync + - name: Setup pixi + uses: prefix-dev/setup-pixiv0 - name: Check formatting - run: poetry run black --check . + run: pixi run format --check . linting: runs-on: ubuntu-latest steps: - name: Check out the code - uses: actions/checkout@v4 - - - uses: actions/setup-python@v5 - with: - python-version: "3.11" + uses: actions/checkout@v6 - - name: Install poetry - run: pip install poetry - - - name: Install dependencies - run: | - poetry install --sync + - name: Setup pixi + uses: prefix-dev/setup-pixiv0 - name: Check code - run: poetry run flake8 + run: poetry run lint testing: runs-on: ubuntu-latest @@ -58,10 +42,14 @@ jobs: - "8888:3306" options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3 steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - uses: koesterlab/setup-slurm-action@v1 + - name: Setup pixi + uses: prefix-dev/setup-pixiv0 + + - uses: actions/setup-python@v5 with: python-version: "3.11" From 7092cdc63a70b16ea62978f06feb37422fa1b5f1 Mon Sep 17 00:00:00 2001 From: meesters Date: Fri, 19 Jun 2026 10:11:13 +0200 Subject: [PATCH 05/40] fix: typo --- .github/workflows/ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f93c6acf..e2ae3394 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,7 +14,7 @@ jobs: uses: actions/checkout@v6 - name: Setup pixi - uses: prefix-dev/setup-pixiv0 + uses: prefix-dev/setup-pixi@v0 - name: Check formatting run: pixi run format --check . @@ -26,7 +26,7 @@ jobs: uses: actions/checkout@v6 - name: Setup pixi - uses: prefix-dev/setup-pixiv0 + uses: prefix-dev/setup-pixi@v0 - name: Check code run: poetry run lint @@ -47,7 +47,7 @@ jobs: - uses: koesterlab/setup-slurm-action@v1 - name: Setup pixi - uses: prefix-dev/setup-pixiv0 + uses: prefix-dev/setup-pixi@v0 - uses: actions/setup-python@v5 From 6c13ec8bd922bcf4248a85ae57ad671d86675ac3 Mon Sep 17 00:00:00 2001 From: meesters Date: Fri, 19 Jun 2026 10:27:24 +0200 Subject: [PATCH 06/40] refactor: updates --- .github/workflows/release-please.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml index 3ea672d1..dd851322 100644 --- a/.github/workflows/release-please.yml +++ b/.github/workflows/release-please.yml @@ -11,7 +11,7 @@ jobs: outputs: release_created: ${{ steps.release.outputs.release_created }} steps: - - uses: googleapis/release-please-action@v4 + - uses: googleapis/release-please-action@v5 id: release with: release-type: python @@ -22,11 +22,11 @@ jobs: needs: release-please if: ${{ needs.release-please.outputs.release_created }} steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - - uses: actions/setup-python@v5 + - uses: actions/setup-python@v6 with: - python-version: "3.11" + python-version: "3.12" - name: Install poetry run: pip install poetry @@ -34,9 +34,9 @@ jobs: - name: Determine dependencies run: poetry lock - - uses: actions/setup-python@v5 + - uses: actions/setup-python@v6 with: - python-version: "3.11" + python-version: "3.12" cache: poetry - name: Install dependencies From 40fc0dedab0c996d0f3523744e76e9c52d903920 Mon Sep 17 00:00:00 2001 From: meesters Date: Fri, 19 Jun 2026 10:36:02 +0200 Subject: [PATCH 07/40] fix: formatting --- snakemake_executor_plugin_slurm/__init__.py | 9 +++------ tests/tests.py | 6 +++--- upgrade_dependencies.py | 2 +- 3 files changed, 7 insertions(+), 10 deletions(-) diff --git a/snakemake_executor_plugin_slurm/__init__.py b/snakemake_executor_plugin_slurm/__init__.py index 8c6092c9..cbc56a00 100644 --- a/snakemake_executor_plugin_slurm/__init__.py +++ b/snakemake_executor_plugin_slurm/__init__.py @@ -510,8 +510,7 @@ def __post_init__(self, test_mode: bool = False): "the array_limit setting to enable array job submission." ) raise WorkflowError( - "Array job submission is effectively disabled due to " - "low array_limit." + "Array job submission is effectively disabled due to low array_limit." ) self.slurm_logdir = _select_logdir(self.workflow) # Check the environment variable "SNAKEMAKE_SLURM_PARTITIONS", @@ -675,10 +674,8 @@ def run_jobs(self, jobs: List[JobExecutorInterface]): "all" in self.array_jobs or rule_name in self.array_jobs ) # TODO: use more sensible logging information, once finished - self.logger.debug( - f"Running jobs for rule: {rule_name}, " f"{same_rule_jobs}" - ) - self.logger.debug("Current array job settings: " f"{self.array_jobs}") + self.logger.debug(f"Running jobs for rule: {rule_name}, {same_rule_jobs}") + self.logger.debug(f"Current array job settings: {self.array_jobs}") if array_selected_for_rule: dag = getattr(self.workflow, "dag", None) diff --git a/tests/tests.py b/tests/tests.py index 0f78f1b5..35874bca 100644 --- a/tests/tests.py +++ b/tests/tests.py @@ -184,9 +184,9 @@ def test_simple_workflow(self, tmp_path): report_found = True report_path = os.path.join(expected_path, fname) # Verify it's not empty - assert ( - os.stat(report_path).st_size > 0 - ), f"Efficiency report {report_path} is empty" + assert os.stat(report_path).st_size > 0, ( + f"Efficiency report {report_path} is empty" + ) break assert report_found, "Efficiency report file not found" diff --git a/upgrade_dependencies.py b/upgrade_dependencies.py index 398e8952..99ffd36f 100644 --- a/upgrade_dependencies.py +++ b/upgrade_dependencies.py @@ -58,7 +58,7 @@ def sensible_range(ver): if not m: return None major, minor, patch = map(int, m.groups()) - return f">={major}.{minor}.{patch},<{major+1}" + return f">={major}.{minor}.{patch},<{major + 1}" print("Upgrading pyproject.toml dependencies to sensible ranges...") print(f"(dry-run mode: {dry_run})\n") From 65add9cff9ca56ade09649660919b9fa5cd1fa4d Mon Sep 17 00:00:00 2001 From: meesters Date: Fri, 19 Jun 2026 11:26:27 +0200 Subject: [PATCH 08/40] refactor: sould resemble snakemake's main release script --- .github/workflows/release-please.yml | 65 ++++++++++++++-------------- 1 file changed, 33 insertions(+), 32 deletions(-) diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml index dd851322..2f98163a 100644 --- a/.github/workflows/release-please.yml +++ b/.github/workflows/release-please.yml @@ -8,43 +8,44 @@ name: release-please jobs: release-please: runs-on: ubuntu-latest - outputs: - release_created: ${{ steps.release.outputs.release_created }} steps: - - uses: googleapis/release-please-action@v5 - id: release - with: - release-type: python + + - uses: googleapis/release-please-action@v5 + id: release + with: release-type: python token: ${{ secrets.RELEASE_PLEASE_PR_CI_TOKEN }} - publish: - runs-on: ubuntu-latest - needs: release-please - if: ${{ needs.release-please.outputs.release_created }} - steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@v6 + if: ${{ steps.release.outputs.release_created }} + with: + fetch-depth: 0 - - uses: actions/setup-python@v6 - with: - python-version: "3.12" + - name: Set up Pixi + if: ${{ steps.release.outputs.release_created }} + uses: prefix/setup-pixi@v0.9.6 - - name: Install poetry - run: pip install poetry + - name: Build and check package + if: ${{ steps.release.outputs.release_created }} + run: | + pixi run --environment publish build-check - - name: Determine dependencies - run: poetry lock + - name: Publish to PyPI + if: ${{ steps.release.outputs.release_created }} + uses: pypa/gh-action-pypi-publish@release/v1 + with: + user: __token__ + - - uses: actions/setup-python@v6 + + + + + outputs: + release_created: ${{ steps.release.outputs.release_created }} + steps: + - uses: googleapis/release-please-action@v5 + id: release with: - python-version: "3.12" - cache: poetry - - - name: Install dependencies - run: | - poetry install - - - name: Publish to PyPi - env: - PYPI_USERNAME: __token__ - PYPI_PASSWORD: ${{ secrets.PYPI_TOKEN }} - run: poetry publish --build --username $PYPI_USERNAME --password $PYPI_PASSWORD + release-type: python + token: ${{ secrets.RELEASE_PLEASE_PR_CI_TOKEN }} + password: ${{ secrets.PYPI_TOKEN }} From 8ecf6204995641fcd65b40bb8ae3719d227af36f Mon Sep 17 00:00:00 2001 From: meesters Date: Fri, 19 Jun 2026 12:04:59 +0200 Subject: [PATCH 09/40] fix: poetry -> pixi --- .github/workflows/ci.yml | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e2ae3394..3a718581 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -29,7 +29,7 @@ jobs: uses: prefix-dev/setup-pixi@v0 - name: Check code - run: poetry run lint + run: pixi run lint testing: runs-on: ubuntu-latest @@ -49,20 +49,8 @@ jobs: - name: Setup pixi uses: prefix-dev/setup-pixi@v0 - - - uses: actions/setup-python@v5 - with: - python-version: "3.11" - - - name: Install poetry - run: pip install poetry - - - name: Install dependencies - run: | - poetry install --sync - - name: Run pytest - run: poetry run coverage run -m pytest tests/ -sv --tb=short --disable-warnings + run: pixi run test - name: Run Coverage - run: poetry run coverage report -m + run: pixi run coverage-report From f01b42c178fa18756d3b203c3100005e77c6a635 Mon Sep 17 00:00:00 2001 From: meesters Date: Fri, 19 Jun 2026 12:10:54 +0200 Subject: [PATCH 10/40] refactor: release please versions --- .github/workflows/release-please.yml | 54 +++++++++++----------------- 1 file changed, 21 insertions(+), 33 deletions(-) diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml index 2f98163a..e4526e34 100644 --- a/.github/workflows/release-please.yml +++ b/.github/workflows/release-please.yml @@ -9,43 +9,31 @@ jobs: release-please: runs-on: ubuntu-latest steps: - - - uses: googleapis/release-please-action@v5 - id: release - with: release-type: python + - uses: googleapis/release-please-action@v5 + id: release + with: + release-type: python token: ${{ secrets.RELEASE_PLEASE_PR_CI_TOKEN }} - - uses: actions/checkout@v6 - if: ${{ steps.release.outputs.release_created }} - with: - fetch-depth: 0 - - - name: Set up Pixi - if: ${{ steps.release.outputs.release_created }} - uses: prefix/setup-pixi@v0.9.6 - - - name: Build and check package - if: ${{ steps.release.outputs.release_created }} - run: | - pixi run --environment publish build-check - - - name: Publish to PyPI - if: ${{ steps.release.outputs.release_created }} - uses: pypa/gh-action-pypi-publish@release/v1 - with: - user: __token__ - + - uses: actions/checkout@v6 + if: ${{ steps.release.outputs.release_created }} + with: + fetch-depth: 0 + - uses: actions/setup-python@v6 + if: ${{ steps.release.outputs.release_created }} + with: + python-version: "3.11" + - name: Build package + if: ${{ steps.release.outputs.release_created }} + run: | + python -m pip install --upgrade pip build + python -m build - - - outputs: - release_created: ${{ steps.release.outputs.release_created }} - steps: - - uses: googleapis/release-please-action@v5 - id: release + - name: Publish to PyPI + if: ${{ steps.release.outputs.release_created }} + uses: pypa/gh-action-pypi-publish@release/v1 with: - release-type: python - token: ${{ secrets.RELEASE_PLEASE_PR_CI_TOKEN }} + user: __token__ password: ${{ secrets.PYPI_TOKEN }} From 0bc77b9ca9c56bb35b04f3bc92e3fbf69f847f5f Mon Sep 17 00:00:00 2001 From: meesters Date: Fri, 19 Jun 2026 12:14:05 +0200 Subject: [PATCH 11/40] fix: the setup experiment does not belong to the repo - has been accidentally pushed --- setup.py.bck | 57 ---------------------------------------------------- 1 file changed, 57 deletions(-) delete mode 100644 setup.py.bck diff --git a/setup.py.bck b/setup.py.bck deleted file mode 100644 index d49d55ab..00000000 --- a/setup.py.bck +++ /dev/null @@ -1,57 +0,0 @@ -import os -from setuptools import setup, find_packages, Extension -from Cython.Build import cythonize -import toml - -# Parse pyproject.toml for metadata -pyproject_path = os.path.join(os.path.dirname(__file__), "pyproject.toml") -with open(pyproject_path, "r") as f: - pyproject = toml.load(f) - -project = pyproject.get("tool", {}).get("poetry", {}) -dependencies = pyproject.get("tool", {}).get("poetry", {}).get("dependencies", {}).copy() - -# Remove python version constraint from dependencies -dependencies.pop("python", None) -dependencies.pop("Cython", None) - -# Collect all .py files in snakemake_executor_plugin_slurm directory for Cython compilation -base_dir = "snakemake_executor_plugin_slurm" -py_files = [] - -for filename in os.listdir(base_dir): - if filename.endswith(".py"): - file_path = os.path.join(base_dir, filename) - py_files.append(file_path) - -# Create a single Extension with all Python files -extensions = [ - Extension( - 'snakemake_executor_plugin_slurm._core', - py_files - ) -] - -# gcc arguments for optimization -os.environ["CFLAGS"] = "-O3" - -setup( - name=project.get("name", "snakemake-executor-plugin-slurm"), - version=project.get("version", "2.1.0"), - description=project.get("description", ""), - author=", ".join(project.get("authors", [])), - license=project.get("license", ""), - url=project.get("repository", ""), - py_modules=[], - ext_modules=cythonize(extensions, language_level=3, compiler_directives={"linetrace": True}), - install_requires=list(dependencies.keys()), - classifiers=[ - "Programming Language :: Python :: 3", - "License :: OSI Approved :: MIT License", - "Operating System :: OS Independent", - ], -) - - - - From 0e25162904a1d8dd2a8e721749645e0ce0594c59 Mon Sep 17 00:00:00 2001 From: meesters Date: Fri, 19 Jun 2026 12:15:27 +0200 Subject: [PATCH 12/40] fix: not applying E501 exception to scontrol parsing test any longer --- pyproject.toml | 3 --- 1 file changed, 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 2b42073a..5e8e1f88 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -44,9 +44,6 @@ extend-exclude = ["tests/test_scontrol_parsing.py"] [tool.ruff.lint] ignore = ["E203"] -[tool.ruff.lint.per-file-ignores] -"tests/test_scontrol_parsing.py" = ["E501"] - [tool.pytest.ini_options] python_files = ["test_*.py", "tests.py"] From a8811883708791cf42d39f7b9f37fa98b4fa6198 Mon Sep 17 00:00:00 2001 From: Christian Meesters Date: Mon, 22 Jun 2026 15:21:01 +0200 Subject: [PATCH 13/40] fix: deleted unnecessarry pixi.toml file --- pixi.toml | 30 ------------------------------ 1 file changed, 30 deletions(-) delete mode 100644 pixi.toml diff --git a/pixi.toml b/pixi.toml deleted file mode 100644 index 7af18a1b..00000000 --- a/pixi.toml +++ /dev/null @@ -1,30 +0,0 @@ -[project] -name = "snakemake-executor-plugin-slurm" -channels = ["conda-forge", "bioconda"] -platforms = ["linux-64"] - -[dependencies] -python = "3.11.*" -ruff = ">=0.10.0,<0.11" -pytest = ">=9.0.3,<10" -coverage = ">=7.14.0,<8" -snakemake = ">=9.21.0,<10" - -[feature.dev.pypi-dependencies] -snakemake-executor-plugin-slurm = { path = ".", editable = true } - -[feature.conda_pkg.dependencies] -snakemake-executor-plugin-slurm = "==2.7.1" - -[environments] -default = { features = ["dev"] } -conda-pkg = { features = ["conda_pkg"] } - -[tasks] -format = "ruff format" -lint = "ruff check" -test = "coverage run -m pytest tests/ -sv --tb=short --disable-warnings" -coverage-report = "coverage report -m" - -[system-requirements] -linux = "4.18" From 7e246ed8dbbd8d75c88564e68879005b5e8ebfcd Mon Sep 17 00:00:00 2001 From: meesters Date: Tue, 23 Jun 2026 09:11:47 +0200 Subject: [PATCH 14/40] fix: working pyproject toml version --- pyproject.toml | 105 ++++++++++++++++++++++++++++++++++++------------- 1 file changed, 77 insertions(+), 28 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 5e8e1f88..e19963f3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,37 +1,90 @@ -[tool.poetry] +[build-system] +requires = ["setuptools>=64"] +build-backend = "setuptools.build_meta" + +[project] name = "snakemake-executor-plugin-slurm" version = "2.7.1" description = "A Snakemake executor plugin for submitting jobs to a SLURM cluster." -authors = [ - "Christian Meesters ", - "David Lähnemann ", - "Johannes Koester ", -] readme = "README.md" +requires-python = ">=3.11" license = "MIT" -repository = "https://github.com/snakemake/snakemake-executor-plugin-slurm" -documentation = "https://snakemake.github.io/snakemake-plugin-catalog/plugins/executor/slurm.html" +authors = [ + { name = "Christian Meesters", email = "meesters@uni-mainz.de" }, + { name = "David Lähnemann", email = "david.laehnemann@dkfz-heidelberg.de" }, + { name = "Johannes Koester", email = "johannes.koester@uni-due.de" }, +] +classifiers = [ + "Development Status :: 5 - Production/Stable", + "Environment :: Console", + "Intended Audience :: Science/Research", + "Natural Language :: English", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", + "Topic :: Scientific/Engineering", +] + keywords = ["snakemake", "plugin", "executor", "cluster", "slurm"] +dependencies = [ + "snakemake-interface-common>=1.23.0,<2", + "snakemake-interface-executor-plugins>=9.4.0,<10", + "snakemake-executor-plugin-slurm-jobstep>=0.6.0,<1", + "pandas>=2.3.3,<4", + "numpy>=2.4.5,<3", + "throttler>=1.2.2,<2", + "pyyaml>=6.0.3,<7", +] -[tool.poetry.dependencies] -python = "^3.11" -snakemake-interface-common = ">=1.23.0,<2" -snakemake-interface-executor-plugins = ">=9.4.0,<10" -snakemake-executor-plugin-slurm-jobstep = ">=0.6.0,<1" -pandas = ">=2.3.3,<4" -numpy = ">=2.4.5,<3" -throttler = ">=1.2.2,<2" -pyyaml = ">=6.0.3,<7" - -[tool.poetry.group.dev.dependencies] -ruff = ">=0.10.0,<0.11" -coverage = ">=7.14.0,<8" +[project.urls] +Repository = "https://github.com/snakemake/snakemake-executor-plugin-slurm" +Documentation = "https://snakemake.github.io/snakemake-plugin-catalog/plugins/executor/slurm.html" + +[project.scripts] +generate-slurm-partition-config = "snakemake_executor_plugin_slurm.cli:main" + +[tool.setuptools.packages.find] +include = ["snakemake_executor_plugin_slurm*"] + + +[tool.codespell] +# Ref: https://github.com/codespell-project/codespell#using-a-config-file +skip = '.git,*.pdf,*.svg,versioneer.py,*.css,test_*' +check-hidden = true + +#################################################################### +# Pixi Configuration +#################################################################### +[tool.pixi.workspace] +name = "snakemake-executor-plugin-slurm" +channels = ["conda-forge", "bioconda"] +platforms = ["linux-64"] + +[tool.pixi.dependencies] +python = ">=3.11,<3.14" + +[tool.pixi.pypi-dependencies] +snakemake-executor-plugin-slurm = { path = ".", editable = true } + +[tool.pixi.environments] +dev = { features = ["test", "style"] } + +[tool.pixi.feature.test.pypi-dependencies] pytest = ">=9.0.3,<10" +coverage = ">=7.14.0,<8" snakemake = ">=9.21.0,<10" -pandas = ">=2.3.3,<4" -[tool.poetry.scripts] -generate-slurm-partition-config = "snakemake_executor_plugin_slurm.cli:main" +[tool.pixi.feature.test.tasks] +test = { cmd = "pytest" } +coverage-report = { cmd = "coverage run -m pytest && coverage report -m" } + +[tool.pixi.feature.style.pypi-dependencies] +ruff = ">=0.10.0,<0.11" + +[tool.pixi.feature.style.tasks] +format = { cmd = "ruff format" } +lint = { cmd = "ruff check ." } [tool.coverage.run] omit = [".*", "*/site-packages/*", "Snakefile"] @@ -46,7 +99,3 @@ ignore = ["E203"] [tool.pytest.ini_options] python_files = ["test_*.py", "tests.py"] - -[build-system] -requires = ["poetry-core"] -build-backend = "poetry.core.masonry.api" From f27d7e2d179015a5827a809fa1d700b07266e5dd Mon Sep 17 00:00:00 2001 From: meesters Date: Tue, 23 Jun 2026 09:54:40 +0200 Subject: [PATCH 15/40] fix: restored functionality of release-please - hopefully --- .github/workflows/release-please.yml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml index e4526e34..de822959 100644 --- a/.github/workflows/release-please.yml +++ b/.github/workflows/release-please.yml @@ -9,6 +9,7 @@ jobs: release-please: runs-on: ubuntu-latest steps: + - uses: googleapis/release-please-action@v5 id: release with: @@ -20,16 +21,17 @@ jobs: with: fetch-depth: 0 - - uses: actions/setup-python@v6 + - name: Set up Pixi if: ${{ steps.release.outputs.release_created }} + uses: prefix-dev/setup-pixi@v0.9.6 with: - python-version: "3.11" + environments: quality + cache: true - - name: Build package + - name: Build and check package if: ${{ steps.release.outputs.release_created }} run: | - python -m pip install --upgrade pip build - python -m build + pixi run --environment publish build-check - name: Publish to PyPI if: ${{ steps.release.outputs.release_created }} From 3521d667f97db832eb82bcf747f8abfa22fc8421 Mon Sep 17 00:00:00 2001 From: Christian Meesters Date: Tue, 23 Jun 2026 18:52:45 +0200 Subject: [PATCH 16/40] fix: attempt to run pixi install correctly --- pyproject.toml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index e19963f3..4142cea0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -7,7 +7,7 @@ name = "snakemake-executor-plugin-slurm" version = "2.7.1" description = "A Snakemake executor plugin for submitting jobs to a SLURM cluster." readme = "README.md" -requires-python = ">=3.11" +requires-python = ">=3.11,<4" license = "MIT" authors = [ { name = "Christian Meesters", email = "meesters@uni-mainz.de" }, @@ -63,6 +63,12 @@ platforms = ["linux-64"] [tool.pixi.dependencies] python = ">=3.11,<3.14" +pip = ">=24,<26" +packaging = ">=24,<26" +poetry = ">=2.4.1" # for local use + +[tool.pixi.tasks] +install = { cmd = "poetry install" } [tool.pixi.pypi-dependencies] snakemake-executor-plugin-slurm = { path = ".", editable = true } From da3151ab97aac410182ecde1ad67caf932b68ae8 Mon Sep 17 00:00:00 2001 From: Christian Meesters Date: Tue, 23 Jun 2026 19:54:21 +0200 Subject: [PATCH 17/40] fix: added publish and build envs and check --- pyproject.toml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index 4142cea0..60754c9f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -75,6 +75,8 @@ snakemake-executor-plugin-slurm = { path = ".", editable = true } [tool.pixi.environments] dev = { features = ["test", "style"] } +quality = { features = ["style"] } +publish = { features = ["build"] } [tool.pixi.feature.test.pypi-dependencies] pytest = ">=9.0.3,<10" @@ -92,6 +94,13 @@ ruff = ">=0.10.0,<0.11" format = { cmd = "ruff format" } lint = { cmd = "ruff check ." } +[tool.pixi.feature.build.pypi-dependencies] +build = "*" +twine = "*" + +[tool.pixi.feature.build.tasks] +build-check = { cmd = "python -m build && twine check dist/*" } + [tool.coverage.run] omit = [".*", "*/site-packages/*", "Snakefile"] From 3f6aa2614ddfe2ab2bbf6eb632dece90187c9158 Mon Sep 17 00:00:00 2001 From: Christian Meesters Date: Tue, 23 Jun 2026 20:54:22 +0200 Subject: [PATCH 18/40] fix: cleanup (removed empty task) --- pyproject.toml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 60754c9f..389e7cf2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -65,10 +65,6 @@ platforms = ["linux-64"] python = ">=3.11,<3.14" pip = ">=24,<26" packaging = ">=24,<26" -poetry = ">=2.4.1" # for local use - -[tool.pixi.tasks] -install = { cmd = "poetry install" } [tool.pixi.pypi-dependencies] snakemake-executor-plugin-slurm = { path = ".", editable = true } From 02f034d723bafdaebed317d960b6870e02a6dd04 Mon Sep 17 00:00:00 2001 From: Christian Meesters Date: Tue, 23 Jun 2026 20:54:58 +0200 Subject: [PATCH 19/40] fix: added minor versions for actions - no need to update for every fix --- .github/workflows/release-please.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml index de822959..17f9288c 100644 --- a/.github/workflows/release-please.yml +++ b/.github/workflows/release-please.yml @@ -10,13 +10,13 @@ jobs: runs-on: ubuntu-latest steps: - - uses: googleapis/release-please-action@v5 + - uses: googleapis/release-please-action@v5.0 id: release with: release-type: python token: ${{ secrets.RELEASE_PLEASE_PR_CI_TOKEN }} - - uses: actions/checkout@v6 + - uses: actions/checkout@v6.0 if: ${{ steps.release.outputs.release_created }} with: fetch-depth: 0 From db1f47fad8c4618c40bd6dc3b19c4cfd2925df58 Mon Sep 17 00:00:00 2001 From: Christian Meesters Date: Wed, 24 Jun 2026 09:00:38 +0200 Subject: [PATCH 20/40] fix: need to specify dev env? + explicit install step --- .github/workflows/ci.yml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3a718581..fdc8d560 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,7 +17,7 @@ jobs: uses: prefix-dev/setup-pixi@v0 - name: Check formatting - run: pixi run format --check . + run: pixi run --environment quality format --check . linting: runs-on: ubuntu-latest @@ -29,7 +29,7 @@ jobs: uses: prefix-dev/setup-pixi@v0 - name: Check code - run: pixi run lint + run: pixi run --environment quality lint testing: runs-on: ubuntu-latest @@ -49,8 +49,11 @@ jobs: - name: Setup pixi uses: prefix-dev/setup-pixi@v0 + - name: Install package for plugin discovery + run: pixi run --environment dev python -m pip install -e . + - name: Run pytest - run: pixi run test + run: pixi run --environment dev test - name: Run Coverage - run: pixi run coverage-report + run: pixi run --environment dev coverage-report From 0c22b8b4a60c69c605fbdd71933a85794a66cb42 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 24 Jun 2026 07:12:11 +0000 Subject: [PATCH 21/40] fix: install package in non-editable mode for plugin discovery --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fdc8d560..4c0dfcb7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -50,7 +50,7 @@ jobs: uses: prefix-dev/setup-pixi@v0 - name: Install package for plugin discovery - run: pixi run --environment dev python -m pip install -e . + run: pixi run --environment dev python -m pip install . - name: Run pytest run: pixi run --environment dev test From f4fa3522ae31cedca3b1314040b2b86615c8cc0d Mon Sep 17 00:00:00 2001 From: Christian Meesters Date: Wed, 24 Jun 2026 09:57:13 +0200 Subject: [PATCH 22/40] fix: another attempt --- .github/workflows/ci.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4c0dfcb7..d56bbd7f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,6 +15,8 @@ jobs: - name: Setup pixi uses: prefix-dev/setup-pixi@v0 + with: + environments: quality - name: Check formatting run: pixi run --environment quality format --check . @@ -27,6 +29,8 @@ jobs: - name: Setup pixi uses: prefix-dev/setup-pixi@v0 + with: + environments: quality - name: Check code run: pixi run --environment quality lint @@ -48,9 +52,8 @@ jobs: - name: Setup pixi uses: prefix-dev/setup-pixi@v0 - - - name: Install package for plugin discovery - run: pixi run --environment dev python -m pip install . + with: + environments: dev - name: Run pytest run: pixi run --environment dev test From 17f82cde9980125bce10167db53a02711c6b9573 Mon Sep 17 00:00:00 2001 From: Christian Meesters Date: Wed, 24 Jun 2026 14:26:03 +0200 Subject: [PATCH 23/40] fix: attempting explicit install step --- .github/workflows/ci.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d56bbd7f..6d27be87 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -55,6 +55,9 @@ jobs: with: environments: dev + - name: Install plugin package (non-editable) + run: pixi run --environment dev python -m pip install --no-deps --force-reinstall . + - name: Run pytest run: pixi run --environment dev test From 223a06cc7c9f8759bc66f158acfdd260357a025a Mon Sep 17 00:00:00 2001 From: Christian Meesters Date: Wed, 24 Jun 2026 17:34:09 +0200 Subject: [PATCH 24/40] fix: added entry point --- pyproject.toml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index 389e7cf2..77369068 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -44,6 +44,9 @@ Documentation = "https://snakemake.github.io/snakemake-plugin-catalog/plugins/ex [project.scripts] generate-slurm-partition-config = "snakemake_executor_plugin_slurm.cli:main" +[project.entry-points."snakemake executor plugins"] +slurm = "snakemake_executor_plugin_slurm:ExecutorPlugin" + [tool.setuptools.packages.find] include = ["snakemake_executor_plugin_slurm*"] From cc5a286ddd33c8a48105c60df406add415718cc9 Mon Sep 17 00:00:00 2001 From: Christian Meesters Date: Wed, 24 Jun 2026 17:34:31 +0200 Subject: [PATCH 25/40] fix: attempting editable install --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6d27be87..50949aa5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -55,8 +55,8 @@ jobs: with: environments: dev - - name: Install plugin package (non-editable) - run: pixi run --environment dev python -m pip install --no-deps --force-reinstall . + - name: Install plugin package + run: pixi run --environment dev python -m pip install -e. - name: Run pytest run: pixi run --environment dev test From 6e171781e17bb4532a0f60176be79c3859907d54 Mon Sep 17 00:00:00 2001 From: Christian Meesters Date: Wed, 24 Jun 2026 17:42:23 +0200 Subject: [PATCH 26/40] fix: syntax breaking typo --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 50949aa5..2c15953e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -56,7 +56,7 @@ jobs: environments: dev - name: Install plugin package - run: pixi run --environment dev python -m pip install -e. + run: pixi run --environment dev python -m pip install -e . - name: Run pytest run: pixi run --environment dev test From 8d1ff56c77b7c947335f4c6adf357f15df544973 Mon Sep 17 00:00:00 2001 From: Christian Meesters Date: Wed, 24 Jun 2026 17:52:55 +0200 Subject: [PATCH 27/40] fix: unified env name scheme --- .github/workflows/ci.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2c15953e..df47f044 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,10 +16,10 @@ jobs: - name: Setup pixi uses: prefix-dev/setup-pixi@v0 with: - environments: quality + environments: dev - name: Check formatting - run: pixi run --environment quality format --check . + run: pixi run --environment dev format --check . linting: runs-on: ubuntu-latest @@ -30,10 +30,10 @@ jobs: - name: Setup pixi uses: prefix-dev/setup-pixi@v0 with: - environments: quality + environments: dev - name: Check code - run: pixi run --environment quality lint + run: pixi run --environment dev lint testing: runs-on: ubuntu-latest From 82860f1cfc4aa525f6783cd0bfb848e534306ea0 Mon Sep 17 00:00:00 2001 From: Christian Meesters Date: Wed, 24 Jun 2026 19:52:40 +0200 Subject: [PATCH 28/40] fix: trying to get envs straight --- pyproject.toml | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 77369068..0dc2dda1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -59,11 +59,27 @@ check-hidden = true #################################################################### # Pixi Configuration #################################################################### -[tool.pixi.workspace] +[tool.pixi] name = "snakemake-executor-plugin-slurm" channels = ["conda-forge", "bioconda"] platforms = ["linux-64"] +[tool.pixi.environment.dev] +features = ["test", "style"] + +[tool.pixi.environment.quality] +features = ["style"] + +[tool.pixi.feature.test.pypi-dependencies] +pytest = ">=9.0.3,<10" +coverage = ">=7.14.0,<8" +snakemake = ">=9.21.0,<10" + +[tool.pixi.feature.style.pypi-dependencies] +# e.g. black, ruff, isort … (list whatever you need for style checks) +black = ">=24.2,<25" +ruff = ">=0.6.0,<0.7" + [tool.pixi.dependencies] python = ">=3.11,<3.14" pip = ">=24,<26" @@ -77,11 +93,6 @@ dev = { features = ["test", "style"] } quality = { features = ["style"] } publish = { features = ["build"] } -[tool.pixi.feature.test.pypi-dependencies] -pytest = ">=9.0.3,<10" -coverage = ">=7.14.0,<8" -snakemake = ">=9.21.0,<10" - [tool.pixi.feature.test.tasks] test = { cmd = "pytest" } coverage-report = { cmd = "coverage run -m pytest && coverage report -m" } From d5fbd53abc2ef57d48b60f5efa1dcf9e1f2fb4d8 Mon Sep 17 00:00:00 2001 From: Christian Meesters Date: Wed, 24 Jun 2026 20:03:45 +0200 Subject: [PATCH 29/40] fix: again ... --- pyproject.toml | 106 ++++++++++++++++++++++++++++--------------------- 1 file changed, 61 insertions(+), 45 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 0dc2dda1..531e368c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,31 +1,36 @@ +# ---------------------------------------------------------------------- +# Build system +# ---------------------------------------------------------------------- [build-system] requires = ["setuptools>=64"] build-backend = "setuptools.build_meta" +# ---------------------------------------------------------------------- +# PEP‑621 project metadata (used by pip / setuptools) +# ---------------------------------------------------------------------- [project] name = "snakemake-executor-plugin-slurm" version = "2.7.1" description = "A Snakemake executor plugin for submitting jobs to a SLURM cluster." readme = "README.md" requires-python = ">=3.11,<4" -license = "MIT" +license = {text = "MIT"} authors = [ - { name = "Christian Meesters", email = "meesters@uni-mainz.de" }, - { name = "David Lähnemann", email = "david.laehnemann@dkfz-heidelberg.de" }, - { name = "Johannes Koester", email = "johannes.koester@uni-due.de" }, + {name = "Christian Meesters", email = "meesters@uni-mainz.de"}, + {name = "David Lähnemann", email = "david.laehnemann@dkfz-heidelberg.de"}, + {name = "Johannes Koester", email = "johannes.koester@uni-due.de"}, ] classifiers = [ - "Development Status :: 5 - Production/Stable", - "Environment :: Console", - "Intended Audience :: Science/Research", - "Natural Language :: English", - "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3.11", - "Programming Language :: Python :: 3.12", - "Programming Language :: Python :: 3.13", - "Topic :: Scientific/Engineering", + "Development Status :: 5 - Production/Stable", + "Environment :: Console", + "Intended Audience :: Science/Research", + "Natural Language :: English", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", + "Topic :: Scientific/Engineering", ] - keywords = ["snakemake", "plugin", "executor", "cluster", "slurm"] dependencies = [ "snakemake-interface-common>=1.23.0,<2", @@ -36,7 +41,6 @@ dependencies = [ "throttler>=1.2.2,<2", "pyyaml>=6.0.3,<7", ] - [project.urls] Repository = "https://github.com/snakemake/snakemake-executor-plugin-slurm" Documentation = "https://snakemake.github.io/snakemake-plugin-catalog/plugins/executor/slurm.html" @@ -47,70 +51,82 @@ generate-slurm-partition-config = "snakemake_executor_plugin_slurm.cli:main" [project.entry-points."snakemake executor plugins"] slurm = "snakemake_executor_plugin_slurm:ExecutorPlugin" +# ---------------------------------------------------------------------- +# Setuptools helper +# ---------------------------------------------------------------------- [tool.setuptools.packages.find] include = ["snakemake_executor_plugin_slurm*"] - +# ---------------------------------------------------------------------- +# Codespell configuration (optional, unrelated to Pixi) +# ---------------------------------------------------------------------- [tool.codespell] -# Ref: https://github.com/codespell-project/codespell#using-a-config-file -skip = '.git,*.pdf,*.svg,versioneer.py,*.css,test_*' +skip = ".git,*.pdf,*.svg,versioneer.py,*.css,test_*" check-hidden = true -#################################################################### -# Pixi Configuration -#################################################################### +# ---------------------------------------------------------------------- +# Pixi configuration (new schema – version 0.8+) +# ---------------------------------------------------------------------- [tool.pixi] name = "snakemake-executor-plugin-slurm" channels = ["conda-forge", "bioconda"] platforms = ["linux-64"] +# Conda‑only dependencies (python, pip, packaging) +[tool.pixi.dependencies] +python = ">=3.11,<3.14" +pip = ">=24,<26" +packaging = ">=24,<26" + +# The plugin itself – installed in editable mode for the CI tests +[tool.pixi.pypi-dependencies] +snakemake-executor-plugin-slurm = { path = ".", editable = true } + +# ---------------------------------------------------------------------- +# Environments (used by `pixi install -e `) +# ---------------------------------------------------------------------- [tool.pixi.environment.dev] features = ["test", "style"] [tool.pixi.environment.quality] features = ["style"] +[tool.pixi.environment.publish] +features = ["build"] + +# ---------------------------------------------------------------------- +# Feature definitions +# ---------------------------------------------------------------------- +# ---- Test ------------------------------------------------------------- [tool.pixi.feature.test.pypi-dependencies] pytest = ">=9.0.3,<10" coverage = ">=7.14.0,<8" snakemake = ">=9.21.0,<10" -[tool.pixi.feature.style.pypi-dependencies] -# e.g. black, ruff, isort … (list whatever you need for style checks) -black = ">=24.2,<25" -ruff = ">=0.6.0,<0.7" - -[tool.pixi.dependencies] -python = ">=3.11,<3.14" -pip = ">=24,<26" -packaging = ">=24,<26" - -[tool.pixi.pypi-dependencies] -snakemake-executor-plugin-slurm = { path = ".", editable = true } - -[tool.pixi.environments] -dev = { features = ["test", "style"] } -quality = { features = ["style"] } -publish = { features = ["build"] } - [tool.pixi.feature.test.tasks] -test = { cmd = "pytest" } -coverage-report = { cmd = "coverage run -m pytest && coverage report -m" } +test = {cmd = "pytest"} +coverage-report = {cmd = "coverage run -m pytest && coverage report -m"} +# ---- Style ------------------------------------------------------------ [tool.pixi.feature.style.pypi-dependencies] +black = ">=24.2,<25" ruff = ">=0.10.0,<0.11" [tool.pixi.feature.style.tasks] -format = { cmd = "ruff format" } -lint = { cmd = "ruff check ." } +format = {cmd = "ruff format"} +lint = {cmd = "ruff check ."} +# ---- Build ------------------------------------------------------------ [tool.pixi.feature.build.pypi-dependencies] build = "*" twine = "*" [tool.pixi.feature.build.tasks] -build-check = { cmd = "python -m build && twine check dist/*" } +build-check = {cmd = "python -m build && twine check dist/*"} +# ---------------------------------------------------------------------- +# Coverage, Ruff, Pytest configuration (unchanged) +# ---------------------------------------------------------------------- [tool.coverage.run] omit = [".*", "*/site-packages/*", "Snakefile"] @@ -123,4 +139,4 @@ extend-exclude = ["tests/test_scontrol_parsing.py"] ignore = ["E203"] [tool.pytest.ini_options] -python_files = ["test_*.py", "tests.py"] +python_files = ["test_*.py", "tests.py"] \ No newline at end of file From 60c79cdf7ace8a4de9c93c506e76c8fbcf9e9575 Mon Sep 17 00:00:00 2001 From: meesters Date: Thu, 25 Jun 2026 10:21:49 +0200 Subject: [PATCH 30/40] fix: gitignore added some auto generated files --- .gitignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitignore b/.gitignore index ad6672d8..557dc0ac 100644 --- a/.gitignore +++ b/.gitignore @@ -160,3 +160,6 @@ cython_debug/ #.idea/ .aider* +# pixi environments +.pixi/* +!.pixi/config.toml From 5cf1020b6d2bee6ad985e2125598e590112297e4 Mon Sep 17 00:00:00 2001 From: meesters Date: Thu, 25 Jun 2026 10:22:08 +0200 Subject: [PATCH 31/40] fix: pyproject.toml restructured --- pyproject.toml | 110 +++++++++++++++++++++---------------------------- 1 file changed, 46 insertions(+), 64 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 531e368c..edbe907d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,13 +1,8 @@ -# ---------------------------------------------------------------------- -# Build system -# ---------------------------------------------------------------------- [build-system] requires = ["setuptools>=64"] build-backend = "setuptools.build_meta" -# ---------------------------------------------------------------------- -# PEP‑621 project metadata (used by pip / setuptools) -# ---------------------------------------------------------------------- + [project] name = "snakemake-executor-plugin-slurm" version = "2.7.1" @@ -17,8 +12,8 @@ requires-python = ">=3.11,<4" license = {text = "MIT"} authors = [ {name = "Christian Meesters", email = "meesters@uni-mainz.de"}, - {name = "David Lähnemann", email = "david.laehnemann@dkfz-heidelberg.de"}, - {name = "Johannes Koester", email = "johannes.koester@uni-due.de"}, + {name = "David Lähnemann", email = "david.laehnemann@dkfz-heidelberg.de"}, + {name = "Johannes Koester", email = "johannes.koester@uni-due.de"}, ] classifiers = [ "Development Status :: 5 - Production/Stable", @@ -41,102 +36,89 @@ dependencies = [ "throttler>=1.2.2,<2", "pyyaml>=6.0.3,<7", ] + [project.urls] -Repository = "https://github.com/snakemake/snakemake-executor-plugin-slurm" +Repository = "https://github.com/snakemake/snakemake-executor-plugin-slurm" Documentation = "https://snakemake.github.io/snakemake-plugin-catalog/plugins/executor/slurm.html" [project.scripts] generate-slurm-partition-config = "snakemake_executor_plugin_slurm.cli:main" -[project.entry-points."snakemake executor plugins"] +[python-entrypoint-group."snakemake executor plugins"] slurm = "snakemake_executor_plugin_slurm:ExecutorPlugin" # ---------------------------------------------------------------------- -# Setuptools helper -# ---------------------------------------------------------------------- -[tool.setuptools.packages.find] -include = ["snakemake_executor_plugin_slurm*"] - -# ---------------------------------------------------------------------- -# Codespell configuration (optional, unrelated to Pixi) +# Misc. developer tools (codespell, coverage, ruff, pytest) – unchanged # ---------------------------------------------------------------------- [tool.codespell] skip = ".git,*.pdf,*.svg,versioneer.py,*.css,test_*" check-hidden = true -# ---------------------------------------------------------------------- -# Pixi configuration (new schema – version 0.8+) -# ---------------------------------------------------------------------- +[tool.coverage.run] +omit = [".*", "*/site-packages/*", "Snakefile"] + +[tool.ruff] +line-length = 88 +target-version = "py311" +extend-exclude = ["tests/test_scontrol_parsing.py"] + +[tool.ruff.lint] +ignore = ["E203"] + +[tool.pytest.ini_options] +python_files = ["test_*.py", "tests.py"] + + [tool.pixi] -name = "snakemake-executor-plugin-slurm" + +# Workspace table (required for preview features) +[tool.pixi.workspace] +preview = ["pixi-build"] channels = ["conda-forge", "bioconda"] platforms = ["linux-64"] -# Conda‑only dependencies (python, pip, packaging) +# Conda-only dependencies (must be a table) [tool.pixi.dependencies] -python = ">=3.11,<3.14" -pip = ">=24,<26" +python = ">=3.11,<3.14" +pip = ">=24,<26" packaging = ">=24,<26" -# The plugin itself – installed in editable mode for the CI tests +# Pip-only dependencies (install the plugin from local path) [tool.pixi.pypi-dependencies] -snakemake-executor-plugin-slurm = { path = ".", editable = true } +snakemake-executor-plugin-slurm = { path = "." } -# ---------------------------------------------------------------------- -# Environments (used by `pixi install -e `) -# ---------------------------------------------------------------------- -[tool.pixi.environment.dev] -features = ["test", "style"] +# Environments (must be a single mapping under the plural key) +[tool.pixi.environments] +dev = { features = ["test", "style"] } +quality = { features = ["style"] } +publish = { features = ["build"] } -[tool.pixi.environment.quality] -features = ["style"] - -[tool.pixi.environment.publish] -features = ["build"] - -# ---------------------------------------------------------------------- -# Feature definitions -# ---------------------------------------------------------------------- -# ---- Test ------------------------------------------------------------- +# Feature definitions (unchanged) [tool.pixi.feature.test.pypi-dependencies] -pytest = ">=9.0.3,<10" -coverage = ">=7.14.0,<8" +pytest = ">=9.0.3,<10" +coverage = ">=7.14.0,<8" snakemake = ">=9.21.0,<10" +[tool.setuptools.packages.find] +include = ["snakemake_executor_plugin_slurm*"] +# Exclude the `pr_logo` directory (and any sub‑files) from the packaged source +exclude = ["pr_logo*"] + [tool.pixi.feature.test.tasks] -test = {cmd = "pytest"} +test = {cmd = "pytest"} coverage-report = {cmd = "coverage run -m pytest && coverage report -m"} -# ---- Style ------------------------------------------------------------ [tool.pixi.feature.style.pypi-dependencies] black = ">=24.2,<25" -ruff = ">=0.10.0,<0.11" +ruff = ">=0.10.0,<0.11" [tool.pixi.feature.style.tasks] format = {cmd = "ruff format"} lint = {cmd = "ruff check ."} -# ---- Build ------------------------------------------------------------ [tool.pixi.feature.build.pypi-dependencies] build = "*" twine = "*" [tool.pixi.feature.build.tasks] build-check = {cmd = "python -m build && twine check dist/*"} - -# ---------------------------------------------------------------------- -# Coverage, Ruff, Pytest configuration (unchanged) -# ---------------------------------------------------------------------- -[tool.coverage.run] -omit = [".*", "*/site-packages/*", "Snakefile"] - -[tool.ruff] -line-length = 88 -target-version = "py311" -extend-exclude = ["tests/test_scontrol_parsing.py"] - -[tool.ruff.lint] -ignore = ["E203"] - -[tool.pytest.ini_options] -python_files = ["test_*.py", "tests.py"] \ No newline at end of file From 0312c686ae37d4fd132ed1f5255944da3704b271 Mon Sep 17 00:00:00 2001 From: meesters Date: Thu, 25 Jun 2026 10:28:28 +0200 Subject: [PATCH 32/40] fix: removed on-fly comments --- pyproject.toml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index edbe907d..a4b100d4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -47,9 +47,6 @@ generate-slurm-partition-config = "snakemake_executor_plugin_slurm.cli:main" [python-entrypoint-group."snakemake executor plugins"] slurm = "snakemake_executor_plugin_slurm:ExecutorPlugin" -# ---------------------------------------------------------------------- -# Misc. developer tools (codespell, coverage, ruff, pytest) – unchanged -# ---------------------------------------------------------------------- [tool.codespell] skip = ".git,*.pdf,*.svg,versioneer.py,*.css,test_*" check-hidden = true @@ -87,13 +84,11 @@ packaging = ">=24,<26" [tool.pixi.pypi-dependencies] snakemake-executor-plugin-slurm = { path = "." } -# Environments (must be a single mapping under the plural key) [tool.pixi.environments] dev = { features = ["test", "style"] } quality = { features = ["style"] } publish = { features = ["build"] } -# Feature definitions (unchanged) [tool.pixi.feature.test.pypi-dependencies] pytest = ">=9.0.3,<10" coverage = ">=7.14.0,<8" From 1c1fa3ab65332bff5e4c52f97f4ff99993ebc314 Mon Sep 17 00:00:00 2001 From: meesters Date: Thu, 25 Jun 2026 10:49:26 +0200 Subject: [PATCH 33/40] fix: attempt to run tests with more verbosity --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index a4b100d4..45d1646b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -101,7 +101,7 @@ exclude = ["pr_logo*"] [tool.pixi.feature.test.tasks] test = {cmd = "pytest"} -coverage-report = {cmd = "coverage run -m pytest && coverage report -m"} +coverage-report = {cmd = "coverage run -m pytest -vv --capture=no && coverage report -m"} [tool.pixi.feature.style.pypi-dependencies] black = ">=24.2,<25" From ef052c0bef7f56a6ea89a5a87b1a0b6585a23a97 Mon Sep 17 00:00:00 2001 From: meesters Date: Thu, 25 Jun 2026 11:03:23 +0200 Subject: [PATCH 34/40] fix: trying alternate, more verbose test --- .github/workflows/ci.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index df47f044..f65d7d5f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -59,7 +59,9 @@ jobs: run: pixi run --environment dev python -m pip install -e . - name: Run pytest - run: pixi run --environment dev test + run: | + pixi run --environment dev \ + python -m pytest -vv --capture=no tests - name: Run Coverage run: pixi run --environment dev coverage-report From 424018f94184ae8fa8cc198d13557974b6611554 Mon Sep 17 00:00:00 2001 From: meesters Date: Thu, 25 Jun 2026 11:23:23 +0200 Subject: [PATCH 35/40] fix: reverted change of release-please script - this PR should focus on the CI, only --- .github/workflows/release-please.yml | 47 +++++++++++++++++----------- 1 file changed, 28 insertions(+), 19 deletions(-) diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml index 17f9288c..3ea672d1 100644 --- a/.github/workflows/release-please.yml +++ b/.github/workflows/release-please.yml @@ -8,34 +8,43 @@ name: release-please jobs: release-please: runs-on: ubuntu-latest + outputs: + release_created: ${{ steps.release.outputs.release_created }} steps: - - - uses: googleapis/release-please-action@v5.0 + - uses: googleapis/release-please-action@v4 id: release with: release-type: python token: ${{ secrets.RELEASE_PLEASE_PR_CI_TOKEN }} - - uses: actions/checkout@v6.0 - if: ${{ steps.release.outputs.release_created }} + publish: + runs-on: ubuntu-latest + needs: release-please + if: ${{ needs.release-please.outputs.release_created }} + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-python@v5 with: - fetch-depth: 0 + python-version: "3.11" - - name: Set up Pixi - if: ${{ steps.release.outputs.release_created }} - uses: prefix-dev/setup-pixi@v0.9.6 + - name: Install poetry + run: pip install poetry + + - name: Determine dependencies + run: poetry lock + + - uses: actions/setup-python@v5 with: - environments: quality - cache: true + python-version: "3.11" + cache: poetry - - name: Build and check package - if: ${{ steps.release.outputs.release_created }} + - name: Install dependencies run: | - pixi run --environment publish build-check + poetry install - - name: Publish to PyPI - if: ${{ steps.release.outputs.release_created }} - uses: pypa/gh-action-pypi-publish@release/v1 - with: - user: __token__ - password: ${{ secrets.PYPI_TOKEN }} + - name: Publish to PyPi + env: + PYPI_USERNAME: __token__ + PYPI_PASSWORD: ${{ secrets.PYPI_TOKEN }} + run: poetry publish --build --username $PYPI_USERNAME --password $PYPI_PASSWORD From 0cb497820d62108d138f5d38a829190126d12d20 Mon Sep 17 00:00:00 2001 From: meesters Date: Fri, 26 Jun 2026 11:18:10 +0200 Subject: [PATCH 36/40] fix: removed entry point which is supposed to guarantee recognition - but installment with pip works - testing in the CI now --- pyproject.toml | 3 --- 1 file changed, 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 45d1646b..85863a52 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -44,9 +44,6 @@ Documentation = "https://snakemake.github.io/snakemake-plugin-catalog/plugins/ex [project.scripts] generate-slurm-partition-config = "snakemake_executor_plugin_slurm.cli:main" -[python-entrypoint-group."snakemake executor plugins"] -slurm = "snakemake_executor_plugin_slurm:ExecutorPlugin" - [tool.codespell] skip = ".git,*.pdf,*.svg,versioneer.py,*.css,test_*" check-hidden = true From 4cb00a9ec8a748e9a8a3ab73e03c8ae43a526c41 Mon Sep 17 00:00:00 2001 From: meesters Date: Fri, 26 Jun 2026 11:56:59 +0200 Subject: [PATCH 37/40] fix: removed unnecessary exception --- pyproject.toml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 85863a52..7772b37e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -56,13 +56,9 @@ line-length = 88 target-version = "py311" extend-exclude = ["tests/test_scontrol_parsing.py"] -[tool.ruff.lint] -ignore = ["E203"] - [tool.pytest.ini_options] python_files = ["test_*.py", "tests.py"] - [tool.pixi] # Workspace table (required for preview features) From db8a7a4249972c424038edc69de0b364ced262f2 Mon Sep 17 00:00:00 2001 From: meesters Date: Mon, 29 Jun 2026 10:41:42 +0200 Subject: [PATCH 38/40] fix: trying without pixi.build workspace spec --- pyproject.toml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 7772b37e..6ec2148a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -52,7 +52,6 @@ check-hidden = true omit = [".*", "*/site-packages/*", "Snakefile"] [tool.ruff] -line-length = 88 target-version = "py311" extend-exclude = ["tests/test_scontrol_parsing.py"] @@ -63,7 +62,7 @@ python_files = ["test_*.py", "tests.py"] # Workspace table (required for preview features) [tool.pixi.workspace] -preview = ["pixi-build"] +#preview = ["pixi-build"] channels = ["conda-forge", "bioconda"] platforms = ["linux-64"] From 6b58bceec4757cfc0ed9b12cd424f413be684cfd Mon Sep 17 00:00:00 2001 From: meesters Date: Mon, 29 Jun 2026 10:52:41 +0200 Subject: [PATCH 39/40] fix: deleted black dependency (leftover) --- pyproject.toml | 1 - 1 file changed, 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 6ec2148a..5d9a2fa0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -96,7 +96,6 @@ test = {cmd = "pytest"} coverage-report = {cmd = "coverage run -m pytest -vv --capture=no && coverage report -m"} [tool.pixi.feature.style.pypi-dependencies] -black = ">=24.2,<25" ruff = ">=0.10.0,<0.11" [tool.pixi.feature.style.tasks] From f33ab236eb62f9ca315d818ea6439e44749d8803 Mon Sep 17 00:00:00 2001 From: meesters Date: Wed, 1 Jul 2026 13:06:38 +0200 Subject: [PATCH 40/40] fix: added snakemake as depencdency to dev env --- pyproject.toml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index 5d9a2fa0..26934a7f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -91,6 +91,9 @@ include = ["snakemake_executor_plugin_slurm*"] # Exclude the `pr_logo` directory (and any sub‑files) from the packaged source exclude = ["pr_logo*"] +[dependency-groups] +dev = ["snakemake"] + [tool.pixi.feature.test.tasks] test = {cmd = "pytest"} coverage-report = {cmd = "coverage run -m pytest -vv --capture=no && coverage report -m"}