Package: eureka-opensource
I Quick startI.1 Stackless Python installationEureka is a solution that requires a custom Python implementation calledStackless Python(version 2.7).In order to install it via the sources, first ensure you have the prerequisite system dependencies :For Debian based distributions:sudo apt-get install --no-install-recommends autoconf automake bzip2 ca-certificates file g++ gawk gcc libbz2-dev libffi-dev libfreetype6-dev libgdbm-dev libjpeg-dev libncurses-dev libopenjpeg-dev libpng-dev libpq-dev libreadline-dev libsqlite3-dev libssl-dev libtiff-dev libtool libwebp-dev libxml2-dev libxslt-dev make patch pkg-config wget xz-utils zlib1g-devthen complete the following commands:$ wget http://www.stackless.com/binaries/stackless-278-export.tar.bz2
$ tar xf stackless-278-export.tar.bz2
$ cd stackless-278-export
$ ./configure --prefix=<STACKLESS_DIR> && make -j3 all && make installI.2 Virtualenv and setuptools installIn order to isolate your Eureka project, you can install and usevirtualenv. To do so within you fresh Stackless Python, you can execute the following commands:$ wget https://bootstrap.pypa.io/ez_setup.py -O - | <STACKLESS_DIR>/bin/python
$ <STACKLESS_DIR>/bin/easy_install virtualenvNote: you can also find some more details on how to install Stackless Python onits documentationI.3 Eureka installationYou can create yourvirtualenvby doing:$ <STACKLESS_DIR>/bin/virtualenv <EUREKA_DIR>
$ cd <EUREKA_DIR>You can finally install Eureka open witheasy_install:$ ./bin/easy_install eureka-opensourceOr download thecompressed archive from PyPIorfrom Githuband run:$ ./bin/easy_install <archive>I.5 Database creationBy default, Eureka is using a standard SQLite database for its persistence. So to create the database and its schema, you can use the followingNagare command:$ ./bin/nagare-admin create-db eurekaI.6 Standalone application startupNow that your application has been successfully set up, you can run it in standalone mode using the following command:$ ./bin/nagare-admin serve eurekaAnd Voilà, you can now access your Eureka by accessinghttp://127.0.0.1:8080in your favourite browser.II Application configuration & customizationThis section covers the main areas you may want to customize within your Eureka instance.Please note that the below changes are explained in the context of a fresh copy of the code that is not yet installed. If this is already the case, you can still apply these changes but the provided locations will be different. Indeed, please consider the result of the following command as being your<EUREKA_DIR>onwards or just re-install Eureka after any customization:$ <EUREKA_DIR>/bin/python -c "import pkg_resources; print pkg_resources.get_distribution('eureka-opensource').location"II.1 Nagare related configurationAs Nagare is based upon the Nagare Framework, the default configuration for the application can be found in<EUREKA_DIR>/conf/eureka.cfg.In order to understand how to customize non domain specific parameters such as some basic application settings or the type of database to use, you can refer tothis pageto find the needed information.II.2 Eureka specific configuration & customizationIn order to customize your application, you can modify the configuration file available at<EUREKA_DIR>/conf/eureka.cfgand adapt it to your taste.
ThisEUREKA_DIRcan be found using the following command:$ <EUREKA_DIR>/bin/python -c "import pkg_resources; print pkg_resources.get_distribution('eureka-opensource').location"Among the configurable aspects of Eureka can be found:security: Security configuration (cookies/password)points: Points weightingmail: E-mail/recipientshtml: Presentation related optimizationfilesystem: The data directory locationsearch_engine: By default uses Whoosh, but can also support Solrdashboard: Configuration of satistics to be displayed on your dashboardDetailed explanations on the aforementioned sections can be found directly within the<EUREKA_DIR>/conf/eureka.cfgconfiguration file.Idea domainsIn order to import custom idea domains, you can use the following commands:$ cd <EUREKA_DIR>
$ ./bin/nagare-admin eureka batch <EUREKA_DIR>/eureka/batch/populate_domains -c <CSV_FILEPATH>The CSV filepath to be given as an argument has to be formatted similarly to what you can see in<EUREKA_DIR>/data/fixtures/domains.csv. Although automatically detected, the recommended delimiters for your CSV are the comma,or the semicolon;.Article topicsIn order to import custom article topics, you can use the following commands:$ cd <EUREKA_DIR>
$ ./bin/nagare-admin eureka batch <EUREKA_DIR>/eureka/batch/populate_article_topics -c <CSV_FILEPATH>The CSV filepath to be given as an argument has to be formatted similarly to what you can see in<EUREKA_DIR>/data/fixtures/article_topics.csv. Although automatically detected, the recommended delimiters for your CSV are the comma,or the semicolon;.Event based point weightingIn order to customize the number of points awarded to a given user following the below events, you can override the default values by adding a[points]section within you configuration file and add the following entries:first_connection: Allocated upon first ever connectionfirst_connection_of_the_day: Allocated upon first connection of the dayvote: Allocated whenever voting. Limited to 3 times a dayadd_comment: Allocated whenever making a comment. Limited to twice a daypublish_idea: Allocated once publishing an idea. Equally divided among every co-authorpublish_challenge_first_idea: Awarded to the author(s) publishing the first idea of a challenge. Also equally divided among every authorapproval: Awarded to the author(s) whenever its idea gets approved. Also equally divided among every authorchange_avatar: Given to a user everytime he changes his avatarselect_idea: Awarded to the author(s) whenever its idea gets selected. Also equally divided among every authorsend_project_idea: …send_prototype_idea: …II.3 Customized translationsIn order to internationalize your Eureka you may want to change the default translations. The translations files, located within thedata/localefolder (with*.poextensions) of the project have to be compiled after any modification.Based onBabel, you can compile these translation files using the following command:$ <EUREKA_DIR>/bin/pybabel compile -d $EUREKA_DIR/data/localeIf you want further details on how to compile handle internationalization usingBabel, you can refer tothis Babel documentation.User status levelsIn order to customize the labels for the different user levels, you can edit them in themessage.polocated within the following path for the<LANG>language:``<EUREKA_DIR>/data/locale/<LANG>/LC_MESSAGES/messages.po``Their related message ID (i.e.msgidwithin the file) are:status_level0which is by default translated asInactivein englishstatus_level1which is by default translated asPioneerin englishstatus_level2which is by default translated asExplorerin englishstatus_level3which is by default translated asDiscovererin englishstatus_level4which is by default translated asVisionaryin englishstatus_level5which is by default translated asBrilliantin englishPlease note that these translations will then need to be re-compiled using the aforementioned batch command in section I.3.Idea state labelsIf you want to customize the idea state labels, you do so by editing the<EUREKA_DIR>/data/locale/<LANG>/LC_MESSAGES/messages.pofiles by changing the message IDs (i.e.msgid) ending with_STATE(e.g.PROTOTYPE_STATE)Please note that these translations will then need to be re-compiled using the aforementioned batch command in section I.3.II.3 Publisher configurationIf you are interested in deploying Eureka into a production server, you can use the publishers supported byNagareas described in the itsdocumentation.Among the supported Web servers can be found:NginxApache Web ServerLighttpdThese web serve can serve your Eureka application via their FastCGI module.To help you write your web server configuration, Nagare providescreate-rules commandthat will generate the rules needed to serve your Eureka instance.III ContributeIII.1 Development modeIn order to install Eureka in development mode, you can simply type:$ <EUREKA_DIR>/bin/easy_install --editable --build-directory <EUREKA_DIR> eureka-opensourceIII.2 ContributingContributions in the form of pull requests are always welcome. To do so, these can be done through either viaour Github repositoryorthe Bitbucket one.So do not hesitate to fork the main repository and make pull requests!III.3 Coding styleUse PEP-8 as a coding standard. Ignored PEP8 errors can be found in thesetup.cfgfile within the[pep8]section.III.4 TestingContributions covered by tests are encouraged to help us raise the stability of Eureka.We usenoseto run our tests.