Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Programming exercises: Add Artemis Intelligence rewriting for problem statement #10156

Open
wants to merge 4 commits into
base: feature/communication/rephrasing-pipeline
Choose a base branch
from

Conversation

FelixTJDietrich
Copy link
Contributor

@FelixTJDietrich FelixTJDietrich commented Jan 16, 2025

Note

This PR depends on the counterpart in Iris. For testing, deploy Pyris#192 via deploy:pyris-test if it is not already deployed (lock:pyris-test). You can use TS1, TS3, TS5 for testing since it has Iris enabled.

Checklist

General

Client

  • Important: I implemented the changes with a very good performance, prevented too many (unnecessary) REST calls and made sure the UI is responsive, even with large data (e.g. using paging).
  • I strictly followed the principle of data economy for all client-server REST calls.
  • I strictly followed the client coding and design guidelines.
  • Following the theming guidelines, I specified colors only in the theming variable files and checked that the changes look consistent in both the light and the dark theme.
  • I added multiple integration tests (Jest) related to the features (with a high test coverage), while following the test guidelines.
  • I documented the TypeScript code using JSDoc style.
  • I added multiple screenshots/screencasts of my UI changes.
  • I translated all newly inserted strings into English and German.

Motivation and Context

We want to make it easier to provide high quality problem statements to students while reducing the effort needed by a instructors. For this we want integrated AI assistance to help us rewrite and improve the problem statement.

Description

Adds the Artemis Intelligence rewrite action to the problem statement when creating or editing a programming exercise.

Steps for Testing

Prerequisites:

  • 1 Instructor

Make sure that Pyris#192 is deployed

  1. Log in to Artemis
  2. Navigate to Course Management
  3. Select a course then exercises
  4. Create or edit a programming exercise
  5. Scroll down to "Problem" and modify the problem statement however you want
  6. In the toolbar, right of "Insert Test Case", press "AI", then "Rewrite"
  7. Wait for the response
  8. The problem statement should be updated with a success alert.
  9. Crtl/CMD+Z and Y to compare the changes made by Artemis Intelligence

Testserver States

Note

These badges show the state of the test servers.
Green = Currently available, Red = Currently locked
Click on the badges to get to the test servers.







Review Progress

Code Review

  • Code Review 1
  • Code Review 2

Manual Tests

  • Test 1
  • Test 2

Test Coverage

Unchanged

Screenshots

Untitled mov

@github-actions github-actions bot added the client Pull requests that update TypeScript code. (Added Automatically!) label Jan 16, 2025
@github-actions github-actions bot added tests server Pull requests that update Java code. (Added Automatically!) communication Pull requests that affect the corresponding module core Pull requests that affect the corresponding module iris Pull requests that affect the corresponding module labels Jan 17, 2025
@FelixTJDietrich FelixTJDietrich changed the base branch from develop to feature/communication/rephrasing-pipeline January 17, 2025 12:49
…-pipeline' into feature/programming-exercises/rephrase-action-for-problem-statement
@github-actions github-actions bot removed tests server Pull requests that update Java code. (Added Automatically!) communication Pull requests that affect the corresponding module core Pull requests that affect the corresponding module iris Pull requests that affect the corresponding module labels Jan 17, 2025
@FelixTJDietrich FelixTJDietrich changed the title Programming exercises: Add Artemis Intelligence rephrasing for problem statement Programming exercises: Add Artemis Intelligence rewriting for problem statement Jan 17, 2025
@FelixTJDietrich FelixTJDietrich marked this pull request as ready for review January 17, 2025 15:23
@FelixTJDietrich FelixTJDietrich requested a review from a team as a code owner January 17, 2025 15:23
@FelixTJDietrich FelixTJDietrich modified the milestones: 7.9.0, 7.9.1 Jan 17, 2025
@FelixTJDietrich FelixTJDietrich added component:Iris iris Pull requests that affect the corresponding module labels Jan 17, 2025
Copy link
Contributor

@SimonEntholzer SimonEntholzer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code, I have one nitpick though

import { AlertService } from 'app/core/util/alert.service';
import { ProgrammingExerciseInstructionComponent } from 'app/exercises/programming/shared/instructions-render/programming-exercise-instruction.component';
import { Observable, Subject, Subscription, of, throwError } from 'rxjs';
import { catchError, map as rxMap, switchMap, tap } from 'rxjs/operators';
import { catchError, map, map as rxMap, switchMap, tap } from 'rxjs/operators';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

probably it would make sense to only import map once

Copy link

@HawKhiem HawKhiem left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested on TS3. Works as described

Screenshot 2025-01-18 204500
Screenshot 2025-01-18 204512

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
client Pull requests that update TypeScript code. (Added Automatically!) component:Iris iris Pull requests that affect the corresponding module ready for review
Projects
Status: Work In Progress
Status: Todo
Development

Successfully merging this pull request may close these issues.

3 participants