This is a collection of external reducers written for caesar and offline use.
You can find the latest documentation on the aggregations code's website.
Instal the latest stable release:
pip install panoptes_aggregation
Upgrade and existing installation:
pip install -U panoptes_aggregation
Or for development or testing, you can install the latest development version directly from GitHub:
pip install -U git+https://github.com/zooniverse/aggregation-for-caesar.git
If you would like to use the GUI instead of the command line install the package with:
pip install "panoptes_aggregation[gui]"
Or for the latest development build from GitHub:
pip install -U git+https://github.com/zooniverse/aggregation-for-caesar.git#egg=panoptes-aggregation[gui]
On linux systems you may need to install GTK3:
sudo apt-get install build-essential libgtk-3-dev
https://docs.docker.com/get-started/
Using docker-compose https://docs.docker.com/compose/
docker compose -f docker-compose.local_scripts.yml build local_scripts
From the root directory of this repository, run the desired python scripts using the docker image, e.g. config_workflow_panoptes --help
docker compose -f docker-compose.local_scripts.yml run --rm local_scripts panoptes_aggregation --help
Or directly via docker
docker build . -f Dockerfile.bin_cmds -t aggregation_for_caesar
From the root directory of this repository, run the desired python scripts using the docker image, e.g. panoptes_aggregation --help
docker run -it --rm --name config_workflow_panoptes -v "$PWD":/usr/src/aggregation aggregation_for_caesar panoptes_aggregation --help
Note The GUI does not work inside a docker container.
The docker file included is ready to be deployed on any server. Once deployed, the extractors will be available on the /extractors/<name of extractor function>
routes and the reducers will be available on the /reducers/<name of reducer function>
routes. Any keywords passed into these functions should be included as url parameters on the route (e.g. https://aggregation-caesar.zooniverse.org/extractors/point_extractor_by_frame?task=T0
). For more complex keywords (e.g. details
for subtasks), python's urllib.parse.urlencode can be used to translate a keyword list into the proper url encoding.
The documentation will be built and available on the /docs
route.
To run a local version use:
docker compose build
docker compose up
and listen on localhost:5000
.
To run the tests use:
docker compose run --rm aggregation coverage run -m pytest && coverage report