-
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
Started documenting the API. #212
Conversation
Also changed the register and upload commands to accept keyword arguments.
format | ||
|
||
|
||
API |
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.
This does not belong in the README.
Correct, they are not suitable for human consumption, even if the commands have defaults for some of the arguments, a single function with that many parameters will never be suitable for an API.
It might seem nice in theory but it's not maintainable as an API.
Please revert those changes.
I think there's a lot of unrelated changes in this pull request which are going to muddy the discussion. I've asked you to specifically pull them out. I'll reiterate my opinion which is:
And I'll reiterate my ask of you once more @mauritsvanrees: If the intended APIs are missing anything you might need for |
Sorry for spelling your username incorrectly.
Charming.
Good. I did not see a better spot. There is a docs directory, but I don't see any links to the results of that on the PyPI page.
The current README gave the impression that the shown command line options were simply the result of the last time someone cared to copy-paste the help output, so to me it made sense to update it.
Since a one-line call to the |
I'll paste the good part of the API here for easier reference and close the pull request.
Create a package object: .. code-block:: python
Here You can add a gpg signature: .. code-block:: python
You can sign a package: .. code-block:: python
API repository
When things go wrong: .. code-block:: python
|
Also changed the register and upload commands to accept keyword arguments.
This refs issue #194
I started out making the commands more usable as API, although @Sigmavirus said he did not view the commands as an API. It may still be useful. It is the most logical first step someone would try when he currently does:
and wants to try it in pure Python instead:
It would be nice if that worked, instead of having to supply twelve extra arguments, most of which can be
None
.So I changed the main functions of the commands to accept keywords. This makes it easy to use them, without needing to change code when someone adds an another argument to the function in twine.
Then I started documenting that, and also started on documenting what is more meant as an API: the stuff in the exceptions, package and repository modules. To me, these seem more like internals that could change at any given moment, but apparently they are meant to be reasonably stable. Instead, the call signature for the commands can change at a moment's notice.
So after starting to document the 'semi-public' API, I could see better how it would be possible for a utility like
zest.releaser
to use this API without calling the commands.So....: at this point this pull request feels more like a basis to have a small discussion on. The question then is: what do we want to keep from this? It can be all, or a selection of these, or none:
zest.releaser
is likely to keep using this way, instead of looking at the more official API.What do you think?