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.2.tar.gz (9.3 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.2-py3-none-any.whl (10.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: gh_class_sak-0.1.2.tar.gz
  • Upload date:
  • Size: 9.3 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.2.tar.gz
Algorithm Hash digest
SHA256 69c895e8ab2c3398ee6cba1e45ada1d817ed0671f2ead4e0f1d7f731c733314c
MD5 bbf819c5d777b316a36e7436def4762f
BLAKE2b-256 ab6093ecb972c9a95eacab252a75ab37340486e0d25d7098563ff91ac86e4ca7

See more details on using hashes here.

File details

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

File metadata

  • Download URL: gh_class_sak-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 10.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.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 c3bdc1a1f912bf3f04119fa6be20afd35f0bc1977022a10942c65bae3c07f450
MD5 b5e8d63cc1887b4b3e6c1f4a9828602d
BLAKE2b-256 433274b5a57e8e0ef184611f070644f5600724438549196081f3b4f81182651e

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