Skip to content

Commit

Permalink
Invoking click command, making DeprecationWarning visible
Browse files Browse the repository at this point in the history
  • Loading branch information
TheChymera committed Feb 28, 2023
1 parent edf799b commit 1c35017
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions dandi/cli/cmd_validate.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,10 @@
default="none",
)
@click.argument("paths", nargs=-1, type=click.Path(exists=True, dir_okay=True))
@click.pass_context
@map_to_click_exceptions
def validate_bids(
ctx,
paths,
schema,
report,
Expand All @@ -45,20 +47,16 @@ def validate_bids(
-----
* Used from bash, eg:
dandi validate-bids /my/path
* Deprecated
* DEPRECATED: use dandi validate /my/path
"""

warnings.filterwarnings("default")
warnings.warn(
"The `dandi validate-bids` command line interface is deprecated, you can use "
"`dandi validate` instead. Proceeding to parse the call to `dandi validate` now.",
DeprecationWarning,
)
import inspect

from .cmd_validate import validate as validate_

print(inspect.signature(validate_))
validate_(paths, grouping=grouping)
ctx.invoke(validate, paths=paths, grouping=grouping)


@click.command()
Expand Down

0 comments on commit 1c35017

Please sign in to comment.