Skip to main content

radish

CircleCI Latest Version Python versions

Radish is a task runner that understands version control.

You define a command that applies to multiple subprojects in your repository and thenradish will figure out which projects have changed and run the command for just those projects. Radish isn’t a replacement for make, gulp, gradle, rake, or any other task runner. It’s a supplement for orchestrating other runners and scripts with some smarts from your version control repository.

If you’re using a CI/CD server like Concourse or GoCD which supports pipelines as first-class citizens you probably have no need for radish on your CI/CD server. It might still be useful on your dev machine, though.

Installation

Radish is available on PyPi as radish-run and can be installed on most systems with pip:

$ pip install radish-run

How to use

An example invocation of radish:

$ radish command tests --from 19abc023 --to 2514ecb1
Changed paths:
  - extensions/cool-extension/
  - frontend/js/

Running tests for extensions/cool-extension/:
...........
OK

Running tests for frontend/js/:
..........................
OK

All commands ended successfully and ran in 9.75s.

Configuration

radish configuration is a yaml file named Radishfile, because I can.

paths:
  - extensions/*/  # Mark each subdirectory in extensions as a path
  - frontend/js/

commands:  # Runs from the directory denoted by paths above
  tests:
    default: bin/rspec spec
    frontend/js/: npm test

An example use case

Take that you’re building a single page web app, it consists of two parts: - The backend that delivers JSON - The frontend that holds all the clicky bits that end-users see

Because cross-functional teams this project is in one repository, which is a great win for productivity. But it has a downside: when there are only changes to the backend, then all the tests for the frontend is still run. Finally, after running all tests it can get deployed, but then both sites get deployed despite nothing changing on the frontend.

So this is a crazy situation. It shouldn’t be. So this is where radish comes in. You tell radish about test and deploy, and what that means for both the backend and the frontend, then on your CI server you run the commands with the last green commit. Radish then figures out what has changed from the current commit and the last one, and only runs the command for those projects.

Contributing

Roadmap

  • Define a path/project to always run, no matter whether there are changes or not

  • Run a different command if there are changes to the project

  • Allow for changed files to be passed in to commands. Primarily a feature for local dev boxes, so you only run the command against changed files.

  • Dependencies between projects. If the frontend-payment project changes then run the command in the frontend project as well.

  • Custom differs for Ci systems so they can smartly figure out what the last green commit was, instead of relying on HEAD~1 as the poor mans “what was the last change?”

Local development

To get started make with your current global version of Python do:

$ git clone https://github.com/gaqzi/radish.git
$ cd radish/
$ make develop
$ make test

This will install all dependencies, check out the test repo, and then run all the tests.

License

Beerware License

Metadata

Release files for radish-run 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for radish-run 0.1.0
File Size Uploaded Provenance
radish-run-0.1.0.tar.gz 8.0 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for radish-run 0.1.0
File Interpreter ABI Platform
radish_run-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 17.1 kB

Release files / radish-run-0.1.0.tar.gz

Download URL radish-run-0.1.0.tar.gz
Size 8.0 kB
Tags Source
SHA-256 checksum
How to use checksums
ff2286251532326acaceb1341b5267d5761dae89152c882a0273b843ee94aa38
BLAKE2b-256 checksum
How to use checksums
1e688561a33553941b68c889840296a46bc3df14ad119854843a0328f5a2c025
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / radish_run-0.1.0-py3-none-any.whl

Download URL radish_run-0.1.0-py3-none-any.whl
Size 9.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1f72ffcabec543b06e2b845b1e5d082036ecbbb4762a66e1691907a93c47ce1f
BLAKE2b-256 checksum
How to use checksums
2715093c6438e98b612fb4c7ea0bd3428d063136b3d2090590fecb981bbdbf5d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for radish-run 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page