Skip to content

jdreddaway/preferential-voting

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 

Repository files navigation

preferential-voting

A service for running preferential voting elections.

Developers

If you are getting weird Eclipse errors, try mvn install then Eclipse project clean.

Getting Started

Load Project into Eclipse

  1. Install the Java 7 SDK (the version that appengine uses)
  2. Install Eclipse EE. Make sure it is EE!
  3. Install the Google Plugin for Eclipse and Google App Engine SDK. Click here for instructions.
  4. Git checkout the project.
  5. Import the project into Eclipse as an existing maven project.
  6. Resolve errors
  7. Create directory preferential-voting/target/generated-sources/annotations. Try compiling to get this to go away.
  8. For "Plugin execution not covered by lifecycle configuration: ...endpoints_get_discovery_doc...", mark it as ignored in Eclipse preferences.
  9. "Target Runtime Google App Engine (...) is not defined." - Quick Fix create new runtime Google App Engine
  10. Project > Maven > Update Project
  11. Add maven clean install run configuration in Eclipse and run. (This does Dagger stuff).
  12. Add maven install run configuration in Eclipse and run.

Some of these steps were taken from Using Apache Maven. Take a look there if you get lost.

Set up Local MySQL Database

To test locally, you'll need to have a local MySQL server running.

  1. Install a mysql server.

  2. Download mysql-server by following the instructions here. Make sure you get mysql version 5.7. For linux, follow all of the instructions on [A Quick Guide to Using the MySQL APT Repository](A Quick Guide to Using the MySQL APT Repository).

  3. Run set_up_local_db.sql by running the following command (changing <password> to the root's password):

     mysql -hlocalhost -uroot -p<password> < set_up_local_db.sql
    

set_up_local_db.sql does not work well if things are already set up. If you are trying to update, it might be best to delete the user and database beforehand or run all of the commands manually.

Common Tasks

Make Requests via the Web UI

  1. Run the appengine:devserver maven target to start devserver.
  2. Navigate to http://localhost:8080/_ah/api/explorer in a browser.
  3. Allow unsafe scripts (sometimes not necessary). In Chrome, click on the shield at the right side of the navigation bar.
  4. Find the endpoint you wish to use.

For more information, see Google Cloud Platform's Testing and Deploying an API Backend.

Generate Dagger Classes

You will need to do this every time you change a Dagger class.

  1. Run the maven clean and compile goals.
  2. Refresh the project if errors persist. (F5 on project in explorer)

About

A service for running preferential voting elections.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages