Select Git revision
README.md 3.38 KiB
Scripts for automating CSCE 361 tasks
These scripts are designed to automate the creation, population, and staffing of repositories for student assignments.
Requires
- python-gitlab
pip3 install python-gitlab
- documentation: https://python-gitlab.readthedocs.io
- canvasapi
pip3 install canvasapi
- documentation: https://canvasapi.readthedocs.io/en/latest/index.html
- https://community.canvaslms.com/videos/3227-pycanvas-a-python-wrapper-for-the-canvas-api-matthew-emond
- I'm pretty sure this isn't the same API wrapper that Chris Bourke is using
Files
-
config.py
- Provides URLs and API keys.
- gitignored (not present in remote repository)
-
config-example.py
- Sample config.py file, without API keys.
-
do not commit API keys to repository
- you will need to copy to config.py and replace
None
with your API keys (as strings)
- you will need to copy to config.py and replace
-
course.py
- Provides namespace and group ID.
- You will need to update this file each semester
- Provides namespace and group ID.
-
initialize_student_tracking.py
- Creates initial student roster from responses to
03 Setup
assignment.
- Creates initial student roster from responses to
-
prep_assignment.py
- Automates student pairing, creating student groups in Canvas, and creating team repositories in GitLab. There are a few areas where it could be more robust, but it will handle non-capstone assignments (it currently only creates pairs, or triples when it must), creating partners without regard to course section, and it will do so without crashing.
-
grade_team_contributions.py
- Retrieves peer reviews from Canvas and commit histories from GitLab. Use this data to make informed teamwork grading decisions, but bear in mind you might have to dig deeper. Does not (yet) place grades in Canvas gradebook.
-
Recommendation: pipe output to
tee
to maintain a copy of the data.
-
Timeline.py & timeline_data.py
- These are part of an attempt to track git usage over the course of a project to create burndown charts and to observe which branch is each commit's original branch. Unless we upgrade to GitLab Pro, I'll probably get back to this effort (but it's not a high priority).
-
common_functions.py
- Contains exactly what the file's name says it contains: utility functions that are used by more than one script.
-
api/
- canvas_classes.py
- Classes to encapsulate concepts from Canvas CMS
- gitlab_classes.py
- Classes to encapsulate concepts from Gitlab VMS
- composite_user.py
- Wrapper class that pairs a user from Canvas with the corresponding user from Gitlab
- canvas_classes.py
-
local/
- ignored directory (not present in remote repository) for local copies of files
- you might keep a config.py with read/write api keys and another with read-only api keys here, to place in top-level directory as you see fit
- you might keep copies of the course csv file(s) here, but bear in mind that they won't be backed up
- ignored directory (not present in remote repository) for local copies of files
Older Files
These are vestigial files that should not be needed further, but we are retaining until we are certain.
- old-automation/
- Directory containing early scripts to clone, create, process, etc., student repositories. The contents of this directory are not needed but are kept here in case I'm wrong.