Scripts for using github.com in Academic Courses
- Getting Started
- Creating a new lab (preliminary for TA beta testing)
- Creating a new lab (for all students, but NOT pairs)
- Creating a new lab for ONE student
- Creating pair teams
- Creating repo for pair teams
- Cloning from all student repos to grade a lab
Do the one-time steps at the bottom of this document.
EACH TIME:
-
cd into your github-acad-scripts directory
-
```git pull`` to update any changes
-
run the script env.sh by typing
. env.sh
-
cd into CS56-W14-Labs
-
create a new subdirectory (e.g. lab03)
-
populate it, and then git add, git commit, git push.
-
cd into github-acad-scripts and do:
./updateForLab.py --staff -u githubAdminUser labXX
This will create the private repos ONLY for those github ids listed in the Google Doc referred to by GHA_STAFF_LIST_URL
If your current effective unix userid is the same as the githubAdminUser that you want to use, you can omit the githubAdminUser flag.
This assumes the lab has already been created in CS56-W14-Labs
-
cd into CS56-W14-Labs
-
git pull
-
cd into github-acad-scripts and do:
./updateForLab.py -u githubAdminUser labXX
This will create the private repos for ALL github ids listed in the Google Doc referred to by GHA_STUDENT_LIST_URL
This assumes the lab has already been created in CS56-W14-Labs
-
cd into CS56-W14-Labs
-
git pull
-
cd into github-acad-scripts and do:
./updateForLab.py -g StudnetsGithubId -u githubAdminuser lab03
This will create the private repos ONLY for the single github id that is after -g, and ONLY if that githubid appears in the list in in the Google Doc referred to by GHA_STUDENT_LIST_URL
-
. env.sh
if not already done -
./createPairTeams -g githubAdminUser
You'll be prompted for password.
This should create all pair teams from the GHA_PAIR_TEAM_URL document.
-
. env.sh
if not already done -
./updatePairsForLab labxx -g githubAdminUser
You'll be prompted for password. Instead, if you want to create a repo for one pair team, you will use the -t
flag and then a prefix of the pair name you want to make. For example
./updatePairsForLab labxx -u githubAdminUser -t Pair_studentuser
where studentuser
is a prefix of the first student's github ID
-
. env.sh
if not already done -
create your
GHA_WORKDIR
if not already done -
./getLabSubmissions.py -u githubAdminUser labXX
NOTE - thelabXX
portion is a prefix, so for example if you only wanted to get the lab01 submissions of users whose github ID's start with an "a", you could use the prefixlab01_a
. You could also use the prefix to specify one student/pair lab submission.
You'll be prompted for password when doing this.
(1) clone the github-acad-scripts repo (scripts)
- via SSH
git clone git@github.com:UCSB-CS-Using-GitHub-In-Courses/github-acad-scripts.git
- via HTTPS
git clone https://github.com/UCSB-CS-Using-GitHub-In-Courses/github-acad-scripts.git
(2) cd into the github-acad-scripts repo and do:
git submodule init
git submodule update
This should populate the PyGithub and requests subdirectories with the contents of those "sub" repositories (those are extra Python scripts from other authors, from other github repos, that our scripts depend on.)
(3) clone the CS56-W14-Labs repo (lab starting points)
- via SSH
git clone git@github.com:UCSB-CS56-W14/CS56-W14-Labs.git
- via HTTPS
git clone https://github.com/UCSB-CS56-W14/CS56-W14-Labs.git
(4) Copy the env.sh.sample
to env.sh
in your copy of the github-acad-scripts repo
cd back into your github-acad-scripts repo, and do this:
cp env.sh.sample env.sh
The file env.sh
is NOT under github revision control---that's because it is designed to contain the "unpublished, obscure" URLs of the Google Documents that contain the class list. Those are "sensitive", since the documents contain students' real names, email addresses, etc. Therefore we don't want those URLs to be in a public repository.
(5) Edit your now local, private, env.sh
to match the proper values (you can get those from your instructor, or whoever is setting up the Google Docs for your course.)
(6) Create your "work" directory
mkdir -p $GHA_WORKDIR