Skip to content
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,6 @@ The scripts will:

Alternatively, you can manually build and launch everything:

Alternatively, you can manually build and launch everything:

1. Build and launch:

```bash
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ plugins {
id 'java'
id 'com.diffplug.spotless' version '8.1.0'
id 'com.github.ben-manes.versions' version '0.53.0'
id 'org.springframework.boot' version '4.0.0-RC2'
id 'org.springframework.boot' version '4.0.0'
id 'io.spring.dependency-management' version '1.1.7'
id "org.springdoc.openapi-gradle-plugin" version "1.9.0"
id "org.openapi.generator" version "7.17.0"
Expand Down
2 changes: 1 addition & 1 deletion openapi/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ components:
properties:
id: {type: integer, format: int64}
repositoryUri: {type: string}
submissionCount: {type: integer, format: int32}
team: {$ref: '#/components/schemas/TeamDTO'}
TeamDTO:
type: object
Expand All @@ -42,7 +43,6 @@ components:
TeamRepositoryDTO:
type: object
properties:
commitCount: {type: integer, format: int32}
error: {type: string}
isCloned: {type: boolean}
localPath: {type: string}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,16 @@
* DTO for Artemis API participation response.
* Represents a team's participation in an exercise, linking the team to its repository.
*
* @param id The unique identifier of the participation record.
* @param repositoryUri The URI or URL of the code repository associated with this participation.
* @param team The team associated with this participation.
* @param id The unique identifier of the participation record.
* @param repositoryUri The URI or URL of the code repository associated with this participation.
* @param submissionCount The number of submissions made by the team for this participation.
* @param team The team associated with this participation.
*/
@JsonIgnoreProperties(ignoreUnknown = true)
public record ParticipationDTO(
TeamDTO team,
Long id,
String repositoryUri,
TeamDTO team
Integer submissionCount
) {
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
* DTO for a Team.
* Used to represent team information, including its members and owner.
*
* @param id The unique identifier of the team.
* @param name The full name of the team.
* @param id The unique identifier of the team.
* @param name The full name of the team.
* @param shortName The shortened name for the team.
* @param students A list of the team members (participants).
* @param owner The tutor for the team.
* @param students A list of the team members (participants).
* @param owner The tutor for the team.
*/
@JsonIgnoreProperties(ignoreUnknown = true)
public record TeamDTO(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,16 @@

/**
* DTO representing a team's repository information and analysis results.
*
* @param participation The participation details, including the team and repository URI.
* @param localPath The path to the local copy of the repository, if successfully cloned.
* @param isCloned A flag indicating whether the repository was successfully cloned locally.
* @param error Any error message encountered during processing (e.g., cloning failure).
*/
@JsonInclude(JsonInclude.Include.NON_NULL)
public record TeamRepositoryDTO(
ParticipationDTO participation,
String localPath,
Integer commitCount,
Boolean isCloned,
String error
) {
Expand All @@ -20,17 +24,10 @@ public static TeamRepositoryDTOBuilder builder() {
return new TeamRepositoryDTOBuilder();
}

/**
* Creates a copy with updated commitCount.
*/
public TeamRepositoryDTO withCommitCount(Integer commitCount) {
return new TeamRepositoryDTO(participation, localPath, commitCount, isCloned, error);
}

/**
* Creates a copy with updated error.
*/
public TeamRepositoryDTO withError(String error) {
return new TeamRepositoryDTO(participation, localPath, commitCount, isCloned, error);
return new TeamRepositoryDTO(participation, localPath, isCloned, error);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
public class TeamRepositoryDTOBuilder {
private ParticipationDTO participation;
private String localPath;
private Integer commitCount;
private Boolean isCloned;
private String error;

Expand All @@ -20,10 +19,6 @@ public TeamRepositoryDTOBuilder localPath(String localPath) {
return this;
}

public TeamRepositoryDTOBuilder commitCount(Integer commitCount) {
this.commitCount = commitCount;
return this;
}

public TeamRepositoryDTOBuilder isCloned(Boolean isCloned) {
this.isCloned = isCloned;
Expand All @@ -36,6 +31,6 @@ public TeamRepositoryDTOBuilder error(String error) {
}

public TeamRepositoryDTO build() {
return new TeamRepositoryDTO(participation, localPath, commitCount, isCloned, error);
return new TeamRepositoryDTO(participation, localPath, isCloned, error);
}
}
12 changes: 7 additions & 5 deletions src/main/webapp/src/app/generated/docs/ParticipationDTO.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@

## Properties

| Name | Type | Description | Notes |
| ----------------- | ------------------------- | ----------- | --------------------------------- |
| **id** | **number** | | [optional] [default to undefined] |
| **repositoryUri** | **string** | | [optional] [default to undefined] |
| **team** | [**TeamDTO**](TeamDTO.md) | | [optional] [default to undefined] |
| Name | Type | Description | Notes |
| ------------------- | ------------------------- | ----------- | --------------------------------- |
| **id** | **number** | | [optional] [default to undefined] |
| **repositoryUri** | **string** | | [optional] [default to undefined] |
| **submissionCount** | **number** | | [optional] [default to undefined] |
| **team** | [**TeamDTO**](TeamDTO.md) | | [optional] [default to undefined] |

## Example

Expand All @@ -16,6 +17,7 @@ import { ParticipationDTO } from './api';
const instance: ParticipationDTO = {
id,
repositoryUri,
submissionCount,
team,
};
```
Expand Down
2 changes: 0 additions & 2 deletions src/main/webapp/src/app/generated/docs/TeamRepositoryDTO.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

| Name | Type | Description | Notes |
| ----------------- | ------------------------------------------- | ----------- | --------------------------------- |
| **commitCount** | **number** | | [optional] [default to undefined] |
| **error** | **string** | | [optional] [default to undefined] |
| **isCloned** | **boolean** | | [optional] [default to undefined] |
| **localPath** | **string** | | [optional] [default to undefined] |
Expand All @@ -16,7 +15,6 @@
import { TeamRepositoryDTO } from './api';

const instance: TeamRepositoryDTO = {
commitCount,
error,
isCloned,
localPath,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,6 @@ import type { TeamDTO } from './team-dto';
export interface ParticipationDTO {
id?: number;
repositoryUri?: string;
submissionCount?: number;
team?: TeamDTO;
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
import type { ParticipationDTO } from './participation-dto';

export interface TeamRepositoryDTO {
commitCount?: number;
error?: string;
isCloned?: boolean;
localPath?: string;
Expand Down
4 changes: 2 additions & 2 deletions src/main/webapp/src/data/dataLoaders.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
function transformToBasicTeamData(dto: TeamRepositoryDTO): BasicTeamData {
const teamName = dto.participation?.team?.name || 'Unknown Team';
const students = dto.participation?.team?.students || [];
const totalCommits = dto.commitCount || 0;
const totalCommits = dto.participation?.submissionCount || 0;
Comment thread
az108 marked this conversation as resolved.

// Mock: Distribute commits among students
const studentData = students.map((student, index) => {
Expand Down Expand Up @@ -98,7 +98,7 @@
*/
function transformToComplexTeamData(dto: TeamRepositoryDTO): ComplexTeamData {
const basicData = transformToBasicTeamData(dto);
const totalCommits = dto.commitCount || 0;
const totalCommits = dto.participation?.submissionCount || 0;

// Mock: Calculate CQI score (0-100)
// Formula: Base score + commit bonus, capped at 100
Expand Down Expand Up @@ -150,7 +150,7 @@
// ============================================================
// API CALLS (Real Implementation)
// ============================================================
async function fetchBasicTeamsFromAPI(_course: string, _exercise: string): Promise<BasicTeamData[]> {

Check failure on line 153 in src/main/webapp/src/data/dataLoaders.ts

View workflow job for this annotation

GitHub Actions / client-style

'_exercise' is defined but never used

Check failure on line 153 in src/main/webapp/src/data/dataLoaders.ts

View workflow job for this annotation

GitHub Actions / client-style

'_course' is defined but never used
// Note: course and exercise parameters not yet used by backend endpoint
try {
const response = await requestApi.fetchAndCloneRepositories();
Expand All @@ -164,7 +164,7 @@
}
}

async function fetchComplexTeamsFromAPI(_course: string, _exercise: string): Promise<ComplexTeamData[]> {

Check failure on line 167 in src/main/webapp/src/data/dataLoaders.ts

View workflow job for this annotation

GitHub Actions / client-style

'_exercise' is defined but never used

Check failure on line 167 in src/main/webapp/src/data/dataLoaders.ts

View workflow job for this annotation

GitHub Actions / client-style

'_course' is defined but never used
// Note: course and exercise parameters not yet used by backend endpoint
try {
const response = await requestApi.fetchAndCloneRepositories();
Expand Down
Loading