-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: continue site mentor-ship questionnaire implementation (#171)
* feat: add support for dependent answers * fix:update questionnaire data * feat: (continue) adding support for dependent answers * fix:re-format questionnaire data * feat: initial implementation of question answer constraint checkers * questionnaire data constraints * questionnaire models tests * questionnaire view tests * questionnaire view tests * chore: refactor default question metadata options * fix: implement marking question groups as non-applicable and calculating responses submission status * questionnaire models and view tests * fixes:improved tests on questionnaire models and views * feat: implement end to end questionnaire functionality * chore: optimize questionnaire loading performance * chore: rename questionnaire to responses where applicable. * chore: add tests for the Question model. * chore: add tests for the QuestionGroup model. * fix: mypy errors * chore: finish model tests * chore: add tests for QuestionnaireResponses ViewSet * chore: prepare for deployment Co-authored-by: saladgg <saladguyo60@gmail.com>
- Loading branch information
1 parent
f03e5e1
commit 9d9ca6d
Showing
40 changed files
with
3,428 additions
and
619 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
from typing import Optional | ||
|
||
from .models import Question | ||
|
||
|
||
class ConstraintCheckError(ValueError): | ||
... | ||
|
||
|
||
class InvalidQuestionMetadataError(ValueError): | ||
def __init__( | ||
self, | ||
metadata_option: str, | ||
question: Question, | ||
error_message: Optional[str] = None, | ||
): | ||
self.metadata_option: str = metadata_option | ||
self.question = question | ||
self._error_message = error_message or ( | ||
'Invalid metadata value/configuration for metadata option "%s" on question "%s".' | ||
% (self.metadata_option, str(self.question)) | ||
) | ||
super(InvalidQuestionMetadataError, self).__init__(self._error_message) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 0 additions & 18 deletions
18
fahari/sims/migrations/0002_questionanswer_is_not_applicable.py
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.