Skip to content

Commit

Permalink
Readme and completions fixups (#165)
Browse files Browse the repository at this point in the history
* Improve formatting of readme for new cost commands
* Add forgotten "update-server"  command to completions 
* Add completions/reload.sh script to help developing zsh completions
  • Loading branch information
lbergelson authored Jul 28, 2021
1 parent 90a5f53 commit 4df19a6
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 10 deletions.
17 changes: 8 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,15 +99,14 @@ requires `column`, `curl`, `mail`, and [jq](https://stedolan.github.io/jq/)
* `update-server`
* Change the cromwell server that new jobs will be submitted to.

#### Get cost for a workflow
* `cost`
* Get the cost for a workflow.
* Will only work for workflows that completed more than 8 hours ago on GCS.
* Requires the `gcp_bq_cost_table.config` configuration file to exist and contain the big query cost table for your organization.
* `cost-detailed`
* Get the cost for a workflow at the task level.
* Will only work for workflows that completed more than 8 hours ago on GCS.
* Requires the `gcp_bq_cost_table.config` configuration file to exist and contain the big query cost table for your organization.
#### Get cost of a workflow
Costs are only available for workflows that completed more than 8 hours ago on a `GCS` backend.
Requires the `~/.cromshell/gcp_bq_cost_table.config` configuration file to exist and contain the name of the BigQuery cost table for your organization.
* `cost [workflow-id] [[workflow-id]...]`
* Get the cost for a workflow.
* `cost-detailed [workflow-id] [[workflow-id]...]`
* Get the cost for a workflow at the task level.


### Features:
* Running `submit` will create a new folder in the `~/.cromshell/${CROMWELL_URL}/` directory named with the cromwell job id of the newly submitted job.
Expand Down
3 changes: 2 additions & 1 deletion completions/_cromshell
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ function _cromshell {
list\:'Display a list jobs submitted through cromshell'
cleanup\:'Clean up local cached list'
cost\:'Display workflow cost'
cost-detailed\:'Display detailed workflow cost'
cost-detailed\:'Display workflow cost broken down by task'
update-server\:'Change the cromshell server new jobs will be submited to'
))" \
"*::arg:->args"

Expand Down
8 changes: 8 additions & 0 deletions completions/reload.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Reload the _cromshell completion file for testing
# Usage:
# source reload.sh

fpath=($PWD $fpath)
unfunction _cromshell
autoload -U compinit
compinit

0 comments on commit 4df19a6

Please sign in to comment.