elixir-cloud-aai / TRS-cli

Client for GA4GH Tool Registry Service (TRS) API service
Apache License 2.0
8 stars 0 forks source link

Implement access methods #10

Open uniqueg opened 4 years ago

uniqueg commented 4 years ago

This is a meta-issue to help keep track on what access methods are still left to implement. Please don't close this issue until all boxes are checked (note that additional boxes may be added later).

To implement one of the methods, open a specific issue for the access method you would like to implement (if it doesn't already exist), assign yourself to that issue, implement it (look at #5, #6 and #7 for examples), implement tests, update the README.md, file a PR and mention the specific issue in the PR description. Then, once done, tick off the corresponding item in the lists below.

TRS access methods to implement:

TRS-Filer access methods to implement:

Composite access methods to implement:

Please do not implement before issue is discussed/approved

  • [ ] .import_tool(): import a tool from one TRS into another
  • [ ] .get_checksums(): return dictionary of checksums for all files of a given descriptor type
  • [x] .retrieve_files(): download all files of a given descriptor type (#8 / #9)
  • [ ] .search_tools(): filter values of .get_tools() results for optionally exact (default) or partial matches in any field
uniqueg commented 4 years ago

The client is potentially very useful in our web portal CWLab. It's already used there (in v0.3.1 to retrieve workflow files if a "versioned TRS URI" is passed. But the TRS also offers a discovery endpoint (GET /tools with appropriate query parameters). To support the functionality of discovering a workflow that you don't know exists, implementing access methods for GET /tools, and then GET /tool/{id}, GET /tool/{id}/versions, and GET /tools/{id}/versions/{version_id} to allow the user to pick a version of a tool they have just discovered, are probably highest priority (pretty much in that order).

Afterwards, probably the POST, PUT and DELETE endpoints to manage resources available on the service (i.e., POST /tools and POST /tools/{id}/versions etc) are probably the next most important set of access methods.