Commit 92fb8837 authored by D.H.D. Nguyen's avatar D.H.D. Nguyen
Browse files

update docstrings

parent 01cea134
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -61,8 +61,8 @@ class DevelopmentConfig(Config):
	SQLALCHEMY_DATABASE_URI = os.environ.get('DEV_DATABASE_URL') or \
								 'sqlite:///%s'%(os.path.join(basedir, 'database-dev.db'))
	MTURK_URL = 'https://mturk-requester-sandbox.us-east-1.amazonaws.com'
	AWS_ACCESS_KEY_ID = None#"AKIAI57NPWPWYHGOWIPQ"
	AWS_SECRET_ACCESS_KEY = None#"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"
	AWS_ACCESS_KEY_ID = None
	AWS_SECRET_ACCESS_KEY = None
	MTURK_SHOW_UP_URL = "https://workersandbox.mturk.com/"

class TestingConfig(Config):
+1 −1
Original line number Diff line number Diff line
@@ -25,7 +25,7 @@ def project(p_name):
		p_name (str): project name
		
	Returns:
		Information about each batch in project if they are submitted or not.
		Status of each batch in project if they are submitted by this annotator or not.
	
	"""

+4 −4
Original line number Diff line number Diff line
@@ -2,8 +2,8 @@
"""
*Module* ``project.generator``

This module provides some classes with purpose to generate and handle
different types of data during while running the application. This can be used
This module provides some classes to generate and handle
different types of data during running the application. This can be used
outside the application as it works independently.

"""
@@ -52,7 +52,7 @@ class BaseGenerator(object):

class DataGenerator(BaseGenerator):
	"""
	Extend :class:`BaseGenerator`. Create an object of input datas for the
	Extend :class:`BaseGenerator`. Create an object of input data for the
	survey based on input file(s).

	Args:
@@ -95,7 +95,7 @@ class DataGenerator(BaseGenerator):
	"""
	def __init__(self, num_iter=100, batch_size=20, minimum=5):

		# initialize all datas: items, tuples, batches
		# initialize all data: items, tuples, batches
		self.items = set()
		self.tuples = []
		self.batches = {}
+2 −2
Original line number Diff line number Diff line
@@ -258,9 +258,9 @@ class Data(db.Model):
	Attributes:
		id (:sql-type:`db.Integer <Integer>`): automatically defined data-id
		best_id (:sql-type:`db.Integer <Integer>`): id of item chosen as '**best**'
												in table 'items' 
												in table :class:`Item`
		worst_id (:sql-type:`db.Integer <Integer>`): id of item chosen as '**worst**'
												in table 'items'
												in table :class:`Item`
		anno_id (:sql-type:`db.Integer <Integer>`): id of annotator who submits/saves 
												this data (only in local annotator system)
		tuple_id (:sql-type:`db.Integer <Integer>`): id of the tuple this data uses
+1 −1
Original line number Diff line number Diff line
@@ -180,7 +180,7 @@ class ProjectInformationForm(FlaskForm):
		"""
		Validate uploaded files :attr:`upload`. 
		
		Check if uploaded file has one of the allowed extensions (*default:* ``{'txt'}``).
		Check if uploaded file(s) has/have one of the allowed extensions (*default:* ``{'txt'}``).
		"""
		ALLOWED_EXTENSIONS = set(['txt'])	
		if not any([allowed_file(file.filename) for file in self.data]):
Loading