Skip to content

Commit 337e38c

Browse files
committed
Add comments so it's clear what answer_texts is for
1 parent a66a047 commit 337e38c

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/harmony/util/instrument_helper.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,12 @@ def create_instrument_from_list(question_texts: list[str], answer_texts: list[li
3737
file_name="My file") -> Instrument:
3838
"""
3939
Read a list of strings and create an Instrument object.
40+
41+
:param question_texts: The main part of the texts of the questions in the questionnaires, e.g. ["I feel nervous", "I feel afraid"]
42+
:param answer_texts: Optional parameter where you can provide the response options. This is a list of lists of the same length of the list of questions. Each item in the list of lists is a list containing the options for that question. E.g. [["Rarely", "Often"], ["Rarely", "Sometimes", "Never"]] would represent the options for a questionnaire consisting of two questions.
43+
:param question_numbers: Optional parameter where you can provide the original question numbers associated with the questions. This list should be the same length as `question_texts`. Question numbers can be strings.
44+
:param instrument_name: Optional metadata containing name of the instrument.
45+
:param file_name: Optional metadata containing name of the file.
4046
:return: Single Instrument.
4147
"""
4248
questions = []

0 commit comments

Comments
 (0)