How to specify numpydoc_validation_checks from CLI

Aperta
#459 4 commenti 1 reazione 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
35/100
Tipo di issue
Documentazione
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
python
Ambito
cli, documentation

Direzione di ricerca

Inizia dalla sezione di configurazione della documentazione di installazione collegata ed esegui python -m numpydoc -h per confrontare la sintassi CLI documentata con quella effettiva. Determina se numpydoc_validation_checks può essere fornito tramite -c; il lavoro è completato quando la forma supportata viene documentata con un esempio oppure viene spiegato chiaramente che non è disponibile.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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

Lingua principale
Python
Stelle
354
Fork
185
Merge medio
4m
PR unite (30g)
1

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di numpy/numpydoc

Tutte le issue di numpy/numpydoc

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.