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

Create Label Report in Google Spreadsheet #5810

Open
19 tasks
Tracked by #5812
kimberlytanyh opened this issue Oct 30, 2023 · 7 comments
Open
19 tasks
Tracked by #5812

Create Label Report in Google Spreadsheet #5810

kimberlytanyh opened this issue Oct 30, 2023 · 7 comments
Labels
Complexity: Medium Dependency An issue is blocking the completion or starting of another issue Draft Issue is still in the process of being created Feature: Board/GitHub Maintenance Project board maintenance that we have to do repeatedly feature: Issues Dashboard role: data analyst size: 1pt Can be done in 4-6 hours

Comments

@kimberlytanyh
Copy link
Member

kimberlytanyh commented Oct 30, 2023

Dependency

Overview

We need to create a data set with newly added and deleted labels, so that we can add them to a dashboard.

Detail

In a recent meeting, we noticed that there were instances when volunteers would add their own labels or delete official labels from the website team repository (accidentally or without permission). We want to catch these early to prevent any resulting problems.

When this issue is completed, there will be a spreadsheet (as the source of truth) that will show labels that have not yet been reviewed and it will release the dependency on creating the dashboard for a report that product will use to fix labels.

Preparing to work on this issue

You will need to be added to the following resources:

Action Items

Part 1: Creating a new dataset with labels

  • Use GitHub API to retrieve all existing labels in the website repository in a Jupyter Notebook
  • Format these labels into a dataset
  • Create an empty spreadsheet in the HackforLA.org website Google Drive (see Resource 5 for the link)
  • Log into webadmin@hackforla.org (use Hack for LA's 1Password account)
    • Create a new project in the Google Cloud Console under the webadmin@hackforla.org account
      • Create a Service Account credential for the project (Refer to Resource 3)
      • Get json key (Refer to Resource 3)
      • Connect the service account email to the blank Google spreadsheet by adding it under Share (Refer to Resource 3)
  • Send the labels to the blank Google sheet you created to act as a "source of truth" on all official labels currently in use

Part 2: Using the API to compare data sets, each with labels

We'll now repurpose the API call above to be used to detect new labels added or labels deleted from the website repository in the future (your code, once perfected, is to be added to the .py script currently in use for the dashboard in the live-dashboard-automation repository)

  • Read in all official labels in use from the Google Sheet you created in Part 1 above using Google API
  • Perform API call to retrieve all labels from the website repository (just copy the code from Part 1)
  • Compare the labels pulled in by the API call in Part 2 to the list of labels from the Google spreadsheet from Part 1
  • Create dataset with labels that are not in or missing from the Part 1 Google sheet's list of official labels
  • Send the dataset to "Unreviewed Newly Added or Deleted Labels" sheet (tab) in the "GitHub Project Board Issues - Data Analysis" spreadsheet (Refer to Resource 5.I and Resource 1/3/4)
  • Once you are sure everything is working well, add your code for Part 2 to the .py script in live-dashboard-automation repository (Test using the .ipynb file -Project Board Dashboard Script Editable.ipynb before adding code, pushing, and merging changes in the .py file to the main repository)
  • Release the dependency on Create Landing Page for Anomaly Report in Looker Dashboard #5812
    • add links to whatever assets you created, into the resources section of the issue
    • move it into the new issue approval column
    • add the ready for prioritization label

Resources/Instructions

  1. Editable version of Python script that handles cleaning and sending of data to Resource 5.I's "Unreviewed Newly Added or Deleted Labels" sheet (tab) (for testing)

  2. Template for .env file to go with Resource 1 (You need to get your own GitHub token - See Resource 6 - and add it to a .env file along with other credentials to run Resource 1)(Note: You can directly add the credentials in Resource 1 but it would be inconvenient when you want to share your work later without revealing your confidential information)

  3. Using Google API to Send and Read Data to Google Sheets: Update Google Sheets Using A Service Account With Google Sheets API In Python, How to Analyze Data in Google Sheets With Python: A Step-By-Step Guide

  4. Repository controlling automation of script run to update Looker dashboard

  5. Google Drive folder: Dashboard to put any additional resources created

    1. GitHub Project Board Issues - Data Analysis spreadsheet
  6. Slides with instructions on how to create GitHub token (see Appendix)

  7. Looker dashboard being worked on

  8. Refer to issue Create Project Board Looker Dashboard for Different Roles  #4921 for information on Looker dashboard involved

  9. How to use .env file: Just add the .env file to the same folder where your Jupyter Notebook is to use it.

@kimberlytanyh kimberlytanyh added Feature Missing This label means that the issue needs to be linked to a precise feature label. size: missing Draft Issue is still in the process of being created role missing Complexity: Missing labels Oct 30, 2023
@github-actions

This comment was marked as resolved.

@kimberlytanyh kimberlytanyh added Feature: Board/GitHub Maintenance Project board maintenance that we have to do repeatedly Complexity: Small Take this type of issues after the successful merge of your second good first issue size: 1pt Can be done in 4-6 hours role: data analyst and removed role missing Complexity: Missing Feature Missing This label means that the issue needs to be linked to a precise feature label. size: missing labels Oct 30, 2023
@kimberlytanyh kimberlytanyh changed the title Create Label Report for Looker Dashboard that Displays Labels Added and Deleted from Website Repository [Part 1] Create Label Report for Looker Dashboard that Displays Labels Added and Deleted from Website Repository Oct 30, 2023
@ExperimentsInHonesty
Copy link
Member

@kimberlytanyh This information should either be available in a repository, or in 1password, or a combination of both.

Contact me (kimberly.tan.yh@gmail.com) for Jupyter Notebook with script and the key required to access the "GitHub Project Board Issues - Data Analysis" spreadsheet

@ExperimentsInHonesty

This comment was marked as resolved.

@ExperimentsInHonesty
Copy link
Member

We will discuss with Sophia the best way to make Jupiter Notebook available without revealing secrets.

@ExperimentsInHonesty ExperimentsInHonesty changed the title Create Label Report for Looker Dashboard that Displays Labels Added and Deleted from Website Repository Create Label Report in Google Spreadsheet Oct 31, 2023
@jaasonw jaasonw assigned jaasonw and unassigned jaasonw Oct 31, 2023
@ExperimentsInHonesty ExperimentsInHonesty added this to the 08. Team workflow milestone Nov 6, 2023
@kimberlytanyh kimberlytanyh removed the Draft Issue is still in the process of being created label Nov 25, 2023
@kimberlytanyh
Copy link
Member Author

Hello @ExperimentsInHonesty, I just took a look at the issue again and made some edits. Both editable Jupyter notebooks and .env files have been added to the live-dashboard-automation repository and changes have been made accordingly to this issue. My contact information has been removed.

@ExperimentsInHonesty ExperimentsInHonesty removed the Complexity: Small Take this type of issues after the successful merge of your second good first issue label May 7, 2024
@ExperimentsInHonesty
Copy link
Member

ExperimentsInHonesty commented May 7, 2024

@Samhitha444
Copy link
Member

Samhitha444 commented Sep 29, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Complexity: Medium Dependency An issue is blocking the completion or starting of another issue Draft Issue is still in the process of being created Feature: Board/GitHub Maintenance Project board maintenance that we have to do repeatedly feature: Issues Dashboard role: data analyst size: 1pt Can be done in 4-6 hours
Projects
Status: New Issue Approval
Development

No branches or pull requests

4 participants