Package: invisible-hand
Invisible Hand 👊Invisible Hand helps you manage your classroom under Github organization.It utilizesGoogle Sheets,GitHub ClassroomandGitHubseamlessly.Installation1. Install this tool via pippip install invisible-handUsehand -hto test if it is installed╰─❯ hand -h
Usage: hand [OPTIONS] COMMAND [ARGS]...

  Manage your classroom under Github organization.

Options:
  --custom-base TEXT    Use custom base folder for configs
  --install-completion  Install completion for the current shell.
  --show-completion     Show completion for the current shell, to copy it or
                        customize the installation.

  -h, --help            Show this message and exit.

Commands:
  add-students       Invite students to join our Github organization
  announce-grade     Announce student grades to each hw repo
  config             Config File utilities
  crawl-classroom    Get student's submissions from Github Classroom
  event-times        Retrieve information about late submissions <repo-
                     hash>...

  grant-read-access  Make TAs being able to read all homework repos...
  patch-project      Patch to student homeworks2. Install chromedriverMac :brew cask install chromedriverUbuntu :apt install chromium-chromedriverGetting Started1. Create config fileThe main config file is located in$HOME/.invisible-hand/config.toml.Runhand config createto create a template and usehand config editto open it with an editor.2.(Not required)Getting yourclient_secret.jsonfor accessing GoogleSheetsTo run the command:Announce Grade, follow the steps below to setup your environment firstFollowAuthorization for pygsheetsto get your credential file (client_secret.json)Locate your secret file and usehand config copy-client-secret YOUR-SECRET-FILEto copy it into the cache.This command would automatically rename your secret file to ($HOME/.invisible-hand/client_secret.json)Quick references(This tool supports auto-completion, usehand --install-completionto add completion support to your shell)hand: The root command, use-hto see more informationconfig: subcommand to handle config files, use-hto see more informationcreate: Create a config file from template to$HOME/.invisible-hand/config.tomlcheck: Check if the format your config file is validpath: Show the root path to your config folder, default to$HOME/.invisble-handedit: Open your config file with your default editor. (use--editor <your editor>to open your another one)copy-client-secret: Copy Google'sclient_secret.jsonto the cache folder.usehand config copy-client-secret -hto see more informationadd-students 🧑‍💼student1 🦸‍♂️student2 ...: Invite users into your GitHub organization🧑‍💼student- GitHub handle of the studentgrant-read-access 📝 hw-title:  Grant TA's group read access to all repo with such prefix.📝 hw-title- title prefix of the homework (e.g.hw3)patch-project 📝 hw-title  🚧 patch-branch: Patch project to Students homeworkscrawl-classroom 📝 hw-title 📦 submission-file: Crawl submission status of students on GitHub Classroom📦 submission-file- file to store submission outputevent-times 📦 submission-file: Check if there's late submissionsannounce-grade 📝 hw-title: Announce grade to students by opening issues in their reposAdd StudentsFAQSome students report that they didn't get the invitation email.Invite student into your organization from their email. This should be Github's issue.about 2 of 80 students got this issue from our previous experience.Patch ProjectPatch to student homework repositories.WorkflowTake homework :hw3(the title of your homework in github classroom) for example:The repository:tmpl-hw3would be your template for initializing homeworks.1. Create another repo with nametmpl-hw3-reviseto update your template2. Insidetmpl-hw3-reviseCreate a revision branch2-revise-for-node-definition(whatever you like)Create an issuse with the identiacal title2-revise-for-node-definition)the content of that issue would become the content of your PR message.3. Open GitHub ClassroomSelect your assignment (hw3) and disableassignment invitation URLofhw34. Create an PR to your template repo (hw3)handpatch-projecthw3--only-repo="tmpl-hw3"2-revise-for-node-definition5. Accept the PR in your template repository (tmpl-hw3)After that, enable theassignment invitation URLofhw3in GitHub Classroom.Now you have succcessfully updated your template repo.6. Create PRs to students template repositories (hw3-<their github id>)Patch to every repository that useshw3as the prefix under your GitHub organization.handpatch-projecthw32-revise-for-node-definition7. Merge the revision branch2-revise-for-node-definitioninsidetmpl-hw3After this step, all documents are updated8. Reactivate the invitation URLCrawl ClassroomCrawling homework submission data from Github ClassroomThis is a web crawler for Github Classroom, which is the input ofEvent TimesConfig Fileconfig.toml:[crawl_classroom]:login: your login id in Github Classroom[crawl_classroom]:classroom_id: the id field of your classroom RESTful page URL. (see the image below)FAQChromeDriverselenium.common.exceptions.SessionNotCreatedException: Message: session not created:
This version of ChromeDriver only supports Chrome version 79upgrade your chromedriver viabrew cask upgrade chromedriverAll students not submittedRemember to set deadline of hw on the GitHub classroom (note that deadline can only be set at a future time)DemoEvent TimesRetrieve information about late submissionsWhat it actually doesCompare the last publish-time of specific git commit in each repository and print out which passed the deadline.Examplehandevent-times--target-team="2020-inservice-students"--deadline="2019-11-12 23:59:59"hw1-handin-0408.txtAnnounce GradePublish feedbacks by creating Issue to student's homework repo.This sciprt requires you toUse aGoogleSpreadSheetto record every student's grade inside a strictly named tab.Strictly structured Github repository.ExplanationIn our scheme, each student would get a git repository for every homework project.Take homeworkhw3with two studentsAnnaandBellafor example.We expect there would be 2 repos under our GitHub organization, which arehw3-Annaandhw3-Bella.Annoucing the grade forhw3actually means to open 1 issue tohw3-annaandhw3-bellarespectively.To make sure the script correctly functions:students grade should be recorded in the SpreadSheet with a tab calledhw3.You should keep aMarkdownfile for each student using theirstudent-idas the filename to describe their homework result.e.g. (ifAnna's sutdent-id is0856039, then0856039.mdshould recordAnna's overall feedbacks).Behold:student-idshould be unique.Format and Structure for those files0856039.md (Anna)Hi,@Anna## Information+ Grade: ${grade}
  + testcase : ${grade_testcase}/100 pts
  + report : ${grade_report}/5 pts

+ Grader: @{grader}
+ Feedback:
    Good Job## NoteIf you got any questions about your grade
please make a comment stating your arguments below and tag the grader in the comment.This markdown file contains python template strings(${grade}),These strings are the column names inside your SpreadSheet tabhw3.Structure of the GitHub Repo:. Hw-manager # root of your git repo (the name is configured in`$HOME/.invisible-hand/config.toml`)
  ├── hw3
  │   └── reports
  │       ├── 0411276.md
  │       ├── 0856039.md (**Anna**)
  └── hw4 # other homework dirStructure of the Google SpreadSheetstudent_idgradegrade_reportgrade_testcasegrader085603993587@TA1041127680575@TA2Config fileconfig.toml[github]:personal_access_token[github]:organization[announce_grade]:feedback_source_repo(e.x.: Hw-manager)[google_spreadsheet]:spreadsheet_idclient_secret.json(followhereto download your oauth2 secret file and renamed it toclient_secret.json)Instructions to followEdit config files properly.Create feedbacks for students in yourfeedback_source_repoMake sure you commit and push the feedbacks tomasterbranchFill out the SpreadSheetUse this scriptFor testing, it's recommended to use the--only-idoptionhandannounce-grade<hw_title>[--only-id👨‍🎓student-id]