Package: panoptes-aggregation
Getting startedThis is a collection of external reducers written forcaesarand offline use.DocumentationYou can find thelatest documentationon the aggregations code's website.Installing for offline useWith your own python install (python 3 only)Instal the latest stable release:pipinstallpanoptes_aggregationUpgrade and existing installation:pipinstall-Upanoptes_aggregationOr for development or testing, you can install the latest development version directly from GitHub:pipinstall-Ugit+https://github.com/zooniverse/aggregation-for-caesar.gitInstall the Graphical User Interface (GUI)If you would like to use the GUI instead of the command line install the package with:pipinstall"panoptes_aggregation[gui]"Or for the latest development build from GitHub:pipinstall-Ugit+https://github.com/zooniverse/aggregation-for-caesar.git#egg=panoptes-aggregation[gui]Anaconda build of pythonIf your are using the anaconda version of python some of the dependencies should be installed using thecondapackage manager before installingpanoptes_aggregation:condainstall-cconda-forgepython-levenshteinhdbscan
condainstallwxpythonpsutilMac Anaconda buildIf you are installing this code on a Mac using the anaconda build of python and you want to use the GUI instead of the command line you will have to update one line of the of code in thepanoptes_aggregation_guiscript.  Change the first line from:#!/path/to/anaconda/python/bin/pythonto:#!/bin/bash /path/to/anaconda/python/bin/python.appYou can find the location of this file with the command:whichpanoptes_aggregation_guiYou will also need to run:condainstallpython.appWith Dockerhttps://docs.docker.com/get-started/Using docker-composehttps://docs.docker.com/compose/docker-compose -f docker-compose.local_scripts.yml build local_scriptsFrom the root directory of this repository, run the desired python scripts using the docker image, e.g.config_workflow_panoptes --helpdocker-compose -f docker-compose.local_scripts.yml run --rm local_scripts panoptes_aggregation --helpOr directly via dockerdocker build . -f Dockerfile.bin_cmds -t aggregation_for_caesarFrom the root directory of this repository, run the desired python scripts using the docker image, e.g.panoptes_aggregation --helpdocker run -it --rm --name config_workflow_panoptes -v "$PWD":/usr/src/aggregation aggregation_for_caesar panoptes_aggregation --helpNoteThe GUI does not work inside a docker container.Installing for online useThe 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.detalsfor subtasks), python'surllib.parse.urlencodecan be used to translate a keyword list into the proper url encoding.The documentation will be built and available on the/docsroute.Build/run the app in docker locallyTo run a local version use:docker-composebuild
docker-composeupand listen onlocalhost:5000.Running tests in the docker containerTo run the tests use:docker-composerun--rmaggregationnosetests