https://github.com/broadinstitute/cromshell

CLI for interacting with Cromwell servers

https://github.com/broadinstitute/cromshell

Science Score: 23.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
    10 of 20 committers (50.0%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (9.6%) to scientific vocabulary

Keywords

bioinformatics cli cromwell wdl workflow

Keywords from Contributors

application executor ga4gh workflow-description-language workflow-execution genetics genomics gwas hail software
Last synced: 5 months ago · JSON representation

Repository

CLI for interacting with Cromwell servers

Basic Info
  • Host: GitHub
  • Owner: broadinstitute
  • License: bsd-3-clause
  • Language: Python
  • Default Branch: main
  • Homepage:
  • Size: 684 KB
Statistics
  • Stars: 55
  • Watchers: 28
  • Forks: 15
  • Open Issues: 63
  • Releases: 32
Topics
bioinformatics cli cromwell wdl workflow
Created almost 8 years ago · Last pushed almost 2 years ago
Metadata Files
Readme License

README.md

__ __ .,-;-;-,. /'_\ +-----------------------------------------------+ /_'\.,-;-;-,. _/_/_/_|_\_\) / | CROMSHELL : run Cromwell jobs from the shell | \ (/_/__|_\_\_ '-<_><_><_><_>=/\ +-----------------------------------------------+ /\=<_><_><_><_>-' `/_/====/_/-'\_\ /_/'-\_\====\_\' "" "" "" "" "" ""

Cromshell

GitHub version Integration Test Workflow Unit Test Workflow License: MIT

Cromshell is a CLI for submitting workflows to a Cromwell server and monitoring/querying their results.

Examples:

cromshell submit workflow.wdl inputs.json options.json dependencies.zip cromshell status cromshell -t 20 metadata cromshell logs -2

Supported Options:

  • --no_turtle or --I_hate_turtles
    • Hide turtle logo
  • --cromwell_url [TEXT]
    • Specifies Cromwell URL used.
    • TEXT Example: http://65.61.654.8:8000
    • Note: Depending on your Cromwell server configuration, you may not need to specify the port.
  • -t [TIMEOUT]
    • Specifies the server connection timeout in seconds.
    • Default is 5 sec.
    • TIMEOUT must be a positive integer.
  • --gcloud_token_email [TEXT]
    • Call gcloud auth print-access-token with this email and add the token as an auth header to requests.
  • --referer_header_url [TEXT]
    • For servers that require a referer, supply this URL in the Referer: header.
  • One of --machine_processable or --colorful_output
    • Override the automatically determined output coloring setting.
    • Otherwise the output will be colored if it detects that it's connected to an interactive terminal. ## Supported Subcommands:

#### Start/Stop workflows * submit [-w] <wdl> <inputs_json> [options_json] [included_wdl_zip_file] * Automatically validates the WDL and JSON file. * Submit a new workflow to the Cromwell server. * -w [COMING SOON] Wait for workflow to transition from 'Submitted' to some other status before ${SCRIPTNAME} exits. * included_wdl_zip_file Zip file containing any WDL files included in the input WDL * abort [workflow-id] [[workflow-id]...]
* Abort a running workflow. #### Workflow information: * alias <workflow-id> <alias_name> * Label the given workflow ID with the given aliasname. Aliases can be used in place of workflow IDs to reference jobs. * Remove an alias by passing empty double quotes as `aliasname(e.g.alias "") #### Query workflow status: *status [workflow-id] [[workflow-id]...] * Check the status of a workflow. *metadata [workflow-id] [[workflow-id]...] * Get the full metadata of a workflow. *slim-metadata [workflow-id] [[workflow-id]...] * Get a subset of the metadata from a workflow. *counts [-j] [-x] [workflow-id] [[workflow-id]...] * Get the summarized status of all jobs in the workflow. *-jprints a JSON instead of a pretty summary of the execution status (compresses subworkflows) *-xcompress sub-workflows for less detailed summarization *timing*[workflow-id] [[workflow-id]...]`* * Open the timing diagram in a browser.

#### Logs * logs [workflow-id] [[workflow-id]...]
* List the log files produced by a workflow. * [COMING SOON] fetch-logs [workflow-id] [[workflow-id]...]
* Download all logs produced by a workflow.

#### Job Outputs * list-outputs [workflow-id] [[workflow-id]...]
* List all output files produced by a workflow. * [COMING SOON] fetch-all [workflow-id] [[workflow-id]...]
* Download all output files produced by a workflow.

#### Display a list jobs submitted through cromshell * list [-c] [-u]
* -c Color the output by completion status. * -u Check completion status of all unfinished jobs.

#### Clean up local cached list * [COMING SOON] cleanup [-s STATUS] * Remove completed jobs from local list. This command removes all jobs from the local list that are in a completed state, where a completed state is one of: Succeeded, Failed, Aborted * -s [STATUS] If provided, will only remove jobs with the given [STATUS] from the local list.

#### Update cromwell server * update-server * Change the cromwell server that new jobs will be submitted to.

#### Get cost for a workflow * cost [-c] [-d] [workflow-id] [[workflow-id]...] * Get the cost for a workflow. * Only works for workflows that completed more than 24 hours ago on GCS. See Google Cost Exporting Documentation * Billing export to BigQuery must be enabled for your GCP billing project. See Setup billing data export to BigQuery. * Requires the bq_cost_table key to exist in the cromshell configuration file and have a value equal to the BigQuery cost table for your GCP billing project. * For example, your ~/.cromshell/cromshell_config.json should contain: json { "cromwell_server": "<cromwell_server_url>", "requests_timeout": 5, "bq_cost_table": "<table_name>" } where <table_name> can be found by navigating to BigQuery, selecting the appropriate google project, and locating the table containing cost information.

     <img src="developer_docs/img/bq_cost_table.png" alt="BigQuery example image" width="500"/>

     Clicking on the table and opening the "DETAILS" tab, you'll find the exact path to the table in the "Table ID" section. Everything after the google project name (after the first `.`) should be included in `<table_name>`.
 * `-c/--color` Color outliers in task level cost results.
 * `-d/--detailed` Get the cost for a workflow at the task level.

#### Validate WDL * validate [wdl] [input json] --dependencies-zip [wdl_zip_file] * Validate a WDL file. * Runs both miniwdl and womtool validation by default, but can be configured to run only one or the other. * Womtool validation via Cromwell server API does not support validation of imported files, however miniwdl does. * --dependencies-zip MiniWDL option: ZIP file or directory containing workflow source files that are used to resolve local imports.

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.
    It will copy your wdl and json inputs into the folder for reproducibility.
  • It keeps track of your most recently submitted jobs by storing their ids in ./cromshell/
    You may omit the job ID of the last job submitted when running commands, or use negative numbers to reference previous jobs, e.g. "-1" will track the last job, "-2" will track the one before that, and so on.
  • You can override the default cromwell server by setting the argument --cromwell_url to the appropriate URL.
  • You can override the default cromshell configuration folder by setting the environmental variable CROMSHELL_CONFIG to the appropriate directory.
  • Most commands takes multiple workflow-ids, which you can specify both in relative and absolute ID value (i.e. cromshell status -- -1 -2 -3 c2db2989-2e09-4f2c-8a7f-c3733ae5ba7b).
  • Assign aliases to workflow ids using the alias command (i.e. cromshell alias -- -1 myAliasName). Once the Alias command is used to attach an alias to a workflow id, the alias name can be used instead of the id (i.e. cromshell status myAliasName).

Installation

From brew

brew tap broadinstitute/dsp
brew install cromshell

From pypi

pip install cromshell

From source

git clone git@github.com:broadinstitute/cromshell.git
cd cromshell
pip install .

cromshell --help

Uninstallation

From brew

brew uninstall cromshell

From pypi/source

pip uninstall cromshell

Development

See the Developer Docs

Legacy Cromshell

The original Cromshell shell script is still available in the legacy_cromshell folder and in the cromshell1 branch of this repository. It is no longer maintained, but is still available for use. The original Cromshell contains some commands not yet available in Cromshell2, such as fetch-logs, fetch-all, notify, and cleanup. These commands will be added to Cromshell2 in the future.

Owner

  • Name: Broad Institute
  • Login: broadinstitute
  • Kind: organization
  • Location: Cambridge, MA

Broad Institute of MIT and Harvard

GitHub Events

Total
Last Year

Committers

Last synced: 9 months ago

All Time
  • Total Commits: 150
  • Total Committers: 20
  • Avg Commits per committer: 7.5
  • Development Distribution Score (DDS): 0.72
Past Year
  • Commits: 0
  • Committers: 0
  • Avg Commits per committer: 0.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Jonn Smith j****h 42
Louis Bergelson l****b@b****g 33
bshifaw b****w@b****g 21
bshifaw b****w@b****m 18
Steve Huang s****g@b****g 6
Stephen Fleming s****g 4
Trevyn Langsford t****s@b****g 4
Giles Hall g****b@b****g 3
Kiran V Garimella k****g 3
Mark Walker m****w@b****g 3
Adam Nichols a****s@g****m 2
kshakir g****b@k****g 2
Yossi Farjoun f****n@b****g 2
Chris Llanwarne c****e 1
Evan Benn e****n@g****m 1
Evie Wan 8****n 1
TedBrookings t****s@g****m 1
Zhibo Huang z****0@1****m 1
jamesemery e****j@b****g 1
meganshand m****d@b****g 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 9 months ago

All Time
  • Total issues: 47
  • Total pull requests: 75
  • Average time to close issues: 5 months
  • Average time to close pull requests: about 1 month
  • Total issue authors: 19
  • Total pull request authors: 14
  • Average comments per issue: 1.87
  • Average comments per pull request: 0.68
  • Merged pull requests: 60
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 1
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 1
  • Pull request authors: 0
  • Average comments per issue: 0.0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • SHuang-Broad (11)
  • bshifaw (10)
  • sjfleming (5)
  • jamesemery (3)
  • lbergelson (2)
  • mbookman (2)
  • notestaff (1)
  • dalessioluca (1)
  • droazen (1)
  • tlangs (1)
  • tnguyensanger (1)
  • wharvey31 (1)
  • microbioticajon (1)
  • yuhuyoyo (1)
  • kvg (1)
Pull Request Authors
  • bshifaw (37)
  • lbergelson (6)
  • sjfleming (5)
  • gileshall (5)
  • kvg (3)
  • eviewan (3)
  • kshakir (3)
  • ericsong (2)
  • jonn-smith (2)
  • aednichols (2)
  • microbioticajon (2)
  • jamesemery (2)
  • SHuang-Broad (1)
  • cjllanwarne (1)
Top Labels
Issue Labels
Cromshell 2 (19) enhancement (11) bug (5) question (2)
Pull Request Labels
Cromshell 2 (27) bug (6) enhancement (2)

Packages

  • Total packages: 2
  • Total downloads:
    • pypi 51 last-month
  • Total docker downloads: 92,835
  • Total dependent packages: 0
    (may contain duplicates)
  • Total dependent repositories: 0
    (may contain duplicates)
  • Total versions: 3
  • Total maintainers: 1
pypi.org: cromshell

Command Line Interface (CLI) for Cromwell servers

  • Versions: 2
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 35 Last month
  • Docker Downloads: 92,835
Rankings
Docker downloads count: 1.0%
Dependent packages count: 7.3%
Stargazers count: 9.7%
Forks count: 10.0%
Average: 14.8%
Downloads: 19.8%
Dependent repos count: 40.8%
Maintainers (1)
Last synced: 6 months ago
pypi.org: cromshell-draft-release

Command Line Interface (CLI) for Cromwell servers

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 16 Last month
Rankings
Dependent packages count: 7.2%
Stargazers count: 9.7%
Forks count: 10.0%
Average: 15.3%
Dependent repos count: 34.5%
Maintainers (1)
Last synced: 6 months ago

Dependencies

.github/workflows/integration_tests.yml actions
  • actions/checkout v2 composite
  • actions/setup-python v2 composite
.github/workflows/pypi_packaging.yml actions
  • actions/checkout master composite
  • actions/create-release v1 composite
  • actions/setup-python v2 composite
  • ad-m/github-push-action master composite
  • jasonamyers/github-bumpversion-action v1.0.4 composite
  • pypa/gh-action-pypi-publish release/v1 composite
.github/workflows/unit_tests.yml actions
  • actions/checkout v2 composite
  • actions/setup-python v2 composite
dev-requirements.txt pypi
  • black * development
  • bumpversion * development
  • cython * development
  • flake8 * development
  • isort ==4.3.21 development
  • mypy ==0.770 development
  • pylint * development
  • sphinx * development
  • sphinx-rtd-theme * development
  • tox * development
  • twine * development
  • wheel * development
pyproject.toml pypi
requirements.txt pypi
  • click >=8.0.0
  • gcsfs >=2022.3.0
  • google-cloud-bigquery >=3.5.0
  • miniwdl >=1.10.0
  • pygments >=2.12.0
  • requests >=2.27.1
  • tabulate >=0.8.9
  • termcolor >=1.1.0
test-requirements.txt pypi
  • coverage >=4.5 test
  • pytest * test
  • pytest-cov * test
  • pytest-dependency * test