Skip to content

Commit

Permalink
Add option to pass FOCUS spec version to validate against
Browse files Browse the repository at this point in the history
Useful when you compose conversion rules for a vertion different than
default (0.5 at the moment in pip package of focus-validator)

Signed-off-by: Stanislav Hanzhin-Tsvetkov <hanzhin.stas@gmail.com>
  • Loading branch information
Stanislav Hanzhin-Tsvetkov committed Feb 6, 2024
1 parent 72588f6 commit fa56fc9
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions focus_converter_base/focus_converter/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,13 @@ def main(
rich_help_panel="Validation",
),
] = False,
spec_version: Annotated[
str,
typer.Option(
help="Validate generated data to match particular FOCUS spec. version",
rich_help_panel="Validation",
),
] = "0.5",
):
# compute function for conversion

Expand Down Expand Up @@ -81,6 +88,7 @@ def main(
data_filename=file_path,
output_type="console",
output_destination=None,
rules_version=spec_version,
)
validator.load()
validator.validate()
Expand Down

0 comments on commit fa56fc9

Please sign in to comment.