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 script to report inactive users in GitHub orgs #83

Merged
merged 13 commits into from
Jan 27, 2025

Conversation

Carreau
Copy link
Member

@Carreau Carreau commented Jan 14, 2025

This script try to pull the last activity of users across Jupyter Org.

Note that this is likely this is the last activity of the user on GitHub, not on the org, so there might be users that are not contributing to jupyter anymore.

For example, it show that I am active (as of a few hours ago) on orgs I haven't touched in month.

@Carreau
Copy link
Member Author

Carreau commented Jan 14, 2025

@dlqqq

@Carreau Carreau requested a review from dlqqq January 15, 2025 12:59
@dlqqq
Copy link
Contributor

dlqqq commented Jan 15, 2025

Reviewing now.

@dlqqq dlqqq changed the title Lat acct Add script to report inactive users in GitHub orgs Jan 15, 2025
Copy link
Contributor

@dlqqq dlqqq left a comment

Choose a reason for hiding this comment

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

@Carreau Thank you so much for building this! Left a few minor suggestions below. Tested the tool locally and it works great. 👍

Comment on lines +7 to +17
import os
import asyncio
import aiohttp
from rich import print
from datetime import datetime, timezone, timedelta
import humanize
from itertools import count
import diskcache
import pathlib
from typing import Optional, List, Dict
import argparse
Copy link
Contributor

Choose a reason for hiding this comment

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

In the docstring at the top:

  1. I suggest we list all required third-party dependencies. From my testing, these are: humanize, aiohttp, diskcache, rich.
  2. I also suggest we mention that the GH_TOKEN environment variable needs to be set to a GitHub API token.

tools/last_user_activity.py Outdated Show resolved Hide resolved
@Carreau Carreau merged commit 1aee41c into jupyter:main Jan 27, 2025
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.

2 participants