Skip to content

Commit

Permalink
Merge branch 'develop' into feature/programming-exercises/sarif-parser
Browse files Browse the repository at this point in the history
  • Loading branch information
magaupp committed Nov 14, 2024
2 parents 8f20007 + 050b096 commit 47c2671
Show file tree
Hide file tree
Showing 244 changed files with 6,900 additions and 2,125 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ Refer to [Using JHipster in production](http://www.jhipster.tech/production) for
The following command can automate the deployment to a server. The example shows the deployment to the main Artemis test server (which runs a virtual machine):

```shell
./artemis-server-cli deploy [email protected] -w build/libs/Artemis-7.7.0.war
./artemis-server-cli deploy [email protected] -w build/libs/Artemis-7.7.1.war
```

## Architecture
Expand Down
21 changes: 12 additions & 9 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ plugins {
}

group = "de.tum.cit.aet.artemis"
version = "7.7.0"
version = "7.7.1"
description = "Interactive Learning with Individual Feedback"

java {
Expand Down Expand Up @@ -55,11 +55,15 @@ idea {
}

spotless {

// allows to execute the code formatting commands ./gradlew spotlessApply and ./gradlew spotlessCheck
java {
target {
fileTree(rootDir) {
include "**/*.java"
include (
"src/main/java/**/*.java",
"src/test/java/**/*.java",
)
exclude(
"**/src/test/resources/test-data/repository-export/EncodingISO_8559_1.java",
"**/node_modules/**",
Expand All @@ -71,7 +75,6 @@ spotless {
"**/src/main/resources/templates/**",
"/docker/**",
"checked-out-repos/**",
"**/src/main/java/org/eclipse/**",
"supporting_scripts/**"
)
}
Expand Down Expand Up @@ -348,7 +351,7 @@ dependencies {

implementation "tech.jhipster:jhipster-framework:${jhipster_dependencies_version}"
implementation "org.springframework.boot:spring-boot-starter-cache:${spring_boot_version}"
implementation "io.micrometer:micrometer-registry-prometheus:1.13.6"
implementation "io.micrometer:micrometer-registry-prometheus:1.14.0"
implementation "net.logstash.logback:logstash-logback-encoder:8.0"

// Defines low-level streaming API, and includes JSON-specific implementations
Expand Down Expand Up @@ -411,8 +414,8 @@ dependencies {
implementation "org.springframework.cloud:spring-cloud-starter-config:4.1.3"
implementation "org.springframework.cloud:spring-cloud-commons:4.1.4"

implementation "io.netty:netty-all:4.1.114.Final"
implementation "io.projectreactor.netty:reactor-netty:1.1.23"
implementation "io.netty:netty-all:4.1.115.Final"
implementation "io.projectreactor.netty:reactor-netty:1.2.0"
implementation "org.springframework:spring-messaging:6.1.14"
implementation "org.springframework.retry:spring-retry:2.0.10"

Expand Down Expand Up @@ -533,10 +536,10 @@ dependencies {
testImplementation "org.mockito:mockito-core:${mockito_version}"
testImplementation "org.mockito:mockito-junit-jupiter:${mockito_version}"

testImplementation "io.github.classgraph:classgraph:4.8.177"
testImplementation "io.github.classgraph:classgraph:4.8.179"
testImplementation "org.awaitility:awaitility:4.2.2"
testImplementation "org.apache.maven.shared:maven-invoker:3.3.0"
testImplementation "org.gradle:gradle-tooling-api:8.10.2"
testImplementation "org.gradle:gradle-tooling-api:8.11"
testImplementation "org.apache.maven.surefire:surefire-report-parser:3.5.2"
testImplementation "com.opencsv:opencsv:5.9"
testImplementation("io.zonky.test:embedded-database-spring-test:2.5.1") {
Expand Down Expand Up @@ -618,7 +621,7 @@ tasks.withType(Test).configureEach {
}

wrapper {
gradleVersion = "8.10.2"
gradleVersion = "8.11"
}

tasks.register("stage") {
Expand Down
47 changes: 47 additions & 0 deletions docs/admin/cleanup-service.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
.. _cleanup:

Cleanup Service
===============

Artemis provides a feature to delete data from older courses.

.. _cleanup-menu:

.. figure:: cleanup/cleanup-menu.png
:align: center
:alt: Cleanup view

As shown in the image, administrators can delete the following data types:

* Plagiarism results with an undecided outcome
* Orphaned data
* Non-rated results from older courses
* Rated results from older courses

Since orphaned data has no connections to other data by nature, it is deleted without considering specific dates.
For other types, administrators can track the related exercises and courses.
When a cleanup operation is performed with specified "from" and "to" dates, all data associated with that type and related to courses that started after the "from" date and ended before the "to" date is deleted.

Data Deletion by Operation Type
------------------------------------------

1. **Orphaned Data**:
- Long Feedback Text with feedback that has no results
- Text Block with feedback that has no results
- Feedback records without results
- Student and team scores where either a student or a team is specified
- Long Feedback Text where both participation and submission are missing
- Text Block where the referenced feedback has no associated participation or submission
- Feedback with no associated participation or submission
- All Ratings where the related result has no associated participation or submission
- Results without associated participation or submission

2. **Plagiarism Results with an Undecided Outcome**:
- All plagiarism comparisons related to courses within the specified dates and marked as undecided.

3. **Rated and Non-rated Results**:
- Both types follow the same logic, except for the rating status of results (rated vs. non-rated).
- For each type, only the latest valid result within a participation is retained, while all others are deleted.
- Because direct result deletion is restricted due to data integrity reasons, Artemis first removes associated data for results scheduled for deletion, including Long Feedback Text, Text Block, Feedback, Student Score, and Team Score.

Artemis also records the date of the last cleanup operation, as seen in the last column of the table shown in the image.
Binary file added docs/admin/cleanup/cleanup-menu.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ All these exercises are supposed to be run either live in the lecture with insta
admin/knownIssues
admin/benchmarking-tool
admin/telemetry
admin/cleanup-service


.. toctree::
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jplag_version=5.1.0
# NOTE: we do not need to use the latest version 9.x here as long as Stanford CoreNLP does not reference it
lucene_version=8.11.4
slf4j_version=2.0.16
sentry_version=7.16.0
sentry_version=7.17.0
liquibase_version=4.30.0
docker_java_version=3.4.0
logback_version=1.5.12
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
8 changes: 4 additions & 4 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,10 @@ module.exports = {
coverageThreshold: {
global: {
// TODO: in the future, the following values should increase to at least 90%
statements: 87.55,
branches: 73.68,
functions: 82.12,
lines: 87.61,
statements: 87.67,
branches: 73.81,
functions: 82.17,
lines: 87.72,
},
},
coverageReporters: ['clover', 'json', 'lcov', 'text-summary'],
Expand Down
15 changes: 1 addition & 14 deletions linting.sh
Original file line number Diff line number Diff line change
@@ -1,16 +1,3 @@
#!/bin/sh
join_by () {
local IFS="$1";
shift;
echo "$*";
}

FILES=$(join_by "," "$@")

if [[ "$OSTYPE" == "msys" ]]; then
# replace backslashes with double backslashes in Windows file paths when
# using MinGW (msys = lightweight shell and GNU utilities compiled for Windows (part of MinGW)
FILES=$(echo $FILES | sed 's/\\/\\\\/g')
fi

./gradlew spotlessApply -PspotlessFiles="${FILES}"
./gradlew spotlessApply -PratchetFrom='develop'
37 changes: 35 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "artemis",
"version": "7.7.0",
"version": "7.7.1",
"description": "Interactive Learning with Individual Feedback",
"private": true,
"license": "MIT",
Expand Down Expand Up @@ -67,6 +67,7 @@
"ngx-infinite-scroll": "18.0.0",
"ngx-webstorage": "18.0.0",
"papaparse": "5.4.1",
"pdf-lib": "1.17.1",
"pdfjs-dist": "4.8.69",
"posthog-js": "1.181.0",
"rxjs": "7.8.1",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
package de.tum.cit.aet.artemis.assessment.dto;

import java.util.List;
import java.util.Set;

import com.fasterxml.jackson.annotation.JsonInclude;

import de.tum.cit.aet.artemis.core.dto.SearchResultPageDTO;

@JsonInclude(JsonInclude.Include.NON_EMPTY)
public record FeedbackAnalysisResponseDTO(SearchResultPageDTO<FeedbackDetailDTO> feedbackDetails, long totalItems, int totalAmountOfTasks, List<String> testCaseNames) {
public record FeedbackAnalysisResponseDTO(SearchResultPageDTO<FeedbackDetailDTO> feedbackDetails, long totalItems, Set<String> taskNames, List<String> testCaseNames,
List<String> errorCategories) {
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
import com.fasterxml.jackson.annotation.JsonInclude;

@JsonInclude(JsonInclude.Include.NON_EMPTY)
public record FeedbackDetailDTO(long count, double relativeCount, String detailText, String testCaseName, String taskNumber, String errorCategory) {
public record FeedbackDetailDTO(long count, double relativeCount, String detailText, String testCaseName, String taskName, String errorCategory) {
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ public class FeedbackPageableDTO extends PageableSearchDTO<String> {

private String searchTerm;

private List<String> filterErrorCategories;

public List<String> getFilterTasks() {
return filterTasks;
}
Expand Down Expand Up @@ -45,4 +47,12 @@ public String getSearchTerm() {
public void setSearchTerm(String searchTerm) {
this.searchTerm = searchTerm;
}

public List<String> getFilterErrorCategories() {
return filterErrorCategories;
}

public void setFilterErrorCategories(List<String> filterErrorCategories) {
this.filterErrorCategories = filterErrorCategories;
}
}
Loading

0 comments on commit 47c2671

Please sign in to comment.