-
Notifications
You must be signed in to change notification settings - Fork 2
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
Extract input data and output rendering to separates files #3
base: main
Are you sure you want to change the base?
Conversation
vote_map = {'agree': 1, 'disagree': -1} | ||
votes = [[vote_map.get(v, 0) for v in user_votes] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
vote_map = {'agree': 1, 'disagree': -1} | |
votes = [[vote_map.get(v, 0) for v in user_votes] | |
vote_map = {'agree': 1, 'disagree': -1, 'pass': 0} | |
votes = [[vote_map.get(v) for v in user_votes] |
To be more explicit about when something unexpected happens, and avoid dividing assumptions between two lines :)
Divisive Statements: | ||
{%- for stmt, agree in divisive_data %} | ||
{%- if agree >= 0.5 %} | ||
- {{ stmt }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we print a numerical value to better see when things change in output?
Consensus Statements: | ||
{%- for stmt, score, agree in consensus_data %} | ||
{%- if agree < 0.5 %} | ||
- {{ stmt }} ({{ 'strong agreement' if score > 0.5 else 'strong disagreement' }}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we print a numerical value to better see when things change in output?
{%- for grp_id, positions in group_data.items() %} | ||
Group {{ grp_id }} characteristics: | ||
{%- for stmt, opinion in positions %} | ||
- {{ 'strongly agrees with' if opinion > 0 else 'strongly disagrees with' }}: {{ stmt }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As per comments :)
Attempt to extract some noisy details while keeping readability.