Skip to content

Commit 7e61bcb

Browse files
authored
Merge branch 'main' into fix_unit_tests
2 parents e58e5db + 26fcd38 commit 7e61bcb

File tree

27 files changed

+799
-466
lines changed

27 files changed

+799
-466
lines changed

.github/workflows/docs.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
- uses: actions/checkout@v4
2020

2121
- name: Install Pixi
22-
uses: prefix-dev/[email protected].11
22+
uses: prefix-dev/[email protected].14
2323
with:
2424
environments: "docs"
2525
pixi-version: v0.42.1
@@ -43,7 +43,7 @@ jobs:
4343
- uses: actions/checkout@v4
4444

4545
- name: Install Pixi
46-
uses: prefix-dev/[email protected].11
46+
uses: prefix-dev/[email protected].14
4747
with:
4848
environments: "docs"
4949
pixi-version: v0.42.1

.github/workflows/main.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
- uses: actions/checkout@v4
2323

2424
- name: Install Pixi
25-
uses: prefix-dev/[email protected].11
25+
uses: prefix-dev/[email protected].14
2626
with:
2727
environments: "quality"
2828
pixi-version: v0.42.1
@@ -50,7 +50,7 @@ jobs:
5050
test_group: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
5151
# see pyprojec.toml: [tool.pixi.feature.test] for available test types
5252
os: [ubuntu-latest, windows-latest, macos-latest] # , macos-13 not supported yet
53-
env: ["py311", "py312"]
53+
env: ["py311", "py312", "py313"]
5454
exclude:
5555
- os: windows-latest
5656
env: "py311"
@@ -70,7 +70,7 @@ jobs:
7070
fetch-depth: 0
7171

7272
- name: Install Pixi
73-
uses: prefix-dev/[email protected].11
73+
uses: prefix-dev/[email protected].14
7474
with:
7575
environments: ${{ matrix.env }}
7676
pixi-version: v0.42.1

.github/workflows/release-please.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323

2424
- name: Set up Pixi
2525
if: ${{ steps.release.outputs.release_created }}
26-
uses: prefix-dev/[email protected].11
26+
uses: prefix-dev/[email protected].14
2727
with:
2828
environments: quality
2929
pixi-version: v0.47.0

CHANGELOG.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,26 @@
11
# Changelog
22

33

4+
## [9.9.0](https://github.com/snakemake/snakemake/compare/v9.8.2...v9.9.0) (2025-07-29)
5+
6+
7+
### Features
8+
9+
* python 3.13 support ([#3602](https://github.com/snakemake/snakemake/issues/3602)) ([429cff4](https://github.com/snakemake/snakemake/commit/429cff4e3e14d73386306602c634a49f0f05dc40))
10+
11+
12+
### Bug Fixes
13+
14+
* dag mermaid-js edges (bug:[#3556](https://github.com/snakemake/snakemake/issues/3556)) ([#3669](https://github.com/snakemake/snakemake/issues/3669)) ([c6e2e71](https://github.com/snakemake/snakemake/commit/c6e2e7167dce49f964abb51e85bf5376ed819973))
15+
* if asset is present and no sha256 provided assume pass ([#3685](https://github.com/snakemake/snakemake/issues/3685)) ([7731175](https://github.com/snakemake/snakemake/commit/7731175707171fed08beaf0440443b1182dde10b))
16+
17+
## [9.8.2](https://github.com/snakemake/snakemake/compare/v9.8.1...v9.8.2) (2025-07-25)
18+
19+
20+
### Documentation
21+
22+
* info about snakedeploy ([#3681](https://github.com/snakemake/snakemake/issues/3681)) ([6ff65ae](https://github.com/snakemake/snakemake/commit/6ff65aeb994e237460b707d91842bf026ac1943a))
23+
424
## [9.8.1](https://github.com/snakemake/snakemake/compare/v9.8.0...v9.8.1) (2025-07-21)
525

626

docs/index.rst

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -115,28 +115,31 @@ The Snakemake maintainers are:
115115
Resources
116116
---------
117117

118-
`Snakemake Wrappers Repository <https://snakemake-wrappers.readthedocs.org>`_
118+
`Snakedeploy <https://snakedeploy.readthedocs.io>`__
119+
Snakedeploy is a toolbox for maintenance and deployment/setup tasks around Snakemake and Snakemake workflows.
120+
121+
`Snakemake Wrappers Repository <https://snakemake-wrappers.readthedocs.org>`__
119122
The Snakemake Wrapper Repository is a collection of reusable wrappers that allow to quickly use popular tools from Snakemake rules and workflows.
120123

121-
`Snakemake Workflow Catalog <https://snakemake.github.io/snakemake-workflow-catalog>`_
124+
`Snakemake Workflow Catalog <https://snakemake.github.io/snakemake-workflow-catalog>`__
122125
An automatically scraped catalog of publicly available Snakemake workflows for any kind of data analysis.
123126

124-
`Snakemake Workflows Project <https://github.com/snakemake-workflows/docs>`_
127+
`Snakemake Workflows Project <https://github.com/snakemake-workflows/docs>`__
125128
This project provides a collection of high quality modularized and reusable workflows.
126129
The provided code should also serve as a best-practices of how to build production ready workflows with Snakemake.
127130
Everybody is invited to contribute.
128131

129-
`Snakemake Profiles Project <https://github.com/snakemake-profiles/doc>`_
132+
`Snakemake Profiles Project <https://github.com/snakemake-profiles/doc>`__
130133
This project provides Snakemake configuration profiles for various execution environments.
131134
Please consider contributing your own if it is still missing.
132135

133-
`Snakemake API documentation <https://snakemake-api.readthedocs.io>`_
136+
`Snakemake API documentation <https://snakemake-api.readthedocs.io>`__
134137
The documentation of the Snakemake API for programmatic access and development on Snakemake.
135138

136-
`Conda-Forge <https://conda-forge.org>`_
139+
`Conda-Forge <https://conda-forge.org>`__
137140
Conda-Forge is a community driven distribution of Conda packages that can be used from Snakemake for creating completely reproducible workflows by defining the used software versions and providing binaries.
138141

139-
`Bioconda <https://bioconda.github.io/>`_
142+
`Bioconda <https://bioconda.github.io/>`__
140143
Bioconda, a partner project of conda-forge, is a community driven distribution of bioinformatics-related Conda packages that can be used from Snakemake for creating completely reproducible workflows by defining the used software versions and providing binaries.
141144

142145

docs/snakefiles/best_practices.rst

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,4 +59,10 @@ Follow the standards
5959

6060
1. For publishing and distributing a Snakemake workflow, it is a good idea to stick to a :ref:`standardized folder structure <distribution_and_reproducibility>` that is expected by frequent users of Snakemake. This simplifies the navigation through the codebase and keeps the workflow repository and the working directory clean.
6161
2. The `Snakemake workflow catalog <https://snakemake.github.io/snakemake-workflow-catalog>`_ automatically lists Snakemake workflows hosted on `Github <https://github.com>`_ if they follow certain `rules <https://snakemake.github.io/snakemake-workflow-catalog/?rules=true>`_.
62-
By complying to these `rules <https://snakemake.github.io/snakemake-workflow-catalog/?rules=true>`_ you can make your workflow more discoverable and even automate its usage documentation (see `"Standardized usage" <https://snakemake.github.io/snakemake-workflow-catalog/?rules=true>`_).
62+
By complying to these `rules <https://snakemake.github.io/snakemake-workflow-catalog/?rules=true>`_ you can make your workflow more discoverable and even automate its usage documentation (see `"Standardized usage" <https://snakemake.github.io/snakemake-workflow-catalog/?rules=true>`_).
63+
64+
65+
Simplify maintenance
66+
--------------------
67+
68+
Use `Snakedeploy <https://snakedeploy.readthedocs.io>`_ to simplify and automate the maintenance of your Snakemake workflows, or to deploy publicly available workflows for application on your own data.

pyproject.toml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ classifiers = [
2525
"Programming Language :: Python :: 3 :: Only",
2626
"Programming Language :: Python :: 3.11",
2727
"Programming Language :: Python :: 3.12",
28+
"Programming Language :: Python :: 3.13",
2829
"Topic :: Scientific/Engineering",
2930
]
3031

@@ -52,6 +53,7 @@ dependencies = [
5253
"snakemake-interface-storage-plugins>=4.1.0,<5.0",
5354
"snakemake-interface-report-plugins>=1.1.0,<2.0.0",
5455
"snakemake-interface-logger-plugins>=1.1.0,<2.0.0",
56+
"snakemake-interface-scheduler-plugins>=2.0.0,<3.0.0",
5557
"tabulate",
5658
"throttler",
5759
"wrapt",
@@ -100,6 +102,8 @@ dev = { features = ["test", "docs", "style"] }
100102

101103
py311 = { features = ["py311", "test"] }
102104
py312 = { features = ["py312", "test"] }
105+
py313 = { features = ["py313", "test"] }
106+
103107

104108
docs = { features = ["docs"] }
105109
quality = { features = ["style"] }
@@ -112,6 +116,10 @@ python = ">=3.11.0,<3.12"
112116
[tool.pixi.feature.py312.dependencies]
113117
python = ">=3.12.0,<3.13"
114118

119+
120+
[tool.pixi.feature.py313.dependencies]
121+
python = ">=3.13.0,<3.14"
122+
115123
# Test
116124
[tool.pytest.ini_options]
117125
addopts = "--verbose --show-capture=stderr" # --exitfirst

src/snakemake/api.py

Lines changed: 43 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,9 @@
2222
)
2323

2424
if sys.version_info < MIN_PY_VERSION:
25-
raise ValueError(f"Snakemake requires at least Python {'.'.join(MIN_PY_VERSION)}.")
25+
raise ValueError(
26+
f"Snakemake requires at least Python {'.'.join(map(str, MIN_PY_VERSION))}."
27+
)
2628

2729
from snakemake.common.workdir_handler import WorkdirHandler
2830
from snakemake.settings.types import (
@@ -37,6 +39,8 @@
3739
StorageSettings,
3840
SharedFSUsage,
3941
)
42+
from snakemake.scheduling.greedy import SchedulerSettings as GreedySchedulerSettings
43+
from snakemake.scheduling.milp import SchedulerSettings as IlpSchedulerSettings
4044

4145
from snakemake_interface_executor_plugins.settings import ExecMode, ExecutorSettingsBase
4246
from snakemake_interface_executor_plugins.registry import ExecutorPluginRegistry
@@ -47,6 +51,8 @@
4751
from snakemake_interface_report_plugins.registry import ReportPluginRegistry
4852
from snakemake_interface_logger_plugins.registry import LoggerPluginRegistry
4953
from snakemake_interface_logger_plugins.common import LogEvent
54+
from snakemake_interface_scheduler_plugins.settings import SchedulerSettingsBase
55+
from snakemake_interface_scheduler_plugins.registry import SchedulerPluginRegistry
5056

5157
from snakemake.workflow import Workflow
5258
from snakemake.exceptions import print_exception
@@ -454,6 +460,8 @@ def execute_workflow(
454460
group_settings: Optional[GroupSettings] = None,
455461
executor_settings: Optional[ExecutorSettingsBase] = None,
456462
updated_files: Optional[List[str]] = None,
463+
scheduler_settings: Optional[SchedulerSettingsBase] = None,
464+
greedy_scheduler_settings: Optional[GreedySchedulerSettings] = None,
457465
):
458466
"""Execute the workflow.
459467
@@ -587,6 +595,37 @@ def execute_workflow(
587595
or not executor_plugin.common_settings.local_exec
588596
)
589597

598+
scheduler = scheduling_settings.scheduler
599+
600+
if greedy_scheduler_settings is None:
601+
greedy_scheduler_settings = GreedySchedulerSettings()
602+
603+
if (
604+
executor == "touch"
605+
or executor == "dryrun"
606+
or remote_execution_settings.immediate_submit
607+
):
608+
greedy_scheduler_settings.omit_prioritize_by_temp_and_input = True
609+
scheduler = "greedy"
610+
if scheduling_settings.greediness is not None:
611+
greedy_scheduler_settings.greediness = scheduling_settings.greediness
612+
613+
if scheduler == "ilp":
614+
if scheduler_settings is None:
615+
scheduler_settings = IlpSchedulerSettings()
616+
import pulp
617+
618+
if pulp.apis.LpSolverDefault is None:
619+
logger.warning(
620+
"Falling back to greedy scheduler because no default "
621+
"ILP solver is found (you have to install either "
622+
"coincbc or glpk)."
623+
)
624+
scheduler = "greedy"
625+
scheduler_settings = greedy_scheduler_settings
626+
627+
scheduler_plugin = SchedulerPluginRegistry().get_plugin(scheduler)
628+
590629
workflow = self.workflow_api._workflow
591630
workflow.execution_settings = execution_settings
592631
workflow.remote_execution_settings = remote_execution_settings
@@ -603,6 +642,9 @@ def execute_workflow(
603642
workflow.execute(
604643
executor_plugin=executor_plugin,
605644
executor_settings=executor_settings,
645+
scheduler_plugin=scheduler_plugin,
646+
scheduler_settings=scheduler_settings,
647+
greedy_scheduler_settings=greedy_scheduler_settings,
606648
updated_files=updated_files,
607649
)
608650

src/snakemake/assets/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -541,7 +541,7 @@ def deploy(cls) -> None:
541541
if target_path.exists():
542542
with open(target_path, "rb") as fin:
543543
# file is already present, check if it is up to date
544-
if (asset.sha256 is not None) and (
544+
if (asset.sha256 is None) or (
545545
asset.sha256 == hashlib.sha256(fin.read()).hexdigest()
546546
):
547547
continue

0 commit comments

Comments
 (0)