Greetings,
Following up from a comment posted yesterday.
I am going to try Election OpenSTV, which I have installed on my Drupal dev site in the MAMP environment.
Now that the module is installed, how and where do I install the OpenSTV source code so that I can use the module?
I am a python n00b, so assistance here is appreciated. Within MAMP, in the directory of my development site if I do whereis python, I get:
/usr/bin/python
If I do which python, I get:
/Library/Frameworks/Python.framework/Versions/Current/bin/python
My question is what commands I use to install the OpenSTV source and where it is placed. I downloaded the free version from Github. My plan is to try it on MAMP first and if testing works out to deploy it on my live site @ frontlinefreelance.org.
Many thanks
| Comment | File | Size | Author |
|---|
Comments
Comment #1
pjcdawkins commentedYou can save the OpenSTV files anywhere - nothing needs to be compiled. I recommend you save them outside your web root though, for security reasons.
Essentially you then just need to find the path to the file "runElection.py". So, if you downloaded the GitHub ZIP file and extracted it to /home/radiocontrolled/openstv, the file path would be
/home/radiocontrolled/openstv/openstv/runElection.py.In the Drupal site, visit
admin/config/election/openstvto configure the "OpenSTV command", which for you would be this:Then try it out on an election (one where there have already been some votes).
Comment #2
pjcdawkins commentedComment #3
opstao commentedI am not able to follow this description in the context of the Mac version of OpenSTV. I have downloaded OpenSTV and prior to that, had installed the Mac version of Python. Elections_OpenSTV is enabled in the dev site and I have a test election with results. But I can't identify an OpenSTV command that is accepted as valid in Config>OpenSTV integration. I tried using "show package contents" on the .app, but there is no "runElection.py" within. I tried the technique of dragging OpenSTV.app into Mac Terminal, which generates the correct path from the Unix perspective. [In my case, that takes the form "/Users/myname/Documents/projectname\ site/OpenSTV/OpenSTV.app."] Copy and paste of that was not accepted.
What can you suggest? I need to demonstrate the possibility of results to the client, and so far the trial of OpenSTV is not providing that.
Comment #4
pjcdawkins commented@OpsTao: have you downloaded the source code of OpenSTV, not the packaged version? What you get on openstv.org is a closed-source package. Source code is available here: https://github.com/OpenTechStrategies/openstv
Comment #5
opstao commentedThank you for the additional info. Sorry about my lack of experience but I need more help:
But that is not accepted in Config. What do I need to do differently?
** However that does not look correct to me, because the true "projectname" folder is "projectname site." Don't understand why it generated "projectname\ site." Directories in path must not contain spaces?
Thank you x10 for help.
Comment #6
pjcdawkins commented@OpsTao
chmod +x /Users/myname/Documents/projectname\ site/ELECTIONS/OpenSTV/openstv-master/openstv/runElection.pyand then try to configure Election OpenSTV again with that path name./Users/myname/Documents/openstv-master. Try the configuration again.Comment #7
opstao commentedWorking! Thanks Much!