From 1dff73eba1642140bd5a2f11fb336ef3edb868b1 Mon Sep 17 00:00:00 2001 From: Christopher Bohn <bohn@unl.edu> Date: Fri, 30 Aug 2019 07:48:34 -0500 Subject: [PATCH] Created directory structure for separation of concerns. Separating the api-level code from the automation code. Partly this is to avoid commingling the two types of code in the repo. Partly this is to facilitate re-use: the api functions will certainly be useful for other courses; the automation functions might be useful for other courses. --- README.md | 50 +++++++------------ api/README.md | 35 +++++++++++++ config.py => api/config.py | 0 course.py => api/course.py | 0 gitlab_demo.py => api/gitlab_demo.py | 0 .../gitlab_functions.py | 0 6 files changed, 53 insertions(+), 32 deletions(-) create mode 100644 api/README.md rename config.py => api/config.py (100%) rename course.py => api/course.py (100%) rename gitlab_demo.py => api/gitlab_demo.py (100%) rename gitlab_functions.py => api/gitlab_functions.py (100%) diff --git a/README.md b/README.md index 96451a2..830d459 100644 --- a/README.md +++ b/README.md @@ -1,35 +1,21 @@ -# CSCE 361 Scripts +# Scripts for automating CSCE 361 tasks -These scripts are designed to automate the creation, population, and staffing -of repositories for student assignments. +These python and bash scripts (and a C program) serve to automate assignment +management, with an eye toward scaling to larger class sizes. -## Requires +In the repository, the scripts are divided into those that interface with +remote systems and those that automate the tasks. In practice, you'll want to +place both in the same directory, specifically the directory in which you'll +collect students' repositories for grading. -- python-gitlab - - `pip3 install python-gitlab` - - documentation: https://python-gitlab.readthedocs.io -- (eventually, a Canvas package) - -## Files - -- config.py - - provides URLs and API keys - - *do not* commit API keys to repository - - you will need to replace `None` with your API keys (as strings) -- course.py - - provides namespace and group ID - - will need to update each semester -- gitlab_functions.py - - provides functions to query & update projects (including its members - and issues) - - These functions are those we believe are useful for automating pair - & team projects for CSCE 361 - - These generally are wrappers for calls you *could* make directly - from what python-gitlab provides, but these functions don't require - you to memorize the api - - includes an enumeration of the fields for User, Project, and Issue - - includes side-effect-free example function calls -- gitlab_demo.py - - includes commented-out functions demonstrating the creation of - projects, adding users to projects, and creating/updating the projects' - issues +- apis/ + - Directory containing functions that interface with `git.unl.edu` and + `canvas.unl.edu`. When you copy these to the grading directory, place + your api keys in `config.py`. +- automation/ + - Directory containing scripts to clone, create, process, etc., student + repositories. +- 1195 + - Directory containing scripts from summer 2019 pilot of new course + structure. Should be obsolete (and removed) by end of fall 2019. + diff --git a/api/README.md b/api/README.md new file mode 100644 index 0000000..96451a2 --- /dev/null +++ b/api/README.md @@ -0,0 +1,35 @@ +# CSCE 361 Scripts + +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 +- (eventually, a Canvas package) + +## Files + +- config.py + - provides URLs and API keys + - *do not* commit API keys to repository + - you will need to replace `None` with your API keys (as strings) +- course.py + - provides namespace and group ID + - will need to update each semester +- gitlab_functions.py + - provides functions to query & update projects (including its members + and issues) + - These functions are those we believe are useful for automating pair + & team projects for CSCE 361 + - These generally are wrappers for calls you *could* make directly + from what python-gitlab provides, but these functions don't require + you to memorize the api + - includes an enumeration of the fields for User, Project, and Issue + - includes side-effect-free example function calls +- gitlab_demo.py + - includes commented-out functions demonstrating the creation of + projects, adding users to projects, and creating/updating the projects' + issues diff --git a/config.py b/api/config.py similarity index 100% rename from config.py rename to api/config.py diff --git a/course.py b/api/course.py similarity index 100% rename from course.py rename to api/course.py diff --git a/gitlab_demo.py b/api/gitlab_demo.py similarity index 100% rename from gitlab_demo.py rename to api/gitlab_demo.py diff --git a/gitlab_functions.py b/api/gitlab_functions.py similarity index 100% rename from gitlab_functions.py rename to api/gitlab_functions.py -- GitLab