Code Monkey home page Code Monkey logo

drop-project's Introduction

Drop Project - Continuous Auto-Grader

Build Status codecov Apache License Docker Image Version (latest semver)

Deploy

A web application where students drop their projects to check for correctness and quality.

Several checks are performed on each project:

  • Does it have the right folder structure and all the mandatory files?
  • Does it compile?
  • Does it pass its own tests?
  • Does it achieve a minimum coverage with its own tests?
  • Does it pass the teacher tests?
  • Does it conform to the coding guidelines defined by the teacher?
  • Does it perform well? (tests with large datasets are measured)

Requirements

  • Java 17+ JDK (a compiler is needed)
  • Maven
  • Servlet Engine (Tested with tomcat and jetty)
  • MySQL

Current limitations

  • Only works for Java 8+ / Kotlin non-maven projects

How does it work?

Most of the work is done by a Maven Invoker, running several goals on the project. The results are collected into a report that is viewable by the student and the teacher.

Projects must not be maven projects because they are "mavenized" by the server, after uploading. In this context, "mavenizing", means copying the files into a proper Maven folder structure (e.g. putting the sources into /src/main/java), mixing the student files with the teacher unit tests and adding a pom.xml (also provided by the teacher).

Since checking a project may take some time, it is done asynchronously - the student submits the file and must come back later to check the report.

How DP works

This video explains how to create a simple Java assignment in Drop Project. It shows both teacher and student perspectives:

https://www.youtube.com/watch?v=65IwIBuMDlE

Quick start

After cloning the repository, change the following properties:

dropProject.maven.home=<path_to_maven_home>
dropProject.maven.repository=<path_to_maven_repository>

in the following files:

 src/main/resources/drop-project.properties
 src/test/resources/drop-project-test.properties 

Note:

  • Configuring the first file will allow you to run Drop Project.
  • Configuring the second file will allow you to run Drop Project's unit tests.
  • Linux users: the Maven Home is usually in /usr/share/maven (otherwise, try: whereis maven) and the Maven Repository is in /home/<USERNAME>/.m2
  • Windows users: the Maven Home is the installation directory and the Maven Repository is in c:\Users\<USERNAME>\.m2

And run the embedded tomcat runner:

mvn spring-boot:run

The application should now be accessible on http://localhost:8080

Running with docker

Demo mode (in memory database)

docker run -p 8080:8080 pedroalv3s/drop-project-demo

Production mode (using mysql)

Clone the project and in the root folder execute:

docker compose up

The application should now be accessible on http://localhost:8080

Documentation

https://drop-project-edu.github.io/drop-project/

To generate source code documentation, run:

mvn dokka:dokka

The generated documentation will be available in the following folder:

target/dokka/drop-project/index.html

Unit Tests

To execute the unit tests, run:

mvn test

Unit Test Coverage

To measure the unit test coverage, run:

mvn jacoco:report

Note: to run the coverage measurement, you must first run the unit tests themselves.

The test coverage report will be available in the following folder:

target/site/jacoco/index.html

API (experimental)

Some services are accessible through an API, protected by personal tokens. Still work in progress...

Documentation: http://localhost:8080/api-docs

Citation

drop-project's People

Contributors

bernardovlbaltazar avatar brunompc avatar dependabot[bot] avatar joao-marques-a22108693 avatar nunofachada avatar palves-ulht avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

drop-project's Issues

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.