Skip to content
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

Create a simple command line client #86

Closed
cmungall opened this issue Nov 8, 2018 · 7 comments
Closed

Create a simple command line client #86

cmungall opened this issue Nov 8, 2018 · 7 comments
Assignees

Comments

@cmungall
Copy link
Member

cmungall commented Nov 8, 2018

This would be useful for ad-hoc exploration. The swagger UI is nice but involves a lot of cut paste.

I am thinking something very simple, no-frills

e.g

kba concept $conceptId

not sure how best to deal with async. The CLI could simply be blocking.

$ kba concept $conceptId
Response: queryId 1234
$ kba ping
Response: last queryId = 1234
No results yet
$ kba ping
Response: last queryId = 1234
One result from foo-beacon
{....}
@RichardBruskiewich
Copy link
Collaborator

Lance did start a discussion with me about this. This seems to be a 2 step development activity:

  1. Code a clean (python) wrapper library accessing KBA. Such a library would also facilitate Jupyter notebook (hence, workflow integration) of knowledge beacon.s
  2. Code a CLI using that library.

@cmungall
Copy link
Member Author

cmungall commented Nov 9, 2018

I see you swagger codegenned the main KB API

You could also omit 1, direct coding via the requests library and passing in parameters as dicts is often fine. YMMV

@RichardBruskiewich
Copy link
Collaborator

@cmungall yes, @lhannest started working on a generic beacon wrapper here. Lance, where do we sit with that (in this repo's code base)?

@lhannest lhannest self-assigned this Nov 9, 2018
@lhannest
Copy link
Member

lhannest commented Nov 9, 2018

@RichardBruskiewich It's finished and ready for use. Maybe a CLI should be added to it as well? It's pretty easy with the click library.

But yes, I think this is a good idea. I would make the aggregator CLI client blocking, but show a progress bar.

@RichardBruskiewich
Copy link
Collaborator

progress bar helpful, like the download kind of progress bars (hard to figure out, though, what to provide as a metric of progress in the software....) Maybe, add an optional "timeout" parameter, in case one wants to abort. Also, time taken for a KBA query is probably a function of page size requested (sometimes, page number too?)

@cmungall
Copy link
Member Author

cmungall commented Nov 9, 2018 via email

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

No branches or pull requests

3 participants