Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added functionality to question extract to process survey tasks (for user skill calculation) #673

Merged
merged 3 commits into from
Jan 23, 2023

Conversation

ramanakumars
Copy link
Collaborator

The current survey extractor creates a list of dictionaries, which breaks the current user skill calculation (see #607). As a workaround, we have updated the question extractor to process survey task-like inputs. This is done using a simple switch where if the input is a dictionary (as it is for survey tasks), we parse the dictionary keys to get the output in a compatible fashion to the traditional question task output. We have added a new question extractor test to cover this change.

We also made minor fixes to the user skill calculation and make the k-class processing be case insensitive.

@ramanakumars
Copy link
Collaborator Author

cc @lcjohnso @AgentM-GEG

@ramanakumars ramanakumars marked this pull request as ready for review January 13, 2023 21:56
Copy link
Collaborator

@CKrawczyk CKrawczyk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just one small non-blocking format issue, otherwise it looks good to me. Let me know when you want to have this PR merged.

Comment on lines 119 to 123
single_pluck_classification,
single_pluck_expected,
"Test pluck field functionality with a question extractor",
kwargs={'pluck': single_pluck_keys},
test_name='TestSinglePluck')
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't add the extra spaces here (this is one part of PEP8's style I don't agree with. I would rather the style be:

TestSinglePluck = ExtractorTest(
    extractors.question_extractor,
    single_pluck_classification,
    ...
)

I think it looks cleaner than having a large blank space on each line.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed! Ready for merging whenever you have the chance!

@CKrawczyk
Copy link
Collaborator

I will merge on Monday to avoid a Friday deploy.

@CKrawczyk CKrawczyk merged commit 90153a9 into zooniverse:master Jan 23, 2023
@CKrawczyk CKrawczyk deleted the feedback_fix branch January 23, 2023 09:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants