numpy / numpy/numpydoc

How to specify numpydoc_validation_checks from CLI

Open
#459 4 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
355
Forks
181
Avg merge
1d 9h
Merged PRs (30d)
3

Description

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the configuration section of the linked installation docs and run python -m numpydoc -h to compare the documented and actual CLI syntax. Determine whether numpydoc_validation_checks can be supplied through -c; done means documenting the supported form with an example or clearly explaining that it is unavailable.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli, documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.