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

🔨 indicator upgrader: use real users #3521

Merged
merged 5 commits into from
Nov 14, 2024
Merged

🔨 indicator upgrader: use real users #3521

merged 5 commits into from
Nov 14, 2024

Conversation

Marigold
Copy link
Collaborator

@Marigold Marigold commented Nov 11, 2024

Problem

When the indicator upgrader updates charts, the edits appear to be made by the last person who manually edited the chart, not by the person who ran the upgrade. This can cause confusion, especially when Slack notifications show updates attributed to users who haven’t interacted with the chart.

This PR addresses the issue by assigning updates to the user who runs the indicator upgrader. However, a drawback is that bulk upgrades (e.g., population or WDI) will be attributed to a single user, even if they are unrelated to the charts.


Implementation

  • Added a function to detect the user and their id in Streamlit.
  • Updated the indicator upgrader to use the detected user when making chart updates (instead of attributing them to the last editor).

@owidbot
Copy link
Contributor

owidbot commented Nov 11, 2024

Quick links (staging server):

Site Admin Wizard Docs

Login: ssh owid@staging-site-grapher-users

chart-diff: ❌
  • 0/4 reviewed charts
  • Modified: 0/4
  • New: 0/0
  • Rejected: 0
data-diff: ✅ No differences found
Legend: +New  ~Modified  -Removed  =Identical  Details
Hint: Run this locally with etl diff REMOTE data/ --include yourdataset --verbose --snippet

Automatically updated datasets matching weekly_wildfires|excess_mortality|covid|fluid|flunet|country_profile|garden/ihme_gbd/2019/gbd_risk are not included

Edited: 2024-11-14 13:30:19 UTC
Execution time: 4.68 seconds

@Marigold Marigold marked this pull request as ready for review November 11, 2024 10:44
Copy link
Contributor

@pabloarosado pabloarosado left a comment

Choose a reason for hiding this comment

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

Looks good, thanks for fixing this!

@lucasrodes lucasrodes changed the title 🔨 Use real users in indicator upgrader 🔨 indicator upgraderse real users Nov 13, 2024
@lucasrodes lucasrodes changed the title 🔨 indicator upgraderse real users 🔨 indicator upgrader: use real users Nov 13, 2024
@Marigold Marigold merged commit f7c7b23 into master Nov 14, 2024
6 of 7 checks passed
@Marigold Marigold deleted the grapher-users branch November 14, 2024 13:33
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