Skip to content

How to specify numpydoc_validation_checks from CLI #459

Open
@HealthyPear

Description

@HealthyPear

From the docs it is not clear if this is possible and my first tries failed.

If I do python -m numpydoc -hI see,

Implementing `python -m numpydoc` functionality.

positional arguments:
  import_path           e.g. numpy.ndarray

options:
  -h, --help            show this help message and exit
  -c CONFIG, --config CONFIG
                        key=val where val will be parsed by literal_eval, e.g. -c use_plots=True. Multiple -c can be used.
  --validate            validate the object and report errors

and from the docs I see e.g. the numpydoc_use_plots configuration option mentioned in the help example.

I would like to specify the equivalent of e.g. numpydoc_validation_checks = {"all", "GL01", "GL02", "GL05"} - is this possible?

If not it should be explained, if yes I think there should be more examples of usage.

I tried e.g.,

python -m numpydoc -c numpydoc_validation_checks=all -c numpydoc_validation_checks=GL01 -c numpydoc_validation_checks=GL02 -c numpydoc_validation_checks=GL05 --validate test_module.good_docstring

and

python -m numpydoc -c numpydoc_validation_checks{"all", "GL01", "GL02", "GL05"} --validate test_module.good_docstring

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions