Giter VIP home page Giter VIP logo

manytask's Introduction

manytask

Test Publish codecov github docker

Small web application for managing courses: store students' grades, maintain deadlines, provide scoreboard etc.


How it works

In a nutshell, manytask is a wrapper around google sheets (as database, storing students' scores) and some bunch of functions to interact with gitlab.

The full manytask setup roughly looks as follows

  • google sheet - in readable format, store students' scores/grades
  • self-hosted gitlab instance - storing repos with assignments and students' repo
    • private repo - a repository with tasks, public and private tests, gold solutions, ect.
    • public repo - a repository available to students with tasks and solution templates
    • students' group - the group where manytask will create repositories for students
      each students' repo - fork from public repo
  • gitlab runners - place where students' solutions likely to be tested
  • checker script - some script to test students' solutions and push scores/grades to the manytask
  • manytask instance - web application managing students' grades (in google sheet) and deadlines (web page)

So the main aims of manytask:

  • Store and manage students' grades (store, provide, show, edit, ect)
  • Show web page with grades and deadlines for student
  • Manage users and repositories creation

Functions for which manytask is NOT intended:

  • Test students' solutions
  • Be language/course specific

So basically, manytask will store and display grades for you, but not test solutions' correctness in any way.


Setup

Debug and development

  1. Clone repo
git clone https://github.com/yandexdataschool/manytask
  1. Create .env file with dev environment
cp .env.example .env
  1. Generate credentials for accessing google spreadsheets API (for this test table)
    1. Follow the steps described in this article
    2. Base64 encode the created JSON key (using tools online, base64 lib in python, or btoa function in the browser)
    3. Put it in the .env file by GDOC_ACCOUNT_CREDENTIALS_BASE64 key

Production

Please refer to the system setup documentation.

Run application

Debug and development

First you need to create .env file with debug environment

Local (manytask only)

Create new venv and install requirements

python -m venv .venv
source .venv/bin/activate
python -m pip install -U -r requirements.txt

Run it

FLASK_DEBUG=1 FLASK_APP="manytask:create_app()" python -m flask run --host=0.0.0.0 --port=5050 --reload --without-threads

So, now it's available at localhost:5050

Docker (manytask only)

docker build --tag manytask .
docker rm manytask || true
docker run \
    --name manytask \
    --restart always \
    --publish "5050:5050" \
    --env-file .env \
    --env FLASK_DEBUG=1 \
    manytask:latest

So, now it's available at localhost:5050

Docker-compose (manytask only)

docker-compose -f docker-compose.development.yml up --build

So, now it's available at localhost:5050

Production

Please, refer to the production documentation.

API and Testing Script Interface

Checker script

There is already implemented python lib yandexdataschool/checker for testing students' solutions with manytask integration.
The basic idea: checker is a script running in a gitlab-ci that performs students' solutions testing and call manytask api to set scores achieved; More info in the yandexdataschool/checker repo;

Custom script

However, you can implement your own checker just following manytask api:

  • All the endpoints require Authorization: Bearer <token> or Authorization: <token> (deprecated) header contain TESTER_TOKEN, to validate it's authorized checker.
  • Or, alternatively, being admin (session with admin field)
method api endpoint description required in body optional in body return
POST /api/report set student's score (optionally save source code) task, username, user_id (deprecated), score (if None - max score) check_deadline, submit_time (%Y-%m-%d %H:%M:%S%z), commit_time (deprecated), multipart/form-data source files user_id, username, task, score, commit_time, submit_time
GET /api/score get student's score task, username, user_id (deprecated) - user_id, username, task, score
POST /api/sync_task_columns update course to deadlines (deprecated) *deadlines json body* - -
POST /api/update_deadlines update course to deadlines *deadlines yaml file* (see examples) - -
POST /api/update_course_config update course with config *config yaml file* (see examples) - -
POST /api/update_cache update cached scores for all users - - -
GET /api/solutions get all solutions for the task task - zip archive file with solutions

Please refer yandexdataschool/checker repo for instructions and tips

Additional information

Originally was developed at gitlab as shad-ts by Fedor Korotkiy for Yandex School of Data Analysis

Acknowledgment

  • Fedor Korotkiy - development of the very first version, 2017-2018
  • Ilariia_Belova - updates for python course, 2018
  • Vadim Mazaev - updates for python course, 2019-2020
  • Nikita Bondartsev - minor updates for python course, 2020-2021
  • Konstantin Chernyshev - updates for python course, massive refactor and moving to github, 2020-2022

manytask's People

Contributors

k4black avatar manytask-bot avatar dependabot[bot] avatar avalur avatar yankovsky avatar slon avatar moskalenkoviktor avatar carzil avatar borispristupa avatar kalabukdima avatar mikailbag avatar vnetserg avatar

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.