-
Notifications
You must be signed in to change notification settings - Fork 308
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add option to check before uploading #415
Add option to check before uploading #415
Conversation
Codecov Report
@@ Coverage Diff @@
## master #415 +/- ##
==========================================
- Coverage 78.29% 77.92% -0.37%
==========================================
Files 14 14
Lines 737 743 +6
Branches 106 108 +2
==========================================
+ Hits 577 579 +2
- Misses 127 131 +4
Partials 33 33
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't like the idea of having more than one way to do it.
@sigmavirus24 I think it's fine, it's meant to guard the upload process while |
I agree with Ian here - composition is preferable to parameterization, and composition is what already exists. So right now, the current recommended usage is:
The proposal is to add the ability to invoke that in one command:
There are some nice things about that proposal: one command invocation, avoidance of repeating options. To be honest, I'm a little surprised twine offers a check option and doesn't perform it before doing an upload (unconditionally). I personally have never run the check command, so I'm unsure what value it provides. reads docs Aha, so check performs a basic analysis that the docs will render properly. I've never had to run that because I use pytest-checkdocs. It's arguable that twine shouldn't supply this functionality at all (that a separate command/process should be responsible for it). Given that twine does expose this functionality, it probably should do so in a way that's easily integrated into a deployment flow. Still, I don't think Perhaps twine should consider allowing multiple commands to be invoked... something like
That's the closest thing we have to describing the motivating use-case for this change... and that use-case seems easily satisfied by relying on the shell or orchestrating logic to fail on a failed Thanks for the proposal, but we will decline. If you feel there's a strong case for a single-command usage, make the case in an issue and we can discuss possible solutions. |
Just one note here:
The idea is that |
Add an optional flag to the upload command to check the files before proceeding with the upload.