Skip to main content

A set of internal tools for Ohio University's CS3560 course.

Project description

cs3560cli

A set of internal tools for Ohio University's CS3560 course.

Installation

python -m pip install cs3560cli

Features

Import students from Canvas into a team in GitHub Organization

If content of your course is in GitHub repository that requires students to be part of a GitHub's organization. The following command will automatically send email invitation to students' OHIO email addresses using information from Canvas.

$ python -m cs3560cli github bulk-invite-from-canvas <course-id> <team-path> --with-canvas-token <canvas-token> --with-github-token <github-token>

A team must exist in the organization. Access token for Canvas can be generated at https://ohio.instructure.com/profile/settings. Access token for GitHub can be generated at https://github.com/settings/tokens. Please make sure that the token has 'admin:org' permission and it is SSO-SAML authorized for your organization.

Group students submitted files into folders

To be implemented for Canvas.

watch-zip Command

Watch for an archive file and extract it. This can be useful when you are grading student's submission, so you do not have to manually unzip it.

Usage

$ python -m cs3560cli watch-zip .
$ python -m cs3560cli watch-zip ~/Downloads

highlight Command

Create a syntax highlight code block with in-line style. The result can thus be embed into a content of LMS.

create-gitignore Command

Create a .gitignore file using content from github/gitignore repository.

Usage

$ python -m cs3560cli create-gitignore python
$ python -m cs3560cli create-gitignore cpp

By default, it also add windows and macos to the .gitignore file.

check-username Command

TBD

Scenario

New semester preparation

  1. Obtain the list of enrolled students.
  2. Creating a team in GitHub organization.
  3. Add OU-CS3560/examples to the team.
  4. Invite all students into the team in GitHUb organization.

Requirements

gh extension install mislav/gh-repo-collab
$TeamName = "entire-class-24f"
gh api \
  --method POST \
  -H "Accept: application/vnd.github+json" \
  -H "X-GitHub-Api-Version: 2022-11-28" \
  /orgs/OU-CS3560/teams \
  -f name="$TeamName" \
  -f notification_setting='notifications_disabled' \
  -f privacy='closed'
gh repo-collab add OU-CS3560/examples "OU-CS3560/$TeamName" --permission read
python -m cs3560cli github bulk-invite

Creating repositories for teams

  1. (manual) Obtain team information (internal-id, members).
  2. Create a team.
  3. Create a repository.
  4. Add team to the repository with maintain permission.
  5. (manual) Invite students to the team.

Requirements

gh extension install mislav/gh-repo-collab
$TeamId = ""
$TeamHandle = "OU-CS3560/" + $TeamId
$RepoHandle = "OU-CS3560/" + $TeamId

$ParentTeamId = python -m cs3560cli github get-team-id OU-CS3560 entire-class-24f | Out-String
gh api \
  --method POST \
  -H "Accept: application/vnd.github+json" \
  -H "X-GitHub-Api-Version: 2022-11-28" \
  /orgs/OU-CS3560/teams \
  -f parent_team_id=$ParentTeamId \
  -f name="$TeamId" \
  -f notification_setting='notifications_disabled' \
  -f privacy='closed'
gh repo create --private --template OU-CS3560/team-template $RepoHandle
gh repo-collab add $RepoHandle $TeamHandle --permission maintain

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

cs3560cli-0.3.0.tar.gz (38.4 kB view details)

Uploaded Source

Built Distribution

cs3560cli-0.3.0-py3-none-any.whl (38.6 kB view details)

Uploaded Python 3

File details

Details for the file cs3560cli-0.3.0.tar.gz.

File metadata

  • Download URL: cs3560cli-0.3.0.tar.gz
  • Upload date:
  • Size: 38.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for cs3560cli-0.3.0.tar.gz
Algorithm Hash digest
SHA256 d662ca4a6f6b9cfbf3188b0ef8be8d075c9098307ae8d64d251ae4dcf90874a6
MD5 97aea12849479ed47849f9b71b97dfbf
BLAKE2b-256 87a8f790cb83d747ccb77f6391013e8e908f2122f9a386c2dbc79144ae920942

See more details on using hashes here.

File details

Details for the file cs3560cli-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: cs3560cli-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 38.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for cs3560cli-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 931fc5955a3e75f53dd6f4af8127699f1314bdd704cfd1f21362efb4f66ba662
MD5 c37dcd389d46ca32359222d8808ecb7c
BLAKE2b-256 bdce7afb73404fa5091be9784d156dd561a1d51d07e25208c33552bef0a3d9da

See more details on using hashes here.

Supported by

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