Skip to main content

Command-line Swiss Army Knife for GitHub Classrooms

Project description

gh-class-sak

A command-line Swiss Army Knife for managing GitHub Classrooms, with optional Canvas LMS integration for group matching.

Installation

pip install gh-class-sak

Requires Python 3.9+.

Authentication

GitHub

The tool uses your GitHub token, resolved in this order:

  1. GH_TOKEN environment variable
  2. gh auth token (GitHub CLI)

Canvas (optional)

For --group features, create a config file at ~/.config/gh-class-sak.ini:

[CANVAS]
url = https://your-canvas-instance.instructure.com
token = YOUR_CANVAS_API_TOKEN

[COURSES]
CMPE-142 = sp26-142
CMPE-195A = 195A

The [COURSES] section maps Canvas course name partials (keys) to GitHub classroom name partials (values). Matching is case-insensitive and treats hyphens, underscores, and spaces as equivalent.

Usage

classrooms

List all classrooms and their assignments.

gh-class-sak classrooms

Output format: CLASSROOM: ASSIGNMENT

repos list

List repos for a classroom assignment. Classroom and assignment arguments use partial name matching.

gh-class-sak repos list CLASSROOM ASSIGNMENT [OPTIONS]

Options:

  • --repo — show the full repo name (owner/repo)
  • --name — show member profile names
  • --group CATEGORY — match repos to Canvas group categories by fuzzy-matching member names
  • --show-empty — include teams with no members (hidden by default)

Examples:

# basic listing
gh-class-sak repos list 195A Group

# with full repo names and member names
gh-class-sak repos list 195A Group --repo --name

# match Canvas project groups
gh-class-sak repos list 195A Group --group Project

repos missing

List students or Canvas groups that don't have a repo for the assignment.

gh-class-sak repos missing CLASSROOM ASSIGNMENT [OPTIONS]

Options:

  • --group CATEGORY — show Canvas groups with no matching repo, along with member names

Examples:

# students without repos
gh-class-sak repos missing 195A Group

# canvas groups without repos
gh-class-sak repos missing 195A Group --group Project

How group matching works

When --group is used, the tool:

  1. Fetches Canvas groups and their members from the configured course
  2. Fetches GitHub repo collaborator profile names
  3. Fuzzy-matches names between Canvas and GitHub (handles "Last, First" format, uses similarity threshold)
  4. Assigns groups globally so each Canvas group maps to at most one repo

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gh_class_sak-0.2.0.tar.gz (12.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

gh_class_sak-0.2.0-py3-none-any.whl (13.2 kB view details)

Uploaded Python 3

File details

Details for the file gh_class_sak-0.2.0.tar.gz.

File metadata

  • Download URL: gh_class_sak-0.2.0.tar.gz
  • Upload date:
  • Size: 12.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for gh_class_sak-0.2.0.tar.gz
Algorithm Hash digest
SHA256 54b594e47ad1068d1b49667942403fbb7003e40b75731966b3ab69eb45e6a6d0
MD5 14cd2cf2b297915637f162e2d6331c90
BLAKE2b-256 05b546d1879c4c492722098f22b13f080eedb8ab6bd65a3e6c818867cc9fe13e

See more details on using hashes here.

File details

Details for the file gh_class_sak-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: gh_class_sak-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 13.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for gh_class_sak-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d5b987d932dd8227ba2f3f1431945708eb263fa94844b73b9a2a1ccfbc3addda
MD5 9f8a3897959cc35ed46999de2ae5032b
BLAKE2b-256 42446d56fafc48a5839afee952dced0a04c48b0bfca35192adb9418a93c59327

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page