Skip to content

zooniverse/caesar

Folders and files

NameName
Last commit message
Last commit date
Jun 6, 2023
Feb 22, 2023
Dec 12, 2018
Nov 17, 2022
Oct 18, 2021
Mar 31, 2022
May 13, 2024
Feb 25, 2021
Dec 8, 2022
Feb 27, 2020
Jan 11, 2017
Jun 13, 2017
Sep 18, 2019
Jan 9, 2023
Jan 11, 2017
Jun 13, 2017
Oct 15, 2019
Oct 15, 2019
Feb 20, 2020
Jan 11, 2017
May 4, 2020
May 25, 2023
Aug 17, 2018
Jan 12, 2024
Aug 14, 2023
Jan 11, 2024
Aug 17, 2018
Jul 21, 2022
Jan 11, 2017
Jan 11, 2017
Oct 18, 2021
Feb 2, 2017
Jun 13, 2017

Repository files navigation

README

Caesar is an evolution of the Nero codebase, which is made more generic. In essence, Caesar receives classifications from the event stream (a Lambda script sends them to Caesars HTTP API).

Development

Prepare the Docker containers:

docker-compose build
docker-compose run --rm app bin/rails db:setup
docker-compose run --rm -e RAILS_ENV=test app bin/rails db:create

Run tests with:

docker-compose run --rm -e RAILS_ENV=test app bin/rspec

Or interactively / manually in a docker shell

docker-compose run --rm -e RAILS_ENV=test app bash
# from the bash prompt
bin/rspec

Start a local server with:

docker-compose up

To have it listen to the stream:

AWS_REGION=us-east-1 kinesis-tail zooniverse-staging | bin/stream_to_server

Or to override the configuration for a given workflow, create a local file in tmp/ (or anywhere else, but that directory is ignored by git) and run:

AWS_REGION=us-east-1 kinesis-tail zooniverse-staging | bin/override_workflow_configuration workflow_id tmp/path_to_nero_config.json | bin/stream_to_server

Kinesis / Lambda

Panoptes posts classifications into Kinesis. Caesar has a Lambda script that reads in from Kinesis and then POSTs those into Caesar's API. Docs on how to change that lambda script are in the kinesis-to-http directory.

Mutation tests

RAILS_ENV=test bundle exec mutant -r ./config/environment --use rspec Reducers::ExternalReducer