abc-classroom.clone

abcclassroom.clone.clone_or_update_repo(organization, repo, clone_dir, skip_existing)[source]

Tries to clone the single repository ‘repo’ from the organization. If the local repository already exists, pulls instead of cloning (unless the skip flag is set, in which case it does nothing).

Parameters
  • organization (string) – Organization where your GitHub classroom lives.

  • repo (string) – Name of the student’s GitHub repo.

  • clone_dir (string) – Name of the clone directory.

  • skip_existing (boolean) – True if you wish to skip copying files to existing repos.

abcclassroom.clone.clone_repos(assignment_name, skip_existing=False, no_submitted=True)[source]

Iterates through the student roster, clones each repo for this assignment into the directory specified in the config, and then copies the notebook files into the ‘course_materials/submitted’ directory, based on course_materials set in config.yml.

Parameters
  • assignment_name (string) – The name of the assignment to clone repos for

  • skip_existing (boolean (default=False)) – Do not update files in repositories that have already been cloned.

  • no_submitted (boolean (default = True)) – If true, moves assignment files from cloned repo to submitted directory for grading. If false files are not moved to submitted dir. This might be useful if you want to update the student clone but don’t want to update the file that was parsed by the autograder

Returns

  • This returns the cloned student repos and also moves each notebook file

  • into the nbgrader “submitted” directory.

abcclassroom.clone.clone_student_repos(args)[source]

This is the CLI implementation of clone repos

Parameters

args (string argument inputs) – Arguments include the assignment name (string) and skip existing ( boolean?)

abcclassroom.clone.copy_assignment_files(config, student, assignment_name)[source]

Copies all notebook files from clone_dir to course_materials/submitted. Will overwrite any existing files with the same name.

Parameters
  • config (dict) – config file returned as a dictionary from get_config()

  • student (string) – Name of the student whose files are being copied

  • assignment_name (string) – Name of the assignment for which files are being copied