Skip to content

Conversation

@eterps
Copy link
Owner

@eterps eterps commented Nov 27, 2024

Attempt to extract some noisy details while keeping readability.

Comment on lines +22 to +23
vote_map = {'agree': 1, 'disagree': -1}
votes = [[vote_map.get(v, 0) for v in user_votes]
Copy link
Collaborator

@patcon patcon Dec 30, 2024

Choose a reason for hiding this comment

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

Suggested change
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 }}
Copy link
Collaborator

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' }})
Copy link
Collaborator

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 }}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Same

Copy link
Collaborator

@patcon patcon left a comment

Choose a reason for hiding this comment

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

As per comments :)

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.

3 participants