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

Add metrics #38

Merged
merged 10 commits into from
Feb 28, 2021
Merged

Add metrics #38

merged 10 commits into from
Feb 28, 2021

Conversation

ytturi
Copy link
Owner

@ytturi ytturi commented Feb 28, 2021

Case

Close #16

Observations

Added dependencies:

  • sqlalchemy
  • psycopg2

Using PostgreSQL as the metrics database (at least for now)
This also unblocks us for #9 as we can now update the message and store the content.

@ytturi ytturi added the Ready ✔️ Ready to be reviewed/merged label Feb 28, 2021
@ytturi ytturi requested a review from gdalmau February 28, 2021 14:51
question = "\n".join(old_message.split("\n")[:-4])

mel_votes = [
(f'@{row["username"]}', row["vote"]) for row in votes if row["vote"] > 0
Copy link
Collaborator

Choose a reason for hiding this comment

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

Just a minor note: if a user doesn't have @username it will use the public name

Copy link
Owner Author

Choose a reason for hiding this comment

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

Same behaviour as before 👍
I've added the missing docstring to the get_username method.

@ytturi ytturi added this to the v1.02 milestone Feb 28, 2021
@ytturi ytturi merged commit b8957fc into master Feb 28, 2021
@ytturi ytturi deleted the add_metrics branch February 28, 2021 15:13
@ytturi ytturi mentioned this pull request Mar 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Ready ✔️ Ready to be reviewed/merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add metrics generator
2 participants