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.1.tar.gz (12.2 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.1-py3-none-any.whl (13.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: gh_class_sak-0.2.1.tar.gz
  • Upload date:
  • Size: 12.2 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.1.tar.gz
Algorithm Hash digest
SHA256 a26025bae66282596e376f2757293fdb4a3c92510f1efc820902d7ba311e59f1
MD5 9b7f70220dd3446b5cb1a35069332d7c
BLAKE2b-256 745c62b9207aa04d107104230b805c30a10cfadacaac2c4bcd4435548dd02a67

See more details on using hashes here.

File details

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

File metadata

  • Download URL: gh_class_sak-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 13.4 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a5477150b827c2350897f7239656098f04b1e85cbf7017e3d1b49b88233a702c
MD5 22e4b928945f8426236254c40b131781
BLAKE2b-256 678184d6aae074ff4eebb0bf26be6d1e29e441299d0678fe5d37733d98abc5e1

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