Skip to content

Commit

Permalink
remove hestia in the client and remaining other files
Browse files Browse the repository at this point in the history
  • Loading branch information
krusche committed Dec 10, 2024
1 parent 809684b commit 6f6390d
Show file tree
Hide file tree
Showing 222 changed files with 193 additions and 6,436 deletions.
1 change: 0 additions & 1 deletion .github/issue-labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,6 @@ programming:
- build plan
- code hint
- \b(?<!\S)git(?!\S)\b
- testwise coverage
- \b(?<!\S)ide(?!\S)\b
- submission policy
- aeolus
Expand Down
3 changes: 0 additions & 3 deletions docs/admin/setup/programming-exercises.rst
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,6 @@ server or exercise settings:
* - ``#isStaticCodeAnalysisEnabled``
- Defines if static code analysis should be performed.
- Exercise configuration
* - ``#isTestWiseCoverageEnabled``
- Defines if testwise coverage should be collected.
- Exercise configuration

The ``pipeline.groovy`` file can be customized further by instructors after creating the exercise from within
Artemis via the ‘Edit Build Plan’ button on the details page of the exercise.
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
75 changes: 35 additions & 40 deletions docs/user/exercises/programming-exercise-features.inc

Large diffs are not rendered by default.

3 changes: 0 additions & 3 deletions docs/user/exercises/programming-exercise-setup.inc
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,6 @@ Generate programming exercise
- **Sequential Test Runs:** Activate this option to first run structural and then behavior tests.
This feature allows students to better concentrate on the immediate challenge at hand.
Not supported together with static code analysis. Cannot be changed after the exercise creation.
- **Record Testwise Coverage:** Activate this option to record the testwise coverage for the solution repository.
This is necessary when working with Hestia to generate code-based hints.
This option is only available for Java/Kotlin-exercises with non-sequential test runs.
- **Customize Build Plan** Activate this option if you want to customize the build plan of your exercise.
This feature is available for all programming languages, and works with LocalCI and Jenkins, Artemis provides templates for the build plan configuration.
The build plan can also be customized after the exercise creation.
Expand Down
1 change: 0 additions & 1 deletion jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,6 @@ module.exports = {
'src/main/webapp/app/exercises/file-upload/manage/file-upload-exercise-management.route.ts',
'src/main/webapp/app/exercises/modeling/manage/modeling-exercise.route.ts',
'src/main/webapp/app/exam/manage/exam-management.route.ts',
'src/main/webapp/app/exercises/shared/exercise-hint/manage/exercise-hint.route.ts',
'src/main/webapp/app/core/config/prod.config.ts',
],
coverageThreshold: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public class Feedback extends DomainObject {
* null if the feedback was not created by an automatic test case.
*/
@ManyToOne(fetch = FetchType.LAZY)
@JsonIgnoreProperties({ "tasks", "solutionEntries", "exercise", "coverageEntries" })
@JsonIgnoreProperties({ "tasks", "exercise" })
private ProgrammingExerciseTestCase testCase;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import java.io.Serializable;
import java.time.ZonedDateTime;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

import org.springframework.util.ObjectUtils;
Expand All @@ -16,7 +15,6 @@
import de.tum.cit.aet.artemis.programming.dto.BuildJobDTOInterface;
import de.tum.cit.aet.artemis.programming.dto.StaticCodeAnalysisReportDTO;
import de.tum.cit.aet.artemis.programming.dto.TestCaseBaseDTO;
import de.tum.cit.aet.artemis.programming.service.ci.notification.dto.TestwiseCoverageReportDTO;

/**
* Represents all the information returned by the local CI system about a build.
Expand Down Expand Up @@ -148,12 +146,6 @@ public List<StaticCodeAnalysisReportDTO> getStaticCodeAnalysisReports() {
return staticCodeAnalysisReports;
}

@Override
public List<TestwiseCoverageReportDTO> getTestwiseCoverageReports() {
// TODO LOCALVC_CI: Implement testwise coverage and return the reports here.
return Collections.emptyList();
}

/**
* Represents all the information returned by the local CI system about a job.
* In the current implementation of local CI, there is always one job per build.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public enum ProgrammingExerciseTestCaseType {
*/
BEHAVIORAL,
/**
* Type for all programming exercises not supported by Hestia
* All other types
*/
DEFAULT,
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@

import de.tum.cit.aet.artemis.exercise.domain.SubmissionType;
import de.tum.cit.aet.artemis.programming.domain.build.BuildLogEntry;
import de.tum.cit.aet.artemis.programming.service.ci.notification.dto.TestwiseCoverageReportDTO;

@JsonIgnoreProperties(ignoreUnknown = true)
@JsonInclude(JsonInclude.Include.NON_EMPTY)
Expand Down Expand Up @@ -71,11 +70,4 @@ else if (submissionType.equals(SubmissionType.TEST)) {
* @return list of static code analysis reports.
*/
public abstract List<StaticCodeAnalysisReportDTO> getStaticCodeAnalysisReports();

/**
* Gets the test-wise coverage reports that are part of the build result.
*
* @return list of test-wise coverage reports.
*/
public abstract List<TestwiseCoverageReportDTO> getTestwiseCoverageReports();
}
Original file line number Diff line number Diff line change
Expand Up @@ -311,11 +311,9 @@ default ProgrammingExercise findOneByProjectKeyOrThrow(String projectKey, boolea
FROM ProgrammingExercise p
LEFT JOIN FETCH p.testCases tc
LEFT JOIN FETCH p.staticCodeAnalysisCategories
LEFT JOIN FETCH p.exerciseHints
LEFT JOIN FETCH p.templateParticipation
LEFT JOIN FETCH p.solutionParticipation
LEFT JOIN FETCH p.auxiliaryRepositories
LEFT JOIN FETCH tc.solutionEntries
LEFT JOIN FETCH p.buildConfig
WHERE p.id = :exerciseId
""")
Expand All @@ -327,11 +325,9 @@ Optional<ProgrammingExercise> findByIdWithEagerTestCasesStaticCodeAnalysisCatego
FROM ProgrammingExercise p
LEFT JOIN FETCH p.testCases tc
LEFT JOIN FETCH p.staticCodeAnalysisCategories
LEFT JOIN FETCH p.exerciseHints
LEFT JOIN FETCH p.templateParticipation
LEFT JOIN FETCH p.solutionParticipation
LEFT JOIN FETCH p.auxiliaryRepositories
LEFT JOIN FETCH tc.solutionEntries
LEFT JOIN FETCH p.buildConfig
WHERE p.id = :exerciseId
""")
Expand All @@ -343,11 +339,9 @@ Optional<ProgrammingExercise> findByIdWithEagerBuildConfigTestCasesStaticCodeAna
FROM ProgrammingExercise p
LEFT JOIN FETCH p.testCases tc
LEFT JOIN FETCH p.staticCodeAnalysisCategories
LEFT JOIN FETCH p.exerciseHints
LEFT JOIN FETCH p.templateParticipation
LEFT JOIN FETCH p.solutionParticipation
LEFT JOIN FETCH p.auxiliaryRepositories
LEFT JOIN FETCH tc.solutionEntries
LEFT JOIN FETCH p.buildConfig
LEFT JOIN FETCH p.plagiarismDetectionConfig
WHERE p.id = :exerciseId
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ default List<ProgrammingExerciseTask> findByExerciseIdWithTestCaseAndSolutionEnt
SELECT t
FROM ProgrammingExerciseTask t
LEFT JOIN FETCH t.testCases tc
LEFT JOIN FETCH tc.solutionEntries
WHERE t.exercise.id = :exerciseId
AND tc.exercise.id = :exerciseId
""")
Expand All @@ -62,17 +61,7 @@ default List<ProgrammingExerciseTask> findByExerciseIdWithTestCaseAndSolutionEnt
SELECT t
FROM ProgrammingExerciseTask t
LEFT JOIN FETCH t.testCases tc
LEFT JOIN FETCH tc.solutionEntries
WHERE t.exercise.id = :exerciseId
""")
Set<ProgrammingExerciseTask> findByExerciseIdWithTestCases(@Param("exerciseId") Long exerciseId);

@Query("""
SELECT pt
FROM ProgrammingExerciseTask pt
LEFT JOIN FETCH pt.exerciseHints h
LEFT JOIN FETCH pt.testCases tc
WHERE h.id = :codeHintId
""")
Optional<ProgrammingExerciseTask> findByCodeHintIdWithTestCases(@Param("codeHintId") Long codeHintId);
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import static de.tum.cit.aet.artemis.core.config.Constants.PROFILE_CORE;

import java.util.Optional;
import java.util.Set;

import org.springframework.context.annotation.Profile;
Expand All @@ -23,40 +22,6 @@ public interface ProgrammingExerciseTestCaseRepository extends ArtemisJpaReposit

Set<ProgrammingExerciseTestCase> findByExerciseId(long exerciseId);

default ProgrammingExerciseTestCase findByIdWithExerciseElseThrow(long testCaseId) {
return getValueElseThrow(findByIdWithExercise(testCaseId), testCaseId);
}

/**
* Returns the test case with the programming exercise
*
* @param testCaseId of the test case
* @return the test case with the programming exercise
*/
@Query("""
SELECT tc
FROM ProgrammingExerciseTestCase tc
LEFT JOIN FETCH tc.exercise ex
WHERE tc.id = :testCaseId
""")
Optional<ProgrammingExerciseTestCase> findByIdWithExercise(@Param("testCaseId") long testCaseId);

/**
* Returns all test cases with the associated solution entries for a programming exercise
*
* @param exerciseId of the exercise
* @param active status of the test case
* @return all test cases with the associated solution entries
*/
@Query("""
SELECT DISTINCT tc
FROM ProgrammingExerciseTestCase tc
LEFT JOIN FETCH tc.solutionEntries se
WHERE tc.exercise.id = :exerciseId
AND tc.active = :active
""")
Set<ProgrammingExerciseTestCase> findByExerciseIdWithSolutionEntriesAndActive(@Param("exerciseId") long exerciseId, @Param("active") Boolean active);

Set<ProgrammingExerciseTestCase> findByExerciseIdAndActive(long exerciseId, Boolean active);

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,5 @@
*/
@JsonInclude(JsonInclude.Include.NON_EMPTY)
public record ProgrammingLanguageFeature(ProgrammingLanguage programmingLanguage, boolean sequentialTestRuns, boolean staticCodeAnalysis, boolean plagiarismCheckSupported,
boolean packageNameRequired, boolean checkoutSolutionRepositoryAllowed, List<ProjectType> projectTypes, boolean testwiseCoverageAnalysisSupported,
boolean auxiliaryRepositoriesSupported) {
boolean packageNameRequired, boolean checkoutSolutionRepositoryAllowed, List<ProjectType> projectTypes, boolean auxiliaryRepositoriesSupported) {
}
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,6 @@ private static Windfile readWindfile(String yaml) throws IOException {
* @param projectType the project type for which the template file should be returned. If omitted, a default depending on the language will be used.
* @param staticAnalysis whether the static analysis template should be used
* @param sequentialRuns whether the sequential runs template should be used
* @param testCoverage whether the test coverage template should be used
* @return the requested template as a {@link Windfile} object
* @throws IOException if the file does not exist
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,6 @@ public class TestResultsDTO extends AbstractBuildResultNotificationDTO {

private final List<StaticCodeAnalysisReportDTO> staticCodeAnalysisReports;

private final List<TestwiseCoverageReportDTO> testwiseCoverageReport;

private final ZonedDateTime runDate;

private final boolean isBuildSuccessful;
Expand All @@ -54,7 +52,6 @@ public TestResultsDTO(@JsonProperty("successful") int successful, @JsonProperty(
@JsonProperty("failures") int failures, @JsonProperty("fullName") String fullName, @JsonProperty("commits") @JsonSetter(nulls = Nulls.AS_EMPTY) List<CommitDTO> commits,
@JsonProperty("results") @JsonSetter(nulls = Nulls.AS_EMPTY) List<TestSuiteDTO> results,
@JsonProperty("staticCodeAnalysisReports") @JsonSetter(nulls = Nulls.AS_EMPTY) List<StaticCodeAnalysisReportDTO> staticCodeAnalysisReports,
@JsonProperty("testwiseCoverageReport") @JsonSetter(nulls = Nulls.AS_EMPTY) List<TestwiseCoverageReportDTO> testwiseCoverageReport,
@JsonProperty("runDate") ZonedDateTime runDate, @JsonProperty("isBuildSuccessful") boolean isBuildSuccessful,
@JsonProperty("logs") @JsonSetter(nulls = Nulls.AS_EMPTY) List<String> logs) {
this.successful = successful;
Expand All @@ -65,7 +62,6 @@ public TestResultsDTO(@JsonProperty("successful") int successful, @JsonProperty(
this.commits = commits;
this.results = results;
this.staticCodeAnalysisReports = staticCodeAnalysisReports;
this.testwiseCoverageReport = testwiseCoverageReport;
this.runDate = runDate;
this.isBuildSuccessful = isBuildSuccessful;
this.logs = logs;
Expand Down Expand Up @@ -157,11 +153,6 @@ public List<StaticCodeAnalysisReportDTO> getStaticCodeAnalysisReports() {
return staticCodeAnalysisReports;
}

@Override
public List<TestwiseCoverageReportDTO> getTestwiseCoverageReports() {
return testwiseCoverageReport;
}

@Override
public boolean hasArtifact() {
// TODO: this is not available in Jenkins or GitLab CI yet
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@
public class GitLabCIProgrammingLanguageFeatureService extends ProgrammingLanguageFeatureService {

public GitLabCIProgrammingLanguageFeatureService() {
programmingLanguageFeatures.put(EMPTY, new ProgrammingLanguageFeature(EMPTY, false, false, false, false, false, List.of(), false, false));
programmingLanguageFeatures.put(JAVA, new ProgrammingLanguageFeature(JAVA, false, false, false, true, false, List.of(PLAIN_MAVEN, MAVEN_MAVEN), false, false));
programmingLanguageFeatures.put(JAVASCRIPT, new ProgrammingLanguageFeature(JAVASCRIPT, false, false, true, false, false, List.of(), false, false));
programmingLanguageFeatures.put(RUST, new ProgrammingLanguageFeature(RUST, false, false, true, false, false, List.of(), false, false));
programmingLanguageFeatures.put(EMPTY, new ProgrammingLanguageFeature(EMPTY, false, false, false, false, false, List.of(), false));
programmingLanguageFeatures.put(JAVA, new ProgrammingLanguageFeature(JAVA, false, false, false, true, false, List.of(PLAIN_MAVEN, MAVEN_MAVEN), false));
programmingLanguageFeatures.put(JAVASCRIPT, new ProgrammingLanguageFeature(JAVASCRIPT, false, false, true, false, false, List.of(), false));
programmingLanguageFeatures.put(RUST, new ProgrammingLanguageFeature(RUST, false, false, true, false, false, List.of(), false));
}
}
Loading

0 comments on commit 6f6390d

Please sign in to comment.