Conversation
|
Stefan is back and will take a look at this soon. He is a little backlogged. Thanks for your patience. |
|
Thank you very much @stefmolin. I see that I get a traceback when no import path is specified. I think I suggested the |
stefanv
left a comment
There was a problem hiding this comment.
Looks good, I think the lint subparser perhaps needs to be hooked up more cleanly, but tested everything locally and it works. Thank you again!
numpydoc/cli.py
Outdated
|
|
||
| validate = subparsers.add_parser( | ||
| "validate", | ||
| description="Validate the docstring with numpydoc.", |
There was a problem hiding this comment.
Can we clarify here the distinction between validate and lint. They do the same, except the one operates on a function and the other on a file? But validate doesn't allow disabling certain rules, which confused me.
There was a problem hiding this comment.
I think it works for non-functions as well. How about this?
Validate an object's docstring conforms to the numpydoc standard.
There was a problem hiding this comment.
I'm not sure what to do about the second part of your comment. If you run numpydoc validate --help you see what can be passed as arguments, and there aren't any for disabling rules.
There was a problem hiding this comment.
"Validate that an object's docstring conforms to the numpydoc standard" (added "that")
There was a problem hiding this comment.
Or, "Determine (or check?) whether an object's docstring..."
There was a problem hiding this comment.
Otherwise just: "Validate an object's docstring against the numpydoc standard"
There was a problem hiding this comment.
I may prefer the last version, but anything gramatically sound is fine.
There was a problem hiding this comment.
I'm not sure what to do about the second part of your comment. If you run
numpydoc validate --helpyou see what can be passed as arguments, and there aren't any for disabling rules.
This was more of a question: should there be the option of disabling certain rules? Why are these not exactly equivalent in their functionality?
There was a problem hiding this comment.
I'm not sure what to do about the second part of your comment. If you run
numpydoc validate --helpyou see what can be passed as arguments, and there aren't any for disabling rules.This was more of a question: should there be the option of disabling certain rules? Why are these not exactly equivalent in their functionality?
While I agree this should eventually be the case, this definitely seems out of scope for this PR. At least the separate subcommands will not draw attention to arguments that have no effect like before (see #459).
stefanv
left a comment
There was a problem hiding this comment.
Thanks @stefmolin! The new interface is great.
|
@rossbar @jarrodmillman handing it over to you. |
Changes:
numpydocentry point (replacing the hook's entry point).__main__.pyand into a dedicatedcli.pyfile.git:render,validate, andlint.test_main.pyfor changes and addition oflintoption.-moption from the hook, so that usage is now fromnumpydoc lint.numpydoc lint.test.ymlworkflow, but I didn't add a correspondinglintcommand as I don't fully understand what that part does.Closes #467