Skip to content

Commit

Permalink
Add converters to SnakeBidsApp
Browse files Browse the repository at this point in the history
strings being passed to the arguments in old apps were breaking. Convert
now to Paths
  • Loading branch information
pvandyken committed May 1, 2024
1 parent ed7dbe6 commit 9e086bf
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions snakebids/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
bidsapp.app([plugins.SnakemakeBidsApp(...)])
"""

from __future__ import annotations

import logging
Expand Down Expand Up @@ -69,12 +70,16 @@ class SnakeBidsApp:
DEPRECATED: no-op, use version plugin instead
"""

snakemake_dir: Path
snakemake_dir: Path = attrs.field(converter=Path)
plugins: list[Callable[[SnakeBidsApp], None | SnakeBidsApp]] = attrs.Factory(list)
skip_parse_args: bool = False
_parser: Any = attrs.field(default=None, alias="parser")
configfile_path: Path | None = None
snakefile_path: Path | None = None
configfile_path: Path | None = attrs.field(
default=None, converter=attrs.converters.optional(Path)
)
snakefile_path: Path | None = attrs.field(
default=None, converter=attrs.converters.optional(Path)
)
_config: Any = attrs.field(default=None, alias="config")
version: str | None = None
args: Any = None
Expand Down

0 comments on commit 9e086bf

Please sign in to comment.