-
Notifications
You must be signed in to change notification settings - Fork 394
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
api: create documentation #463
Comments
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
@Suor ? can you give a summary or is there a link? we should probably put docstrings around APIs before we release it. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
They have some short docstrings, I will update them based on future docs or discussion here if we decide to do that. So, what is this about? There are three public things in
Arguments always mean the same:
|
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
@Suor are @shcheklein re
Agree, perhaps in docs path $ pip install dvc
...
$ python
...
>>> from dvc import api as dvcapi
>>> dvcapi
<module 'dvc.api' from '/.../dvc/dvc/api.py'>
>>> # etc |
that's right. I would say that it's not separate though, it's the same DVC package. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
@shcheklein Okay. I get it now. I thought for getting DVC-api we need to download it separately.
|
I think that's good enough to start a PR. |
I would say simply use import csv
import pickle
import dvc.api
# Loading from content
model = pickle.loads(dvc.api.read("some-model.pkl", repo="https://github.com/..."))
# Loading using file descriptor
with dvc.api.open("dataset.csv", repo=...) as fd:
reader = csv.reader(fd)
for row in reader:
# ...
# Obtaining an url
resource_url = dvc.api.get_url("path/to/resource.ext", repo=..., remote="s3") |
@naba7 I would start with some Usage section, with short and most common examples, then continue with complete API listing. Or another layout: Install, Usage, Methods sections. Then each method goes on its separate page linked from Method section, with full operation and params description, more examples. The point is making it glanceable and copy-pastable, while providing all the ins and outs too. |
I think the layout : Install, Usage, Methods and describing each methods is better. |
@naba7 yep, I like the idea. So, we can start with three levels:
it includes
@jorgeorpinel any thoughts on this? |
This comment has been minimized.
This comment has been minimized.
I am sorry. I won't be able to work further on this PR. |
@naba7 np! thank you for all your contributions ;) |
dvc.api.get_url
dvc.api.open
dvc.api.read
Please more insights hereMore details in #463 (comment).Also, please update the one mention to API in the data registry (which will me merged with #818) per #818 (comment).
UPDATE:
dvc.api.summon
and open another issue to complete it later.The text was updated successfully, but these errors were encountered: