Skip to content

Commit

Permalink
Sphinx threw several pages worth of warnings when compiling the docs,…
Browse files Browse the repository at this point in the history
… most of them having to do with formating errors. I cleared these up and made the formating more consistent between all pages. There's only a couple of errors left now that I couldn't solve easy.
  • Loading branch information
Speldosa committed Apr 2, 2018
1 parent 98058a2 commit f5812a2
Show file tree
Hide file tree
Showing 67 changed files with 805 additions and 633 deletions.
51 changes: 29 additions & 22 deletions doc/amt_setup.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,26 +8,27 @@ of steps involved here which have to do with signing up with Amazon.
Luckily they are a one-time process (possibly once for your
entire lab if everyone shares a single AWS account).


Creating an AWS account
----------------------------------
~~~~~~~~~~~~~~~~~~~~~~~

Start by going to the Amazon Web Services page `here <http://aws.amazon.com>`__. If you made a Mechanical Turk account prior to this, sign in to your account and may skip to the next paragraph. Otherwise, click the Sign Up button at the top.
Start by going to the Amazon Web Services page `here <http://aws.amazon.com>`__. If you made a Mechanical Turk account prior to this, sign in to your account and may skip to the next paragraph. Otherwise, click the Sign Up button at the top.

.. image:: images/docs_AWS_signup_button.png
:align: center


You should be redirected to a form asking for your contact information. Fill out the form and continue to the next section.
You should be redirected to a form asking for your contact information. Fill out the form and continue to the next section.

.. image:: images/docs_AWS_form_contact_info.png
:align: center
:align: center

Next, you will need you credit card and your phone. The form should now ask for your credit card information.
Next, you will need you credit card and your phone. The form should now ask for your credit card information.

.. image:: images/docs_AWS_form_credit_card.png
:align: center
:align: center

If you do not see the forms to fill in your credit card information, go to the Payment Methods page either by clicking the link on the toolbar to the left or `here <https://portal.aws.amazon.com/gp/aws/developer/account?ie=UTF8&action=payment-method>`__. Enter in your credit card information. (Amazon will only charge you, if you use their cloud services. Signing up for an account should not incur any charges.)
If you do not see the forms to fill in your credit card information, go to the Payment Methods page either by clicking the link on the toolbar to the left or `here <https://portal.aws.amazon.com/gp/aws/developer/account?ie=UTF8&action=payment-method>`__. Enter in your credit card information. (Amazon will only charge you, if you use their cloud services. Signing up for an account should not incur any charges.)

On the next page, you will be asked to enter your phone number. Have your phone nearby. After you put in your phone number the webpage will display a 4-digit pin code and Amazon will call you. Enter the pin on your phone's keypad when prompted by the call.

Expand All @@ -38,39 +39,40 @@ On the next page, you will be asked to enter your phone number. Have your phone
.. image:: images/docs_AWS_form_pin.png
:align: center

Amazon will ask you to select a support plan. For the purposes of psiTurk, you only need the Basic(Free) plan. Click continue.

Your Amazon Web Service account should be set up now.
Amazon will ask you to select a support plan. For the purposes of psiTurk, you only need the Basic(Free) plan. Click continue.

Your Amazon Web Service account should be set up now.


Obtaining AWS credentials
------------
~~~~~~~~~~~~~~~~~~~~~~~~~

An AWS access key id and secret access key is required for posting new HITs to Mechanical Turk as well as monitoring existing HITs. If you created an AWS access key and did not save your secret access key, you will need to create a new access key. After April 21, 2014, AWS no longer allows users to retrieve their secret access key. Follow the steps below to create a new key.
An AWS access key id and secret access key is required for posting new HITs to Mechanical Turk as well as monitoring existing HITs. If you created an AWS access key and did not save your secret access key, you will need to create a new access key. After April 21, 2014, AWS no longer allows users to retrieve their secret access key. Follow the steps below to create a new key.

You can create your keys after you open an Amazon Web Services account. Your keys can be generated in the `AWS Management Console <https://console.aws.amazon.com/iam/home?#security_credential>`__.

Click on the "Access Keys" tab. Your screen should look like this:
Click on the "Access Keys" tab. Your screen should look like this:

.. image:: images/docs_AWS_credentials_page.png
:align: center
:align: center

Press the "Create New Access Key" button to generate a set of access keys.

.. image:: images/docs_AWS_credentials_create_button.png
:align: center

A popup window should appear on the screen to tell you that your access key has been created. Your access keys will appear in the popup box.
A popup window should appear on the screen to tell you that your access key has been created. Your access keys will appear in the popup box.

.. image:: images/docs_AWS_credentials_created_popup.png
:align: center

If you do not see your access key, click the "Show Access Key" link in the popup box.
If you do not see your access key, click the "Show Access Key" link in the popup box.

.. image:: images/docs_AWS_credentials_show_button.png
:align: center

We recommend that you also download your access keys just in case. The "Download Key File" button will download the keys onto your computer in a CSV file.

.. image:: images/docs_AWS_credentials_download_button.png
:align: center

Expand All @@ -82,16 +84,21 @@ The values of these keys need to be placed in your global ``~/.psiturkconfig`` f
If you are using IAM authentication, **psiTurk** requires that the *AmazonMechanicalTurkFullAccess* policy be added to the credentials it uses to connect to MTurk.
See `here <http://docs.aws.amazon.com/AWSMechTurk/latest/AWSMechanicalTurkGettingStartedGuide/SetUp.html#create-iam-user-or-role>`__ for how to set up an IAM user.


Creating an AMT Requester account
----------------------------------
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

To use your AWS keys to interface with Amazon Mechanical Turk, you need to create a requester account.
Please see `Amazon's instructions <http://docs.aws.amazon.com/AWSMechTurk/latest/AWSMechanicalTurkGettingStartedGuide/SetUp.html>`__ for this. In particular, it is necessary to at least once login to the requester site (`http://requester.mturk.com <http://requester.mturk.com>`__) and also to at least once login to the sandbox requester site (`https://requestersandbox.mturk.com <https://requestersandbox.mturk.com>`__), so that you can agree to the terms of service.


Linking funds
----------------------------------
~~~~~~~~~~~~~

Under construction.


Additional instructions
~~~~~~~~~~~~~~~~~~~~~~~

Additional instructions
----------------------------------
Under construction.
7 changes: 2 additions & 5 deletions doc/anatomy_of_project.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,10 @@ Every **psiTurk** compatible project should include a few basic files.
As an example here is the file listing of the `Stroop example <stroop.html>`__
which is included in a default **psiTurk** installation.

These files might all seem mysterious at first, but this section of the
documentation explains their purpose. Of course, projects can include additional
These files might all seem mysterious at first, but this section of the
documentation explains their purpose. Of course, projects can include additional
files as needed but these are basics that most projects will want to include.



.. toctree::
:maxdepth: 2

Expand All @@ -20,4 +18,3 @@ files as needed but these are basics that most projects will want to include.
file_desc/server_log
file_desc/static_folder
file_desc/templates_folder

22 changes: 11 additions & 11 deletions doc/api.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
psiturk.js API
=======
==============

Everything in the **psiturk.js** API is scoped under the ``psiturk``
namespace.
Expand All @@ -9,7 +9,7 @@ Creating the **psiTurk** object

To use the **psiTurk** library, a ``psiturk`` object must be created at
the beginning of your experiment. It takes two key arguments ``uniqueId``
and ``adServerLoc``. These two variables are first created in
and ``adServerLoc``. These two variables are first created in
`exp.html <file_desc/exp_html.html>`. They tell **psiTurk** which unique
number/code corresponds to the current participant (allowing updating
of data as the task progresses) and the location of the `ad <secure_ad_server.html>`__
Expand Down Expand Up @@ -89,6 +89,7 @@ Example:
Retrieve a stored HTML object that has been preloaded using
``psiturk.preLoadPages``.


``psiturk.showPage(pagename)``
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Expand All @@ -108,6 +109,7 @@ Example:

Cache each image in ``imagelist`` for use later.


``psiturk.recordTrialData(datalist)``
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Expand Down Expand Up @@ -148,16 +150,15 @@ success or failure of the saving.
.. code-block:: javascript
psiturk.saveData({
success: function() {
success: function() {
// function to run if the data is saved
},
error: function() {
error: function() {
// function to run if there was an error
}
});
``psiturk.completeHIT()``
~~~~~~~~~~~~~~~~~~~~~~~~~~

Expand All @@ -170,9 +171,9 @@ and the user's browser will correctly finish the HIT on Amazon's
site.



``psiturk.doInstructions(pages, callback)``
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

**psiTurk** includes a basic method for showing a sequence of
instructions. You are always free to write your own instructions
code (and may need to). However, this provides a basic template
Expand All @@ -196,7 +197,6 @@ Within each HTML page there should be a button or other HTML
element with class equal to ``continue`` which the user
can click to move to the next screen.


An `Bootstrap <http://getbootstrap.com>`__ example is::

<button type="button" id="next" value="next" class="btn btn-primary btn-lg continue">
Expand All @@ -208,7 +208,7 @@ with class ``previous`` it will, when clicked, go to the previous
page. As a result you should not include a previous button on the
first HTML page.

An example previous button using `Bootstrap <http://getbootstrap.com>`__ is:
An example previous button using `Bootstrap <http://getbootstrap.com>`__ is: ::

<button type="button" id="next" value="next" class="btn btn-primary btn-lg previous">
<span class="glyphicon glyphicon-arrow-left"></span> Previous
Expand All @@ -231,15 +231,15 @@ Example
"instructions/instruct-1.html",
"instructions/instruct-2.html",
"instructions/instruct-3.html"]; // however, you can have as many as you like
psiturk.doInstructions(instructionPages,
psiturk.doInstructions(instructionPages,
function() { currentview = new StroopExperiment(); });
The last line in this example uses an anonymous function
to launch the `Stroop Experiment <stroop.html>`__.


``psiturk.finishInstructions()``
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

``finishInstructions`` is used to change the participant's status code
to ``2`` in the database, indicating that they have begun the actual
Expand Down
8 changes: 5 additions & 3 deletions doc/command_line/amt_balance.rst
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
``amt_balance`` command
========================
=======================


Usage
------
-----

::

amt_balance

The ``amt_balance`` command displays your current AMT balance, or your worker sandbox balance (always $10,000.00) if you are in sandbox mode.


Example
--------
-------

Checking your balance in sandbox mode::

Expand Down
14 changes: 9 additions & 5 deletions doc/command_line/config.rst
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
``config`` command + subcommands
==================================
================================

.. contents::


Description
-----------

The ``config`` command is used with a variety of subcommands to control the
current configuration context


``config print``
-------------
----------------

Prints the current configuration context (both local and global config options).

Expand All @@ -35,11 +37,14 @@ Example
launch_in_sandbox_mode=true
[psiTurk server:on mode:sdbx #HITs:0]$


``config reload``
--------------
-----------------

Reloads the current config context (both local and global files). This will
cause the server to restart.


Example
~~~~~~~

Expand All @@ -55,7 +60,6 @@ Example


``config help``
------------------
---------------

Display a help message concerning the config subcommand.

Loading

0 comments on commit f5812a2

Please sign in to comment.