Developers

This page contains a rough collection of notes for people wanting to build Funnel from source and/or edit the code.

Building the Funnel source

  1. Install Go 1.21+. Check the version with go version.

  2. Ensure GOPATH is set. See the docs for help. Also, you probably want to add $GOPATH/bin to your PATH.

  3. Clone funnel and build

    $ git clone https://github.com/ohsu-comp-bio/funnel.git
    $ cd funnel
    $ make
    
  4. Funnel is now downloaded and installed. Try funnel version.

  5. You can edit the code and run make install to recompile.

Developer Tools

A Funnel development environment includes:

Makefile

Most development tasks are run through make commands, including build, release, testing, website docs, lint, tidy, webdash dev, and more. See the Makefile for an up-to-date list of commands.

Go Tests

Run all tests: make test
Run the worker tests: go test ./worker/...
Run the worker tests with “Cancel” in the name: go test ./worker -run Cancel

You get the idea. See the go test docs for more.

Mocking

The testify and mockery tools are used to generate and use mock interfaces in test code, for example, to mock the Google Cloud APIs.

Making a release