Skip to content
This repository has been archived by the owner on Apr 27, 2022. It is now read-only.

Document our client library #903

Closed
naved001 opened this issue Oct 25, 2017 · 5 comments
Closed

Document our client library #903

naved001 opened this issue Oct 25, 2017 · 5 comments
Assignees

Comments

@naved001
Copy link
Contributor

Right now there are no documentation for the HIL client library and we should add that soon.

@tpd001 suggested that we could have:

  1. A summary README.md at least specifying the main interfaces and how to use them, or an update to the readthedocs page which covers the client library. Some examples would be helpful. Any debug controls should be described.

  2. A requirements.txt file

cc: @SahilTikale

@naved001
Copy link
Contributor Author

@razaaliraza I am assigning this to you. This seems like a good way to start learning more about the code and I'll be available to help/review.

@xuhang57
Copy link
Contributor

I could look into this. A discussion with @naved001 would be handy.

@xuhang57 xuhang57 assigned xuhang57 and unassigned razaaliraza Feb 1, 2018
@xuhang57
Copy link
Contributor

xuhang57 commented Feb 1, 2018

@zenhack @naved001 so an outline for the README.md here, do we need to cover anything else?:

HIL Python Client API

How to get started?

import requests
import os
from hil.client.client import Client, RequestsHTTPClient

ep = os.environ.get('HIL_ENDPOINT')
basic_username = os.getenv('HIL_USERNAME')
basic_password = os.getenv('HIL_PASSWORD')

http_client = RequestsHTTPClient()
http_client.auth = (basic_username, basic_password)
C = Client(ep, http_client)
print C.project.create("test-project")

@xuhang57 xuhang57 mentioned this issue Feb 1, 2018
5 tasks
@naved001
Copy link
Contributor Author

naved001 commented Feb 1, 2018

  • I don't think you don't need to import requests, the client library does that for you.

What you have provided otherwise is a decent sample to show how to use the client object. You could also link the leasing script as a more comprehensive example.

  • And to be able to import the hil client modules, I just do a pip install git+https://github.com/cci-moc/hil which puts those modules in the path. Advanced users could pick the files themselves. Would be nice to mention this. I don't think there's need to document every other call.

@xuhang57
Copy link
Contributor

xuhang57 commented Feb 16, 2018

PR merged. We now have the doc of our client library. We need to add more examples in the doc though.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants