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.1.1.tar.gz (8.4 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.1.1-py3-none-any.whl (9.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: gh_class_sak-0.1.1.tar.gz
  • Upload date:
  • Size: 8.4 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.1.1.tar.gz
Algorithm Hash digest
SHA256 f32e92f64007a4b8d00ffedbb7a18dd06f0080e75230288245d0f317dc480ce9
MD5 b5f339c32606f8aa38c89dabb9f5d393
BLAKE2b-256 9186ed2119efd6f9d3df24cc30115bd8aa0c409454eb75e998f3a9f290926e43

See more details on using hashes here.

File details

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

File metadata

  • Download URL: gh_class_sak-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 9.5 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.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 0237ff8e388f0d9ff1d030cb135273e6f40080e761a66e8b4121bfa2d6b9416f
MD5 b59c8572eece4554e272a7f47c31d20d
BLAKE2b-256 0b1656baef7090ba6be191de6d30ba209d242def86b31d565f055aeb94fec8ca

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