Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: snakemake/snakemake
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v9.13.0
Choose a base ref
...
head repository: snakemake/snakemake
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v9.13.1
Choose a head ref
  • 3 commits
  • 4 files changed
  • 3 contributors

Commits on Oct 11, 2025

  1. fix: fix iofile formatting to always display the storage query if it …

    …is set, also in case of missing input exceptions (#3786)
    
    ### Description
    
    <!--Add a description of your PR here-->
    
    ### QC
    <!-- Make sure that you can tick the boxes below. -->
    
    * [x] The PR contains a test case for the changes or the changes are
    already covered by an existing test case.
    * [x] The documentation (`docs/`) is updated to reflect the changes or
    this is not necessary (e.g. if the change does neither modify the
    language nor the behavior or functionalities of Snakemake).
    
    
    <!-- This is an auto-generated comment: release notes by coderabbit.ai
    -->
    
    ## Summary by CodeRabbit
    
    * **New Features**
    * Formatted file references now clearly indicate when a file is in
    storage by appending “in storage” where applicable.
    * **Bug Fixes**
    * Standardized the return of formatted file paths: in non-input/output
    contexts, formatting now consistently returns the annotated string
    representation, ensuring predictable display and messaging across the
    app.
    
    <!-- end of auto-generated comment: release notes by coderabbit.ai -->
    johanneskoester authored Oct 11, 2025
    Configuration menu
    Copy the full SHA
    b1c29fa View commit details
    Browse the repository at this point in the history
  2. fix(config): restore $ref resolution for schemas (#3777)

    This PR fixes a regression introduced in Snakemake 9.6.0 where relative
    `$ref` references in local config schemas were not correctly resolved
    during validation.
    
    This regression was introduced when refactoring the config validation
    from the (deprecated) `RefResolver` to the (current) `resolving` API in
    #3420.
    
    The two required changes were:
    
    1. Injection of an absolute `file://` `$id` in schemas to enforce proper
    local reference resolution.
    2. A follow-up update to retrieve_uri to correctly load subschemas (as
    it now receives a `file://` URI).
    
    In addition, to prevent future regressions, this PR adds tests for
    (nested) `$ref`s, `$ref` with remote `$id` (see below), fragment
    references, `allOf`/`anyOf` defaults, and `$def`s.
    
    This commit restores pre-9.6.0 behavior and prevents ValidationError
    when nested schemas are referenced.
    
    Caveat: This PR intentionally does *not* restore one specific aspect of
    the old (`RefResolver` based) implementation:
    If a schema file contains an explicit `$id` pointing to a remote copy of
    the schema, the old implementation would fetch any references (in- or
    external) from that remote URI.
    Instead, the implementation introduced by this PR always resolves
    references based on the local schema file.
    This behaviour is demonstrated (and validated) with the remote `$id`
    test mentioned above.
    
    The following checks have been performed to ensure the correctness of
    this patch:
    
    1. All tests (but the remote `$id` one, see above) were successfully run
    at commit
    [`960f6a89eaa31da6014e810dfcf08f635ac03a6e`](960f6a8)
    (last ancestor of current `main` that still uses the old `RefResolver`
    implementation), proving that they cover pre-9.6.0 behaviour.
    2. Re-running the same tests at commit
    [`cf724272eefcd9b30fb625d2e16380727bef9c3e`](cf72427)
    (direct child of the above, introducing the changes from PR #3420), the
    three (nested) `$ref`s test fail, verifying this commit/PR caused the
    regression and the tests added in this commit catch that regression.
    3. The same tests still fail at commit
    [`2eb9079dae29f271aeacff75e59f6c2f6a0d352d`](2eb9079)
    (current `main`), demonstrating that the regression has not been fixed
    yet.
    4. All tests pass after applying the changes from this PR, validating it
    fixes the regression.
    
    ### QC
    
    * [x] The PR contains a test case for the changes or the changes are
    already covered by an existing test case.
    * [x] The documentation (`docs/`) is updated to reflect the changes or
    this is not necessary (e.g. if the change does neither modify the
    language nor the behavior or functionalities of Snakemake).
    
    #### Notes:
    
    This is my first contribution to the project. Thus, I am not familiar
    with the codebase.
    It is also my first time dealing with `jsonschema` and the both, its
    (deprecated) `RefResolver` API (to analyse the old implementation and
    design tests accordingly), and its current `resolving` API (to fix the
    regression).
    Please let me know if you have any adjustments you want/need me to do.
    
    Also, I started from a standalone POC script to make sure I understand
    the API, defined tests and then worked on the actual fix off that.
    Initially, I overestimated the power of pre-9.6.0's implementation of
    the `validate` function and designed a test that tested defaults
    propagation across (nested) `$ref`s. Thus, my intermediate solution was
    much more complex (and powerful) than this simple (minimal) fix.
    I do have a local branch with that work in case anybody is interested in
    implementing more powerful defaults value handling during config
    validation. Please reach out if there is interest.
    
    ---
    fixes #3648
    
    <!-- This is an auto-generated comment: release notes by coderabbit.ai
    -->
    ## Summary by CodeRabbit
    
    * **Bug Fixes**
    * Schema resolution now enforces local resolution of relative $ref
    references, improving validation and default assignment across nested
    refs, fragments, allOf/anyOf/defs; may change behavior for schemas that
    previously relied on remote resolution.
    
    * **Tests**
    * Added comprehensive tests and fixtures covering relative/fragment
    references, nested schemas, allOf/anyOf/defs, default handling, and
    error scenarios.
    <!-- end of auto-generated comment: release notes by coderabbit.ai -->
    mschilli87 authored Oct 11, 2025
    Configuration menu
    Copy the full SHA
    a3e0939 View commit details
    Browse the repository at this point in the history
  3. chore(main): release 9.13.1 (#3787)

    🤖 I have created a release *beep* *boop*
    ---
    
    
    ##
    [9.13.1](v9.13.0...v9.13.1)
    (2025-10-11)
    
    
    ### Bug Fixes
    
    * **config:** restore $ref resolution for schemas
    ([#3777](#3777))
    ([a3e0939](a3e0939))
    * fix iofile formatting to always display the storage query if it is
    set, also in case of missing input exceptions
    ([#3786](#3786))
    ([b1c29fa](b1c29fa))
    
    ---
    This PR was generated with [Release
    Please](https://github.com/googleapis/release-please). See
    [documentation](https://github.com/googleapis/release-please#release-please).
    snakemake-bot authored Oct 11, 2025
    Configuration menu
    Copy the full SHA
    75d111d View commit details
    Browse the repository at this point in the history
Loading