https://github.com/broadinstitute/carrot
Science Score: 36.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
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
✓Committers with academic emails
1 of 2 committers (50.0%) from academic institutions -
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (14.8%) to scientific vocabulary
Keywords from Contributors
Repository
Basic Info
- Host: GitHub
- Owner: broadinstitute
- License: other
- Language: Rust
- Default Branch: master
- Size: 2.82 MB
Statistics
- Stars: 4
- Watchers: 6
- Forks: 1
- Open Issues: 124
- Releases: 16
Metadata Files
README.md

CARROT
This repository contains the Cromwell Automated Runner for Regression and Automation Testing. This is a tool for configuring, running, and comparing the results of tests run in the Cromwell Workflow Engine.
Table of Contents
Requirements
Building and Running CARROT
- A Rust version >=1.67.1 is required to build CARROT
- rustup, the installer for Rust, can be found on the Rust website, here.
- rustup will install the Rust compiler (rustc) and the Rust package manager (Cargo).
- CARROT currently requires a PostgreSQL database with version >=12.2 for storing test information.
- PostgreSQL can be downloaded from the PostgreSQL website, here.
- It is also a requirement that the PostgreSQL DB have the
uuid-osspextension for using UUIDs.- This extension can be installed by connecting to the database as a user with SUPERUSER privileges and running the following command:
create extension if not exists "uuid-ossp";
- This extension can be installed by connecting to the database as a user with SUPERUSER privileges and running the following command:
- Certain configuration information must be specified in config variables before running.
- These variables can be specified using a
.ymlfile. An example of a.ymlconfiguration can be found within thecarrot.example.ymlfile.
- These variables can be specified using a
- CARROT uses the Diesel crate for interfacing with the database. For certain dev and build tasks, the Diesel CLI is required.
- Instructions for installing the Diesel CLI can be found here.
- Once the Diesel CLI is installed and the PostgreSQL database is running, the Diesel CLI migration tool can be used to create all of the required tables and types in the database with the command
diesel migration run - Alternatively, these tables and types will all be created when running CARROT for the first time
- CARROT uses womtool for WDL validation. If running outside of a docker container created using the included Dockerfile, it will be necessary to include the womtool jar on the same machine and set the
womtool_locationconfig variable to its location, as shown in thecarrot.example.ymlfile - Once Rust is installed, the project can be built using the
cargo buildcommand in the project directory.- Building for release can be done using
cargo build --release
- Building for release can be done using
- CARROT requires a Cromwell server to run tests
- Setting up a Cromwell server can be accomplished by following the instructions here
- A Dockerfile is provided in the project root directory that can be used to run CARROT in a Docker container.
- The image can be built by running
docker build .from the project root.
- The image can be built by running
- For development purposes, the
scripts/docker/docker-compose.ymlfile can be used to run CARROT with a PostreSQL server and a Cromwell server in their own containers. This can be done usingdocker-compose buildfollowed bydocker-compose upwithin that directory.- Running CARROT in this way uses the bare minimum features for CARROT and Cromwell, so software building, reporting, and GitHub integration are unavailable with the default configuration in that
docker-compose.ymlfile. Since we're using minimum features for Cromwell, it will also be impossible to access Cromwell job metadata between restarts of the container (although the actual data for jobs will be retained within the volume). - Accessing result files when running like this requires accessing the docker volume which contains the data for the cromwell instance. This will be within a directory called
docker_cromwell-datawithin the Docker volumes directory on your machine.- Note: if you are running Docker on Mac, it is necessary to connect to the Docker VM to access the volumes directory. Recent versions of Docker have a bug preventing doing so via
screen, so the easiest way to do it is to connect via a container usingdocker run -it --privileged --pid=host debian nsenter -t 1 -m -u -n -i sh
- Note: if you are running Docker on Mac, it is necessary to connect to the Docker VM to access the volumes directory. Recent versions of Docker have a bug preventing doing so via
- Running CARROT in this way uses the bare minimum features for CARROT and Cromwell, so software building, reporting, and GitHub integration are unavailable with the default configuration in that
- To run unit tests in Docker, use
docker-compose buildfollowed bydocker-compose up --abort-on-container-exit --exit-code-from carrot-testwithin the/scripts/docker/testdirectory.- Building and running tests this way seems to occasionally result in failures with the carrot-test container being killed because it exceeds the default docker memory allocation while compiling. This can be resolved by increasing your allocated memory for docker in your docker settings.
Email Notifications
- CARROT supports the option of sending email notifications to subscribed users upon completion of a test run.
- Emails can be configured to be sent in the following ways:
- Using the local machine's
sendmailutility, or - Using an SMTP mail server (either running your own, or using an existing mail service like GMail).
- Using the local machine's
- Enabling this requires the use of a few configuration variables which are listed and explained in the
carrot.example.ymlfile.
- Emails can be configured to be sent in the following ways:
Dynamic Software Testing
- It is possible (and encouraged) to set up CARROT to allow automatic generation of docker images for testing specific software hosted in a git repository
- In order to allow this for private GitHub repos, it is necessary to set up private github access configuration as detailed in the
carrot.example.ymlfile
GitHub Integration
- CARROT supports triggering runs via GitHub PR comments, and receiving reply comments with run results.
- Enabling this functionality requires multiple steps:
- Set up a Google Cloud PubSub Topic
- CARROT will use the created subscription to read messages to trigger runs from the topic
- Create a GitHub account for CARROT to use to view and interact with GitHub
- Add the carrot-publish-github-action to the GitHub Actions workflow for the repository you want to test
- Instructions for doing so are included in the README for the action
- Set up the
githubconfiguration as detailed in thecarrot.example.ymlfile
- Set up a Google Cloud PubSub Topic
Reporting
- An important functionality of CARROT is the generation of reports from test runs in the form of Jupyter Notebooks
- In order for this functionality to work properly, it is necessary to:
- Set up the
reportingconfig in the config yaml file- Create a Google Cloud bucket for storing report templates and use it as the value for the
report_locationvariable - Build and push the report Dockerfile (
scripts/docker/reports/Dockerfile) to a repository accessible by the Google Cloud service account associated with your Cromwell instance- Also set the
report_docker_locationvariable to its location - Alternatively, you can build a docker image with Jupyter Notebook support and the libraries you need if the provided Dockerfile does not meet your needs
- Also set the
- Create a Google Cloud bucket for storing report templates and use it as the value for the
- Set up the
Style
When contributing to CARROT, you should do your best to adhere to the Rust style guide.
To make adhering to the style guide easier, there is a Rust automatic formatting tool called rustfmt. This tool can be installed with cargo using the command rustup component add rustfmt and should be run using cargo fmt before making a pull request.
Using CARROT
Once you have a CARROT server running, please see the User Guide for instructions on using CARROT.
There is also an example test repo available with instructions on how to create and run an example test on your CARROT server.
License
Licensed under Apache License, Version 2.0, (LICENSE-APACHE) AND MIT License (LICENSE-MIT)
Versioning
We use bumpversion.sh to maintain version numbers.
DO NOT MANUALLY EDIT ANY VERSION NUMBERS.
Our versions are specified by a 3 number semantic version system (https://semver.org/):
major.minor.patch
To update the version do the following:
./bumpversion.sh PART where PART is one of:
- major
- minor
- patch
This will increase the corresponding version number by 1.
Owner
- Name: Broad Institute
- Login: broadinstitute
- Kind: organization
- Location: Cambridge, MA
- Website: http://www.broadinstitute.org/
- Twitter: broadinstitute
- Repositories: 1,083
- Profile: https://github.com/broadinstitute
Broad Institute of MIT and Harvard
GitHub Events
Total
Last Year
Committers
Last synced: about 1 year ago
Top Committers
| Name | Commits | |
|---|---|---|
| Kevin Lydon | k****n@b****g | 96 |
| Jonn Smith | j****h | 4 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: about 1 year ago
All Time
- Total issues: 104
- Total pull requests: 22
- Average time to close issues: 4 months
- Average time to close pull requests: 5 days
- Total issue authors: 2
- Total pull request authors: 2
- Average comments per issue: 0.51
- Average comments per pull request: 0.64
- Merged pull requests: 22
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 0
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 0
- Pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- jonn-smith (53)
- KevinCLydon (32)
Pull Request Authors
- KevinCLydon (14)
- jonn-smith (1)
Top Labels
Issue Labels
Pull Request Labels
Dependencies
- 350 dependencies
- futures-core 0.3.7 development
- futures-util 0.3.7 development
- mailparse 0.13.0 development
- mockito 0.30 development
- rand 0.7.3 development
- serde_bytes 0.11 development
- tokio 1.8.4 development
- tokio-stream 0.1 development
- actix-codec 0.3.0
- actix-multipart 0.3.0
- actix-multipart-rfc7578 0.4.0
- actix-rt 1.0.0
- actix-service 1.0.5
- actix-web ^3.3.2
- base64 ^0.13
- chrono 0.4
- clap 2.33
- csv ^1.1
- ctrlc 3.2.2
- diesel 1.4.3
- diesel-derive-enum 0.4
- diesel_migrations 1.4.0
- dotenv 0.15.0
- futures 0.3.5
- google-pubsub1 ^1.0
- google-storage1 ^1.0
- hex 0.4.3
- hyper ^0.10
- hyper-rustls ^0.6
- json-patch ^0.2.6
- lazy_static 1.4.0
- lettre 0.9
- lettre_email 0.9
- log 0.4.14
- openssl 0.10
- percent-encoding 2.1.0
- postgres 0.17.1
- r2d2 0.8.8
- regex 1.5.5
- serde 1.0.104
- serde_json 1.0.48
- serde_urlencoded 0.7
- serde_yaml 0.8
- sha2 0.9
- simple_logger 1.16
- tempfile 3.1.0
- threadpool 1.0
- uuid 0.8
- validator 0.10.1
- yup-oauth2 ^1.0
- zip 0.5
- debian buster-20220912 build
- rust 1.59.0-buster build
- postgres 12.1 build
- broadinstitute/cromwell 54
- carrot latest
- postgres-with-extension latest
- jupyter/datascience-notebook lab-3.3.4 build
- rust 1.55.0 build
- carrot-test latest
- db-test latest
- black * development
- bumpversion * development
- click * development
- cython * development
- flake8 * development
- isort ==4.3.21 development
- mypy ==0.770 development
- pylint * development
- requests * development
- sphinx * development
- sphinx-rtd-theme * development
- tox * development
- twine * development
- wheel * development
- click * test
- coverage >=4.5 test
- mockito * test
- pytest * test
- pytest-cov * test
- pytest-mockito * test
- requests * test
- actions-rs/cargo v1.0.1 composite
- actions-rs/toolchain v1 composite
- actions/checkout v3 composite
- actions/setup-java v3 composite
- actions/setup-python v4 composite
- postgres 12.1 docker