Snakemake version
The regression happened from version 9.5.1 to 9.6.0 and has not been fixed as of 9.6.2.
Describe the bug
When validating a config YAML file with a JSON schema that contains a reference to another file, Snakemake's snakemake.utils.validate throws a _WrappedReferencingError in versions >= 9.6.0.
The same workflow works as expected with Snakemake version 9.5.1
Logs
_WrappedReferencingError in file "<path-to-workflow>/workflow/Snakefile", line 5:
Unresolvable: bar.schema.yaml
File "<path-to-python-lib>/site-packages/jsonschema/_keywords.py", line 296, in properties
File "<path-to-python-lib>/site-packages/jsonschema/validators.py", line 432, in descend
File "<path-to-python-lib>/site-packages/jsonschema/_keywords.py", line 275, in ref
File "<path-to-python-lib>/site-packages/jsonschema/validators.py", line 465, in _validate_reference
Minimal example
.:
config workflow
./config:
config.yaml
./workflow:
schemas Snakefile
./workflow/schemas:
bar.schema.yaml config.schema.yaml
cat workflow/schemas/config.schema.yaml
$schema: https://json-schema.org/draft/2020-12/schema
type: object
properties:
foo: { type: string }
bar: { $ref: bar.schema.yaml }
cat workflow/schemas/bar.schema.yaml
$schema: https://json-schema.org/draft/2020-12/schema
type: integer
from snakemake.utils import validate
configfile: "config/config.yaml"
validate(config, schema="schemas/config.schema.yaml")
rule all:
run: print(f"{config['foo']}={config['bar']}")
check-jsonschema --check-metaschema workflow/schemas/*.schema.yaml
Previous behaviour
New behaviour
_WrappedReferencingError in file "<path-to-workflow>/workflow/Snakefile", line 5:
Unresolvable: bar.schema.yaml
File "<path-to-python-lib>/site-packages/jsonschema/_keywords.py", line 296, in properties
File "<path-to-python-lib>/site-packages/jsonschema/validators.py", line 432, in descend
File "<path-to-python-lib>/site-packages/jsonschema/_keywords.py", line 275, in ref
File "<path-to-python-lib>/site-packages/jsonschema/validators.py", line 465, in _validate_reference
Additional context
I suspect #3420 and initially reported this issue there in a comment.
Since I did not get any response whatsoever in two weeks, I decided to open this separate issue for visibility and not to lose track of it myself.
Snakemake version
The regression happened from version
9.5.1to9.6.0and has not been fixed as of9.6.2.Describe the bug
When validating a config YAML file with a JSON schema that contains a reference to another file, Snakemake's
snakemake.utils.validatethrows a_WrappedReferencingErrorin versions >=9.6.0.The same workflow works as expected with Snakemake version
9.5.1Logs
Minimal example
check-jsonschema --check-metaschema workflow/schemas/*.schema.yamlPrevious behaviour
New behaviour
Additional context
I suspect #3420 and initially reported this issue there in a comment.
Since I did not get any response whatsoever in two weeks, I decided to open this separate issue for visibility and not to lose track of it myself.