Coder Social home page Coder Social logo

github-canvas-integration-devops's Introduction

GitHub Canvas Integration

About it

This tools was created for the course DD2482 Automated Software Testing and DevOps at KTH and is meant to create an interface between the course GitHub repository and the Canvas.

For educational purpose, all the assignments registration are done on GitHub. And the goal of this tool is to replicate and keep up to date all the assignment and groups with Canvas.

Requirements

In the GitHub secrets, you need to add the following :

key Details
CANVAS_TOKEN Canvas access token generated on your profile
CANVAS_COURSE_ID Course ID of the Canvas course
GH_REPO_FULLNAME Full name of the repo using running the code (e.g. KTH/devops-course)
GH_TOKEN GitHub access token generated on your profile
  • The CANVAS_ secrets are used to interact with the canvas server (e.g. manage assignments, groups, ...)
  • The GH_ secrets are used to interact with h the GitHub repo (e.g. open issue, comment PR, ..)

How it works

  • Update grading

The GitHub action update_criteria.yml is triggered each time the grading-criteria.md is changed. We are first parsing the file to extract the assignments, then we validate the structure, and finally we use the Canvas API to create/update the following :

- Group categories sets
- Assignements
- Rubrics
  • Update task

The GitHub action update_task.yml is triggered each time a change is made in the contributions folder. We are first getting the task present in the contributions folder and then using the Canvas API to manage the group category by adding/removing the following :

- Group
- Members 

While validating the group, we check the following:

  • Members can't be registered more than one time for a task
  • Members must be registered to the canvas course
  • README.md must have the correct sections

How to run

python3 ./update_task.py

python3 ./update_grading.py

Options

All options have a default value and can be adapted using the following:

Option Usage Example update_grading.py update_task.py
--mode If you only want to check the requirements ./update_task.py --mode check ✔️ ✔️
--pr Pull request id ./update_task.py -pr ${{github.event.number}} ✔️
--sections Sections required in the proposal ./update_task.py --sections "Assignment Proposal" Deadline ✔️
--grading Path to grading criterias ./update_grading.py --grading ./grading-criteria-md ✔️
--issue List of issue assignees ./update_grading.py --issue githubuser1 ${{github.actor}} ✔️

github-canvas-integration-devops's People

Contributors

khaes-kth avatar monperrus avatar vladomitrovic avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

github-canvas-integration-devops's Issues

Ability to rename a group

Currently, the update task script can only add or remove groups but can't edit it.

If a group change members, we need to first delete the "previous" one otherwise the code will trigger a "already registered for this task" exception.

The best would be to check the changes in the folder and rename, add/delete members it if needed. Check PR #1728 for a use case.

Have a conf. file

In order to make the tool easier to use, would be nice to have a conf. file as argument where we can set :

  • Sections required for the proposal
  • Path to the grading-criteria.md
  • Structure to validate the grading-criteria.md

Better exception raising

While checking the requirements, the exception is triggered as soon as an element is incorrect.

A better exception raising would be to explain all the incorrect elements after all checks.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.