Example #1
0
def check():
	students = get_students("/home/devincube/Documents/students.csv")
	for st in students:
		repo = st["repo"]
		if not repo: continue;
	
		status = check_hello_world(repo)
		
		print("{status} {repo}".format(repo=repo, status=status))
Example #2
0
def check():
    students = get_students("/home/devincube/Documents/students.csv")
    for st in students:
        repo = st["repo"]
        if not repo: continue

        status = check_hello_world(repo)

        print("{status} {repo}".format(repo=repo, status=status))
Example #3
0
def main():
    for student in get_students():
        print("{0} is majoring in {1} and scored {2}.".format(
            student.get("name"), student.get("Major"), student.get("grade")))
Example #4
0
from enum import Enum
from github import GitHubApi
from students import get_students


def read_config(filename):
    with open(filename, "r") as file:
        config = json.load(file)
    return config


local_config = read_config("local_config.json")
config = read_config(local_config["config"])
oauth = config["oauth"]
github = GitHubApi(oauth["client_id"], oauth["client_secret"])
students = get_students(local_config["students"])


class ResultCode(Enum):
    SUCCESS = 0
    NO_PATH = 1
    NO_CODE = 2
    NO_PROG = 3


def check_repo(repo):
    url = urlparse(repo)
    parts = url.path.split('/')
    user = parts[1]
    repo_name = parts[2].replace('.git', '')
    path = "/courses/prog_base/tasks/hello_world/"
Example #5
0
import json
from urllib.parse import urlparse
from enum import Enum
from github import GitHubApi
from students import get_students

def read_config(filename):
	with open(filename, "r") as file:
		config = json.load(file)
	return config

local_config = read_config("local_config.json")
config = read_config(local_config["config"])
oauth = config["oauth"]
github = GitHubApi(oauth["client_id"], oauth["client_secret"])
students = get_students(local_config["students"])

class ResultCode(Enum):
	SUCCESS = 0
	NO_PATH = 1
	NO_CODE = 2
	NO_PROG = 3

def check_repo(repo):
	url = urlparse(repo)
	parts = url.path.split('/')
	user = parts[1];
	repo_name = parts[2].replace('.git', '');
	path = "/courses/prog_base/tasks/hello_world/"
	jres = github.get_contents_json(user, repo_name, path)
	if jres:
def local_endpoint():
    return get_students()