Skip to content

Conversation

@khinevich
Copy link

@khinevich khinevich commented Nov 18, 2025

Checklist

General

Server

  • Important: I implemented the changes with a very good performance and prevented too many (unnecessary) and too complex database calls.
  • I strictly followed the principle of data economy for all database calls.
  • I strictly followed the server coding and design guidelines.
  • I added pre-authorization annotations according to the guidelines and checked the course groups for all new REST Calls (security).

Motivation and Context

When developing a new Consistency Check approach, we need to evaluate it. This can be done with PECV (Programming Exercise Consistency Varification) Bench.
Provided in this MR solution runs the python script, which establishes a workflow, using PECV Dataset for the Consistency Check.
This approach is necessary for developers to systematically evaluate new approaches. Instead of a continuous process, a developer will trigger this script and observe the approach metric. This capability allows developers to conveniently run the benchmark against a specific version of consistency check approach to measure its performance, so that developers can contribute measurable improvements.

Description

Changes in supporting-scripts/course-scripts folder only

  • created hyperion-benchmark-workflow folder with related config.ini, README.md, requirements.txt and .gitignore files
  • reused logging_config.py, utils.py from quick-course-setup project
  • create_pecv_bench_course.py - for creating a PECV Bench Course with default course setting (reused from quick-course-setup) and deletion of PECV Bench Course
  • manage_programming_exercise.py - used for exercises data modification, shrinking (ZIP), exercise import to server and concurrent consistency check execution
  • run_pecv_bench_in_artemis.py - main executable file with some helper methods: clones PECV Bench repository, installs dependencies, creates variants exercises, handles exercise imports function and reporting summarization.
    Main method, upon already listed functions, calls consistency check

Steps for Testing

  • Artemis Instance is running
  1. Navigate to hyperion-benchmark-workflow folder
cd supporting_scripts/course-scripts/hyperion-benchmark-workflow
  1. Create a virtual environment (make sure to use python 3.13):
    python3 -m venv venv
  2. Activate the virtual environment:
    • On macOS/Linux:
      source venv/bin/activate
    • On Windows:
      venv\Scripts\activate
  3. Install the Required Packages
pip install -r requirements.txt
  1. run benchmark script
python3 run_pecv_bench_in_artemis.py

!!! If executions fails due to Course Deletion issue (before it fails, script tries 3 times send Delete request), just rerun the script.

  1. Execution takes around 10 minutes. Results will be stored in results/artemis-benchmark/report.md file

Screenshots

  1. Project structure
Screenshot 2025-12-01 at 14 04 21
  1. Project structure after execution
Screenshot 2025-12-01 at 14 05 16
  1. Expected result metrics (Tokens are set to 0 for now, since consistency check response does not deliver tokens information, TODO in follow up MR)
Screenshot 2025-12-01 at 14 06 06 Screenshot 2025-12-01 at 14 06 20 Screenshot 2025-12-01 at 14 06 31

Testserver States

You can manage test servers using Helios. Check environment statuses in the environment list. To deploy to a test server, go to the CI/CD page, find your PR or branch, and trigger the deployment.

Review Progress

Performance Review

Code Review

  • Code Review 1
  • Code Review 2

Manual Tests

  • Test 1
  • Test 2

Summary by CodeRabbit

  • New Features

    • Full PECV‑Bench Hyperion workflow: automated course creation, variant generation, exercise packaging/import, parallel imports, per‑variant consistency checks, analysis, and report/plot generation.
  • Documentation

    • Added a comprehensive README with prerequisites, setup, configuration, execution steps, and expected results layout.
  • Chores

    • Updated repository ignore patterns, added logging configuration, and added a dependency manifest.

✏️ Tip: You can customize this high-level summary in your review settings.

…reating a course, and an exercise. And duplicate all important functionality from quick-course-setup folder
@khinevich khinevich requested review from a team and krusche as code owners November 18, 2025 09:46
@github-project-automation github-project-automation bot moved this to Work In Progress in Artemis Development Nov 18, 2025
@khinevich khinevich self-assigned this Nov 18, 2025
@khinevich khinevich marked this pull request as draft November 18, 2025 09:46
@khinevich khinevich changed the title Feature/hyperion/run pecv bench in artemis Hyperion: Run PECV Bench in Artemis Nov 18, 2025
@github-project-automation github-project-automation bot moved this to Work In Progress in Artemis Development Nov 18, 2025
@khinevich khinevich moved this to In progress in Hyperion Nov 18, 2025
@khinevich khinevich changed the title Hyperion: Run PECV Bench in Artemis Programmin Exercise: Run PECV Bench in Artemis Nov 18, 2025
@khinevich khinevich changed the title Programmin Exercise: Run PECV Bench in Artemis Programming Exercise: Run PECV Bench in Artemis Nov 18, 2025
@khinevich khinevich changed the title Programming Exercise: Run PECV Bench in Artemis Programming exercises: Run PECV Bench in Artemis Nov 18, 2025
@khinevich khinevich changed the title Programming exercises: Run PECV Bench in Artemis Development: Run PECV Bench in Artemis Dec 1, 2025
@khinevich khinevich marked this pull request as ready for review December 1, 2025 13:13
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 1, 2025

Walkthrough

Adds a PECV‑Bench Hyperion benchmark automation suite: ignore patterns and requirements, README, logging and auth utilities, course create/delete, exercise packaging/import and consistency checks, and an orchestration script to run the end‑to‑end workflow against an Artemis server.

Changes

Cohort / File(s) Summary
Ignore & deps
supporting_scripts/course-scripts/hyperion-benchmark-workflow/.gitignore, supporting_scripts/course-scripts/hyperion-benchmark-workflow/requirements.txt
Adds common gitignore patterns for Python/dev artifacts and a requirements file containing requests.
Documentation
supporting_scripts/course-scripts/hyperion-benchmark-workflow/README.md
Adds a README describing prerequisites, setup, config, and step‑by‑step execution of the PECV‑Bench workflow.
Logging configuration
supporting_scripts/course-scripts/hyperion-benchmark-workflow/logging_config.py
Adds basic logging configuration (INFO level, standard format).
Utilities / Auth
supporting_scripts/course-scripts/hyperion-benchmark-workflow/utils.py
Adds config parsing and authentication helpers plus module constants (CLIENT_URL, SERVER_URL, ADMIN_USER, ADMIN_PASSWORD, authenticate_user, login_as_admin).
Course management
supporting_scripts/course-scripts/hyperion-benchmark-workflow/create_pecv_bench_course.py
Adds course creation/deletion routines, shortName sanitization, multipart form payload construction, retry-on-conflict handling, retryable delete with backoff, and logging.
Exercise packaging & checks
supporting_scripts/course-scripts/hyperion-benchmark-workflow/manage_programming_exercise.py
Adds functions to sanitize exercise names, read problem statements, build intermediate and final ZIP bundles (001-solution/template/tests and final 001-FullExercise.zip), modify Exercise-Details.json, upload/import exercises, run consistency checks, and persist per-variant JSON results.
Orchestration / CLI
supporting_scripts/course-scripts/hyperion-benchmark-workflow/run_pecv_bench_in_artemis.py
Adds orchestration: clone/pull PECV‑Bench, install deps, generate/materialize variants, parallelized packaging/import, concurrent consistency checks, analysis/report generation, and report injection/summarization.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant Orchestrator as run_pecv_bench_in_artemis.py
    participant GitRepo as PECV-Bench Repo
    participant FS as Filesystem
    participant PECVCLI as PECV-Bench CLI
    participant Artemis as Artemis Server

    User->>Orchestrator: run with config.ini
    Orchestrator->>Orchestrator: load config, init logging
    Orchestrator->>GitRepo: clone or pull PECV-Bench
    Orchestrator->>FS: install/editable dependencies
    Orchestrator->>PECVCLI: generate/materialize variants
    Orchestrator->>Artemis: authenticate (admin)
    Orchestrator->>Artemis: create PECV-Bench course (POST)

    par Per-variant (parallel)
        Orchestrator->>FS: convert variant -> intermediate zips + final ZIP
        Orchestrator->>Artemis: import exercise (multipart upload)
        Artemis-->>Orchestrator: return exercise ID
        Orchestrator->>FS: store mapping variant -> server ID
    end

    par Consistency checks (concurrent)
        Orchestrator->>Artemis: request consistency check (POST)
        Artemis-->>Orchestrator: return consistency results
        Orchestrator->>FS: persist per-variant JSON result
    end

    Orchestrator->>PECVCLI: run analysis / generate plots
    Orchestrator->>FS: generate final report and inject summary
    Orchestrator->>User: output results directory
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~50 minutes

  • Review focus:
    • Concurrency and shared-state safety (ThreadPoolExecutor usage) in run_pecv_bench_in_artemis.py
    • ZIP creation, Exercise-Details.json edits, temp file handling and cleanup in manage_programming_exercise.py
    • HTTP multipart payload formats, response validation and error handling across create_pecv_bench_course.py, manage_programming_exercise.py, and utils.py
    • Retry/backoff, idempotency and error propagation in create_pecv_bench_course.py
    • Config parsing, path assumptions, and result directory management across the orchestration and utility modules

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the main objective: enabling PECV Bench runs within Artemis. It is specific, concise, and directly reflects the primary changeset purpose of adding a workflow automation.
Docstring Coverage ✅ Passed Docstring coverage is 94.44% which is sufficient. The required threshold is 80.00%.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feature/hyperion/run-pecv-bench-in-artemis

📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e930c7d and 81e38ba.

⛔ Files ignored due to path filters (1)
  • supporting_scripts/course-scripts/hyperion-benchmark-workflow/config.ini is excluded by !**/*.ini
📒 Files selected for processing (1)
  • supporting_scripts/course-scripts/hyperion-benchmark-workflow/README.md (1 hunks)
🧰 Additional context used
🧠 Learnings (7)
📓 Common learnings
Learnt from: magaupp
Repo: ls1intum/Artemis PR: 8802
File: src/main/resources/templates/rust/exercise/src/context.rs:1-1
Timestamp: 2024-10-08T15:35:42.972Z
Learning: Code inside the `exercise` directories in the Artemis platform is provided to students and is intended for them to implement. TODO comments in these directories are meant to guide students and should not be addressed in the PR.
Learnt from: magaupp
Repo: ls1intum/Artemis PR: 8802
File: src/main/resources/templates/rust/exercise/src/context.rs:1-1
Timestamp: 2024-08-05T00:11:50.650Z
Learning: Code inside the `exercise` directories in the Artemis platform is provided to students and is intended for them to implement. TODO comments in these directories are meant to guide students and should not be addressed in the PR.
📚 Learning: 2024-07-09T19:08:50.316Z
Learnt from: florian-glombik
Repo: ls1intum/Artemis PR: 8858
File: src/main/webapp/app/shared/sidebar/sidebar.component.ts:59-59
Timestamp: 2024-07-09T19:08:50.316Z
Learning: For the PR ls1intum/Artemis#8858, avoid suggesting the removal of trivially inferred type annotations.

Applied to files:

  • supporting_scripts/course-scripts/hyperion-benchmark-workflow/README.md
📚 Learning: 2024-07-09T19:07:45.295Z
Learnt from: florian-glombik
Repo: ls1intum/Artemis PR: 8858
File: src/main/webapp/app/shared/exercise-filter/exercise-filter-modal.component.ts:56-56
Timestamp: 2024-07-09T19:07:45.295Z
Learning: In the context of PR ls1intum/Artemis#8858, avoid suggesting the removal of trivially inferred type annotations.

Applied to files:

  • supporting_scripts/course-scripts/hyperion-benchmark-workflow/README.md
📚 Learning: 2024-10-08T15:35:42.972Z
Learnt from: magaupp
Repo: ls1intum/Artemis PR: 8802
File: src/main/resources/templates/rust/exercise/src/context.rs:1-1
Timestamp: 2024-10-08T15:35:42.972Z
Learning: Code inside the `exercise` directories in the Artemis platform is provided to students and is intended for them to implement. TODO comments in these directories are meant to guide students and should not be addressed in the PR.

Applied to files:

  • supporting_scripts/course-scripts/hyperion-benchmark-workflow/README.md
📚 Learning: 2024-10-31T20:40:39.930Z
Learnt from: magaupp
Repo: ls1intum/Artemis PR: 9626
File: src/main/resources/templates/c_sharp/exercise/BubbleSort.cs:9-12
Timestamp: 2024-10-31T20:40:39.930Z
Learning: In the Artemis project, files under the `exercise` directory are incomplete exercises intended to be completed by the student. TODO comments in these files are intentional and should not be implemented.

Applied to files:

  • supporting_scripts/course-scripts/hyperion-benchmark-workflow/README.md
📚 Learning: 2024-10-12T17:52:44.113Z
Learnt from: magaupp
Repo: ls1intum/Artemis PR: 9440
File: src/main/resources/templates/typescript/test/package.json:9-11
Timestamp: 2024-10-12T17:52:44.113Z
Learning: In the Artemis TypeScript programming exercise templates, the "assignment" workspace directory specified in `src/main/resources/templates/typescript/test/package.json` is copied in by the CI beforehand.

Applied to files:

  • supporting_scripts/course-scripts/hyperion-benchmark-workflow/README.md
📚 Learning: 2024-07-05T20:17:25.449Z
Learnt from: magaupp
Repo: ls1intum/Artemis PR: 8859
File: src/main/resources/templates/gitlabci/javascript/regularRuns/.gitlab-ci.yml:20-21
Timestamp: 2024-07-05T20:17:25.449Z
Learning: In the Artemis project, `npm audit` is run manually by instructors as part of `npm install` to prioritize speed in the CI process.

Applied to files:

  • supporting_scripts/course-scripts/hyperion-benchmark-workflow/README.md
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: Codacy Static Code Analysis
  • GitHub Check: Analyse
🔇 Additional comments (1)
supporting_scripts/course-scripts/hyperion-benchmark-workflow/README.md (1)

1-75: Previous typos confirmed as fixed; documentation is clear and well-structured.

The README has been corrected to fix the two typos flagged in prior reviews (lines 10 and 26). The setup and usage instructions are logically organized and include helpful details about virtual environment isolation, platform-specific activation commands, and the end-to-end workflow steps.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 12

🧹 Nitpick comments (14)
supporting_scripts/course-scripts/hyperion-benchmark-workflow/.gitignore (1)

1-5: Consider ignoring the generated results directory.

The PR description indicates that the workflow outputs reports to results/artemis-benchmark/report.md. This is a generated artifact and should likely be added to .gitignore to prevent committing benchmark reports and intermediate outputs.

Apply this diff to add the results directory:

 __pycache__/
 .env
 venv
 .idea/
 pecv-bench/
+results/

Additionally, consider normalizing venv to venv/ for clarity that it refers to a directory:

-venv
+venv/
supporting_scripts/course-scripts/hyperion-benchmark-workflow/requirements.txt (1)

1-1: Consider pinning the dependency version for reproducibility.

Unpinned dependencies can lead to different behavior across environments. Consider specifying a version (e.g., requests>=2.28.0,<3.0.0 or requests==2.32.3).

-requests
+requests>=2.28.0,<3.0.0
supporting_scripts/course-scripts/hyperion-benchmark-workflow/create_pecv_bench_course.py (2)

94-94: Remove extraneous f prefix from string without placeholders.

-            logging.info(f"Waiting 2 seconds for server cleanup before recreation")
+            logging.info("Waiting 2 seconds for server cleanup before recreation")

137-137: Remove extraneous f prefix from string without placeholders.

-            logging.info(f"Sending DELETE request, it can take around 30 seconds to delete a course")
+            logging.info("Sending DELETE request, it can take around 30 seconds to delete a course")
supporting_scripts/course-scripts/hyperion-benchmark-workflow/manage_programming_exercise.py (3)

11-11: Remove unused Tuple from imports.

-from typing import Dict, Any, List, Tuple
+from typing import Dict, Any, List

192-192: Remove extraneous f prefix from string without placeholders.

-    logging.info(f"Multipart form-data body and content type prepared.")
+    logging.info("Multipart form-data body and content type prepared.")

241-242: Avoid splitting the same string twice.

Minor optimization to reduce redundant string operations.

-    exercise = exercise_variant_local_id.split(":")[0]
-    variant = exercise_variant_local_id.split(":")[1]
+    exercise, variant = exercise_variant_local_id.split(":")
supporting_scripts/course-scripts/hyperion-benchmark-workflow/run_pecv_bench_in_artemis.py (7)

1-14: Remove unused imports.

Static analysis correctly identifies several unused imports that should be removed:

  • json (line 3)
  • config from logging (line 8) — also shadowed by the configparser variable on line 17
  • check_exercise_consistency (line 13)
  • Path from pathlib (line 14)
 from concurrent.futures import ThreadPoolExecutor, as_completed
 import configparser
-import json
 import subprocess
 import os
 import sys
 import requests
-from logging import config
 from typing import Dict, List, Tuple
 from logging_config import logging
 from utils import login_as_admin, SERVER_URL
 from create_pecv_bench_course import create_pecv_bench_course
-from manage_programming_exercise import check_exercise_consistency, convert_variant_to_zip, import_programming_exercise, process_variant_consistency_check
-from pathlib import Path
+from manage_programming_exercise import convert_variant_to_zip, import_programming_exercise, process_variant_consistency_check

30-31: Use parameter pecv_bench_dir instead of global PECV_BENCH_PATH in log message.

The log message references the global PECV_BENCH_PATH instead of the function parameter pecv_bench_dir, which could be misleading if different values are passed.

     if os.path.exists(pecv_bench_dir):
-        logging.info(f"Directory {PECV_BENCH_PATH} already exists. Pulling latest changes.")
+        logging.info(f"Directory {pecv_bench_dir} already exists. Pulling latest changes.")

100-102: Use bare raise to preserve the original traceback.

When re-raising an exception, use raise without specifying the exception name to preserve the full traceback.

     except Exception as e:
         logging.exception(f"Failed creating exercise from git patch file: {e}")
-        raise e
+        raise

131-132: Remove unused variable assignment.

The path variable is assigned but never used.

-                path = manager.materialize_variant(variant.variant_id, force=True)
+                manager.materialize_variant(variant.variant_id, force=True)

242-251: Consider refactoring the import verification pattern.

The imports of VariantManager and ExerciseIdentifier at lines 243-244 are unused in main() (flagged by static analysis). They appear to be a "fail-fast" check before proceeding. A clearer pattern would be to either:

  1. Add a comment explaining the intent, or
  2. Move the import check into a dedicated function
+    # Verify pecv-bench imports are available before proceeding
     try:
-        from cli.commands.variants import VariantManager
-        from cli.utils import ExerciseIdentifier
-        
+        from cli.commands.variants import VariantManager  # noqa: F401
+        from cli.utils import ExerciseIdentifier  # noqa: F401
+
         for EXERCISE in EXERCISES:
             create_all_variants(COURSE, EXERCISE)

300-300: Use logging instead of print() for consistency.

All other output in this file uses the logging module. This print() statement breaks consistency and may not appear in log files.

-    print(f"\n{programming_exercises}\n")
+    logging.debug(f"Programming exercises mapping: {programming_exercises}")

303-305: Track this TODO for dynamic model name configuration.

The hardcoded model_name with NOTE comments indicates planned work to parse from application-local.yml. This is acceptable for an initial implementation but should be tracked.

Would you like me to open an issue to track implementing the YAML parser for extracting the model name from the Spring configuration?

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 191b4dd and 7bae340.

⛔ Files ignored due to path filters (1)
  • supporting_scripts/course-scripts/hyperion-benchmark-workflow/config.ini is excluded by !**/*.ini
📒 Files selected for processing (8)
  • supporting_scripts/course-scripts/hyperion-benchmark-workflow/.gitignore (1 hunks)
  • supporting_scripts/course-scripts/hyperion-benchmark-workflow/README.md (1 hunks)
  • supporting_scripts/course-scripts/hyperion-benchmark-workflow/create_pecv_bench_course.py (1 hunks)
  • supporting_scripts/course-scripts/hyperion-benchmark-workflow/logging_config.py (1 hunks)
  • supporting_scripts/course-scripts/hyperion-benchmark-workflow/manage_programming_exercise.py (1 hunks)
  • supporting_scripts/course-scripts/hyperion-benchmark-workflow/requirements.txt (1 hunks)
  • supporting_scripts/course-scripts/hyperion-benchmark-workflow/run_pecv_bench_in_artemis.py (1 hunks)
  • supporting_scripts/course-scripts/hyperion-benchmark-workflow/utils.py (1 hunks)
🧰 Additional context used
🧠 Learnings (7)
📓 Common learnings
Learnt from: magaupp
Repo: ls1intum/Artemis PR: 8802
File: src/main/resources/templates/rust/exercise/src/context.rs:1-1
Timestamp: 2024-10-08T15:35:42.972Z
Learning: Code inside the `exercise` directories in the Artemis platform is provided to students and is intended for them to implement. TODO comments in these directories are meant to guide students and should not be addressed in the PR.
Learnt from: magaupp
Repo: ls1intum/Artemis PR: 8802
File: src/main/resources/templates/rust/exercise/src/context.rs:1-1
Timestamp: 2024-08-05T00:11:50.650Z
Learning: Code inside the `exercise` directories in the Artemis platform is provided to students and is intended for them to implement. TODO comments in these directories are meant to guide students and should not be addressed in the PR.
📚 Learning: 2024-08-05T00:11:50.650Z
Learnt from: magaupp
Repo: ls1intum/Artemis PR: 8802
File: src/main/resources/templates/rust/exercise/src/context.rs:1-1
Timestamp: 2024-08-05T00:11:50.650Z
Learning: Code inside the `exercise` directories in the Artemis platform is provided to students and is intended for them to implement. TODO comments in these directories are meant to guide students and should not be addressed in the PR.

Applied to files:

  • supporting_scripts/course-scripts/hyperion-benchmark-workflow/README.md
📚 Learning: 2024-10-31T20:40:39.930Z
Learnt from: magaupp
Repo: ls1intum/Artemis PR: 9626
File: src/main/resources/templates/c_sharp/exercise/BubbleSort.cs:9-12
Timestamp: 2024-10-31T20:40:39.930Z
Learning: In the Artemis project, files under the `exercise` directory are incomplete exercises intended to be completed by the student. TODO comments in these files are intentional and should not be implemented.

Applied to files:

  • supporting_scripts/course-scripts/hyperion-benchmark-workflow/README.md
📚 Learning: 2024-10-12T17:52:44.113Z
Learnt from: magaupp
Repo: ls1intum/Artemis PR: 9440
File: src/main/resources/templates/typescript/test/package.json:9-11
Timestamp: 2024-10-12T17:52:44.113Z
Learning: In the Artemis TypeScript programming exercise templates, the "assignment" workspace directory specified in `src/main/resources/templates/typescript/test/package.json` is copied in by the CI beforehand.

Applied to files:

  • supporting_scripts/course-scripts/hyperion-benchmark-workflow/README.md
📚 Learning: 2024-10-08T15:35:42.972Z
Learnt from: magaupp
Repo: ls1intum/Artemis PR: 8859
File: src/main/resources/templates/gitlabci/javascript/regularRuns/.gitlab-ci.yml:20-21
Timestamp: 2024-10-08T15:35:42.972Z
Learning: In the Artemis project, `npm audit` is run manually by instructors as part of `npm install` to prioritize speed in the CI process.

Applied to files:

  • supporting_scripts/course-scripts/hyperion-benchmark-workflow/README.md
📚 Learning: 2024-10-31T20:53:33.463Z
Learnt from: magaupp
Repo: ls1intum/Artemis PR: 9626
File: src/main/resources/templates/c_sharp/exercise/.gitignore:396-402
Timestamp: 2024-10-31T20:53:33.463Z
Learning: In this project, .gitignore files generated by `dotnet new gitignore` should be kept as-is, even if they contain duplicate patterns.

Applied to files:

  • supporting_scripts/course-scripts/hyperion-benchmark-workflow/.gitignore
📚 Learning: 2025-06-10T12:26:42.449Z
Learnt from: Wallenstein61
Repo: ls1intum/Artemis PR: 10989
File: src/main/java/de/tum/cit/aet/artemis/programming/service/ProgrammingExerciseImportFromFileService.java:108-117
Timestamp: 2025-06-10T12:26:42.449Z
Learning: In ProgrammingExerciseImportFromFileService, the current directory traversal logic for sharing imports (walking importExerciseDir before extraction) is working correctly in practice and should not be changed to more complex solutions, even if there are theoretical issues with the approach.

Applied to files:

  • supporting_scripts/course-scripts/hyperion-benchmark-workflow/manage_programming_exercise.py
🪛 GitHub Check: Codacy Static Code Analysis
supporting_scripts/course-scripts/hyperion-benchmark-workflow/requirements.txt

[notice] 1-1: supporting_scripts/course-scripts/hyperion-benchmark-workflow/requirements.txt#L1
Statement seems to have no effect

supporting_scripts/course-scripts/hyperion-benchmark-workflow/manage_programming_exercise.py

[warning] 3-3: supporting_scripts/course-scripts/hyperion-benchmark-workflow/manage_programming_exercise.py#L3
Unused import sys


[warning] 9-9: supporting_scripts/course-scripts/hyperion-benchmark-workflow/manage_programming_exercise.py#L9
Unused start imported from tracemalloc


[warning] 11-11: supporting_scripts/course-scripts/hyperion-benchmark-workflow/manage_programming_exercise.py#L11
Unused Tuple imported from typing


[notice] 31-31: supporting_scripts/course-scripts/hyperion-benchmark-workflow/manage_programming_exercise.py#L31
Trailing whitespace


[notice] 157-157: supporting_scripts/course-scripts/hyperion-benchmark-workflow/manage_programming_exercise.py#L157
Trailing whitespace

supporting_scripts/course-scripts/hyperion-benchmark-workflow/create_pecv_bench_course.py

[warning] 1-1: supporting_scripts/course-scripts/hyperion-benchmark-workflow/create_pecv_bench_course.py#L1
Unused import sys


[notice] 83-83: supporting_scripts/course-scripts/hyperion-benchmark-workflow/create_pecv_bench_course.py#L83
Trailing whitespace


[notice] 106-106: supporting_scripts/course-scripts/hyperion-benchmark-workflow/create_pecv_bench_course.py#L106
Trailing whitespace

supporting_scripts/course-scripts/hyperion-benchmark-workflow/utils.py

[warning] 4-4: supporting_scripts/course-scripts/hyperion-benchmark-workflow/utils.py#L4
Unused List imported from typing

supporting_scripts/course-scripts/hyperion-benchmark-workflow/run_pecv_bench_in_artemis.py

[warning] 3-3: supporting_scripts/course-scripts/hyperion-benchmark-workflow/run_pecv_bench_in_artemis.py#L3
Unused import json


[warning] 13-13: supporting_scripts/course-scripts/hyperion-benchmark-workflow/run_pecv_bench_in_artemis.py#L13
Unused check_exercise_consistency imported from manage_programming_exercise


[warning] 14-14: supporting_scripts/course-scripts/hyperion-benchmark-workflow/run_pecv_bench_in_artemis.py#L14
Unused Path imported from pathlib


[notice] 36-36: supporting_scripts/course-scripts/hyperion-benchmark-workflow/run_pecv_bench_in_artemis.py#L36
Trailing whitespace


[notice] 60-60: supporting_scripts/course-scripts/hyperion-benchmark-workflow/run_pecv_bench_in_artemis.py#L60
Trailing whitespace


[notice] 131-131: supporting_scripts/course-scripts/hyperion-benchmark-workflow/run_pecv_bench_in_artemis.py#L131
Unused variable 'path'


[notice] 141-141: supporting_scripts/course-scripts/hyperion-benchmark-workflow/run_pecv_bench_in_artemis.py#L141
Trailing whitespace


[notice] 160-160: supporting_scripts/course-scripts/hyperion-benchmark-workflow/run_pecv_bench_in_artemis.py#L160
Trailing whitespace


[notice] 161-161: supporting_scripts/course-scripts/hyperion-benchmark-workflow/run_pecv_bench_in_artemis.py#L161
Trailing whitespace


[warning] 243-243: supporting_scripts/course-scripts/hyperion-benchmark-workflow/run_pecv_bench_in_artemis.py#L243
Unused VariantManager imported from cli.commands.variants


[warning] 244-244: supporting_scripts/course-scripts/hyperion-benchmark-workflow/run_pecv_bench_in_artemis.py#L244
Unused ExerciseIdentifier imported from cli.utils


[notice] 370-370: supporting_scripts/course-scripts/hyperion-benchmark-workflow/run_pecv_bench_in_artemis.py#L370
Trailing whitespace

🪛 LanguageTool
supporting_scripts/course-scripts/hyperion-benchmark-workflow/README.md

[grammar] ~25-~25: Ensure spelling is correct
Context: ...ate a virtual environment in hyperion-benchmarl-workflow folder: ```shell pyt...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)

🪛 Ruff (0.14.6)
supporting_scripts/course-scripts/hyperion-benchmark-workflow/manage_programming_exercise.py

78-78: Do not catch blind exception: Exception

(BLE001)


192-192: f-string without any placeholders

Remove extraneous f prefix

(F541)


253-253: Consider moving this statement to an else block

(TRY300)


254-254: Do not catch blind exception: Exception

(BLE001)

supporting_scripts/course-scripts/hyperion-benchmark-workflow/create_pecv_bench_course.py

94-94: f-string without any placeholders

Remove extraneous f prefix

(F541)


100-100: Create your own exception

(TRY002)


100-100: Avoid specifying long messages outside the exception class

(TRY003)


107-110: Create your own exception

(TRY002)


107-110: Avoid specifying long messages outside the exception class

(TRY003)


137-137: f-string without any placeholders

Remove extraneous f prefix

(F541)


144-144: Do not catch blind exception: Exception

(BLE001)

supporting_scripts/course-scripts/hyperion-benchmark-workflow/utils.py

18-18: Do not perform function call requests.Session in argument defaults; instead, perform the call within the function, or read the default from a module-level singleton variable

(B008)


36-37: Create your own exception

(TRY002)


36-37: Avoid specifying long messages outside the exception class

(TRY003)

supporting_scripts/course-scripts/hyperion-benchmark-workflow/run_pecv_bench_in_artemis.py

17-17: Redefinition of unused config from line 8

(F811)


34-34: Starting a process with a partial executable path

(S607)


38-38: Starting a process with a partial executable path

(S607)


42-42: Starting a process with a partial executable path

(S607)


55-55: subprocess call: check for execution of untrusted input

(S603)


56-56: Starting a process with a partial executable path

(S607)


70-70: subprocess call: check for execution of untrusted input

(S603)


102-102: Use raise without specifying exception name

Remove exception name

(TRY201)


131-131: Local variable path is assigned to but never used

Remove assignment to unused variable path

(F841)


133-133: Do not catch blind exception: Exception

(BLE001)


138-138: Do not catch blind exception: Exception

(BLE001)


171-171: Do not catch blind exception: Exception

(BLE001)


225-225: Do not catch blind exception: Exception

(BLE001)


296-296: Do not catch blind exception: Exception

(BLE001)


334-334: Do not catch blind exception: Exception

(BLE001)


352-352: subprocess call: check for execution of untrusted input

(S603)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Codacy Static Code Analysis
🔇 Additional comments (1)
supporting_scripts/course-scripts/hyperion-benchmark-workflow/logging_config.py (1)

1-4: LGTM!

Simple and effective centralized logging configuration for the workflow scripts.

coderabbitai[bot]
coderabbitai bot previously approved these changes Dec 1, 2025
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 3

♻️ Duplicate comments (1)
supporting_scripts/course-scripts/hyperion-benchmark-workflow/manage_programming_exercise.py (1)

81-93: problem_statement_content may still be undefined when checked on line 92.

The variable problem_statement_content is only assigned when the file exists (line 83), but line 92 checks if problem_statement_content is not None without first initializing it. If the file doesn't exist, this will raise NameError (not just skip the assignment).

Apply this diff to initialize the variable before the conditional:

     # Overwrite problem statement, exercise ID, course ID, title and shortName in the config file
     problem_statement_file_path = os.path.join(variant_path, "problem-statement.md")
+    problem_statement_content = None
     if os.path.exists(problem_statement_file_path):
         problem_statement_content = read_problem_statement(problem_statement_file_path)
🧹 Nitpick comments (9)
supporting_scripts/course-scripts/hyperion-benchmark-workflow/manage_programming_exercise.py (2)

189-190: Remove unnecessary f-string prefix.

This f-string has no placeholders.

     body, content_type = urllib3.filepost.encode_multipart_formdata(files_payload)
-    logging.info(f"Multipart form-data body and content type prepared.")
+    logging.info("Multipart form-data body and content type prepared.")

239-240: Potential IndexError if exercise_variant_local_id doesn't contain ":".

If the format of exercise_variant_local_id is unexpected (missing :), split(":")[1] will raise an IndexError.

Consider adding validation or using safer unpacking:

-    exercise = exercise_variant_local_id.split(":")[0]
-    variant = exercise_variant_local_id.split(":")[1]
+    parts = exercise_variant_local_id.split(":")
+    if len(parts) != 2:
+        logging.error(f"Invalid exercise_variant_local_id format: {exercise_variant_local_id}")
+        return f"[{exercise_variant_local_id}] error - invalid format"
+    exercise, variant = parts
supporting_scripts/course-scripts/hyperion-benchmark-workflow/utils.py (1)

9-12: Consider adding fallback values for configuration constants.

If any of these keys are missing from config.ini, a NoOptionError will be raised at module import time. Other scripts in this PR use fallback= parameters for safer config loading.

-CLIENT_URL: str = config.get('Settings', 'client_url')
-SERVER_URL: str = config.get('Settings', 'server_url')
-ADMIN_USER: str = config.get('Settings', 'admin_user')
-ADMIN_PASSWORD: str = config.get('Settings', 'admin_password')
+CLIENT_URL: str = config.get('Settings', 'client_url', fallback="")
+SERVER_URL: str = config.get('Settings', 'server_url', fallback="")
+ADMIN_USER: str = config.get('Settings', 'admin_user', fallback="")
+ADMIN_PASSWORD: str = config.get('Settings', 'admin_password', fallback="")

Alternatively, if these are truly required, consider raising a clearer error message when they're missing.

supporting_scripts/course-scripts/hyperion-benchmark-workflow/create_pecv_bench_course.py (3)

93-94: Remove unnecessary f-string prefix.

This f-string has no placeholders.

-            logging.info(f"Waiting 2 seconds for server cleanup before recreation")
+            logging.info("Waiting 2 seconds for server cleanup before recreation")

121-122: Add error handling for the course list request.

If the GET request fails or returns non-200, courseResponse.json() may raise an exception or return unexpected data.

     courseResponse: requests.Response = session.get(f"{SERVER_URL}/core/courses")
+    if courseResponse.status_code != 200:
+        logging.error(f"Failed to fetch courses. Status code: {courseResponse.status_code}")
+        return False
     courses = courseResponse.json()

139-139: Remove unnecessary f-string prefix.

This f-string has no placeholders.

-            logging.info(f"Sending DELETE request, it can take around 30 seconds to delete a course")
+            logging.info("Sending DELETE request, it can take around 30 seconds to delete a course")
supporting_scripts/course-scripts/hyperion-benchmark-workflow/run_pecv_bench_in_artemis.py (3)

100-102: Use bare raise to preserve the original traceback.

When re-raising the same exception, use raise without the exception variable to preserve the full traceback.

     except Exception as e:
         logging.exception(f"Failed creating exercise from git patch file: {e}")
-        raise e
+        raise

131-131: Remove unused variable assignment.

The path variable is assigned but never used.

-                path = manager.materialize_variant(variant.variant_id, force=True)
+                manager.materialize_variant(variant.variant_id, force=True)

304-306: Consider extracting model configuration from application config.

The TODO/NOTE comments indicate future work to extract model configuration from application-local.yml. This is a good reminder for follow-up work.

Would you like me to open an issue to track implementing the YAML parser for extracting the model configuration from application-local.yml?

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 7bae340 and 8f03485.

📒 Files selected for processing (5)
  • supporting_scripts/course-scripts/hyperion-benchmark-workflow/README.md (1 hunks)
  • supporting_scripts/course-scripts/hyperion-benchmark-workflow/create_pecv_bench_course.py (1 hunks)
  • supporting_scripts/course-scripts/hyperion-benchmark-workflow/manage_programming_exercise.py (1 hunks)
  • supporting_scripts/course-scripts/hyperion-benchmark-workflow/run_pecv_bench_in_artemis.py (1 hunks)
  • supporting_scripts/course-scripts/hyperion-benchmark-workflow/utils.py (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • supporting_scripts/course-scripts/hyperion-benchmark-workflow/README.md
🧰 Additional context used
🧠 Learnings (21)
📓 Common learnings
Learnt from: magaupp
Repo: ls1intum/Artemis PR: 8802
File: src/main/resources/templates/rust/exercise/src/context.rs:1-1
Timestamp: 2024-10-08T15:35:42.972Z
Learning: Code inside the `exercise` directories in the Artemis platform is provided to students and is intended for them to implement. TODO comments in these directories are meant to guide students and should not be addressed in the PR.
Learnt from: magaupp
Repo: ls1intum/Artemis PR: 8802
File: src/main/resources/templates/rust/exercise/src/context.rs:1-1
Timestamp: 2024-08-05T00:11:50.650Z
Learning: Code inside the `exercise` directories in the Artemis platform is provided to students and is intended for them to implement. TODO comments in these directories are meant to guide students and should not be addressed in the PR.
📚 Learning: 2024-11-26T20:26:32.835Z
Learnt from: magaupp
Repo: ls1intum/Artemis PR: 9751
File: src/main/resources/templates/go/solution/bubblesort.go:11-19
Timestamp: 2024-11-26T20:26:32.835Z
Learning: In this project, prefer simple and understandable solutions that demonstrate basic principles over optimized implementations.

Applied to files:

  • supporting_scripts/course-scripts/hyperion-benchmark-workflow/run_pecv_bench_in_artemis.py
📚 Learning: 2025-08-11T12:57:51.535Z
Learnt from: ekayandan
Repo: ls1intum/Artemis PR: 11027
File: src/main/java/de/tum/cit/aet/artemis/programming/service/GitService.java:1455-1465
Timestamp: 2025-08-11T12:57:51.535Z
Learning: In the Artemis project, when ekayandan responds with "same as above" to a code review suggestion, it means they want to defer the suggested change to a follow-up PR to keep the current PR scope minimal and focused on the core functionality being implemented.

Applied to files:

  • supporting_scripts/course-scripts/hyperion-benchmark-workflow/run_pecv_bench_in_artemis.py
  • supporting_scripts/course-scripts/hyperion-benchmark-workflow/utils.py
📚 Learning: 2024-07-05T20:02:19.606Z
Learnt from: magaupp
Repo: ls1intum/Artemis PR: 8802
File: src/main/resources/templates/gitlabci/rust/regularRuns/.gitlab-ci.yml:22-25
Timestamp: 2024-07-05T20:02:19.606Z
Learning: In the Artemis project, comments should focus on providing reasoning for non-obvious situations rather than describing self-explanatory code.

Applied to files:

  • supporting_scripts/course-scripts/hyperion-benchmark-workflow/run_pecv_bench_in_artemis.py
📚 Learning: 2025-06-06T14:45:29.888Z
Learnt from: Wallenstein61
Repo: ls1intum/Artemis PR: 10989
File: src/main/webapp/app/programming/manage/update/programming-exercise-update.component.ts:947-971
Timestamp: 2025-06-06T14:45:29.888Z
Learning: When introducing new features in large PRs, developers may intentionally choose not to refactor existing code to minimize impact on the source codebase, prioritize stability, and keep changes focused and reviewable. This is a valid engineering decision that should be respected.

Applied to files:

  • supporting_scripts/course-scripts/hyperion-benchmark-workflow/run_pecv_bench_in_artemis.py
  • supporting_scripts/course-scripts/hyperion-benchmark-workflow/utils.py
📚 Learning: 2024-07-02T17:40:10.186Z
Learnt from: bensofficial
Repo: ls1intum/Artemis PR: 8951
File: src/main/java/de/tum/in/www1/artemis/service/connectors/localci/buildagent/BuildAgentSSHKeyService.java:1-1
Timestamp: 2024-07-02T17:40:10.186Z
Learning: Ensure to verify the presence of wildcard imports before commenting on their usage in the code review.

Applied to files:

  • supporting_scripts/course-scripts/hyperion-benchmark-workflow/utils.py
  • supporting_scripts/course-scripts/hyperion-benchmark-workflow/manage_programming_exercise.py
  • supporting_scripts/course-scripts/hyperion-benchmark-workflow/create_pecv_bench_course.py
📚 Learning: 2024-07-09T19:08:50.316Z
Learnt from: florian-glombik
Repo: ls1intum/Artemis PR: 8858
File: src/main/webapp/app/shared/sidebar/sidebar.component.ts:59-59
Timestamp: 2024-07-09T19:08:50.316Z
Learning: For the PR ls1intum/Artemis#8858, avoid suggesting the removal of trivially inferred type annotations.

Applied to files:

  • supporting_scripts/course-scripts/hyperion-benchmark-workflow/utils.py
📚 Learning: 2024-10-08T15:35:42.972Z
Learnt from: julian-christl
Repo: ls1intum/Artemis PR: 7829
File: src/main/java/de/tum/in/www1/artemis/web/rest/ComplaintResponseResource.java:0-0
Timestamp: 2024-10-08T15:35:42.972Z
Learning: The user has fixed the issue regarding the redundant wildcard import in `ComplaintResponseResource.java` by removing it in commit 7e392e0.

Applied to files:

  • supporting_scripts/course-scripts/hyperion-benchmark-workflow/utils.py
  • supporting_scripts/course-scripts/hyperion-benchmark-workflow/manage_programming_exercise.py
  • supporting_scripts/course-scripts/hyperion-benchmark-workflow/create_pecv_bench_course.py
📚 Learning: 2024-10-08T15:35:42.972Z
Learnt from: magaupp
Repo: ls1intum/Artemis PR: 8802
File: src/main/resources/templates/rust/exercise/src/context.rs:1-1
Timestamp: 2024-10-08T15:35:42.972Z
Learning: Code inside the `exercise` directories in the Artemis platform is provided to students and is intended for them to implement. TODO comments in these directories are meant to guide students and should not be addressed in the PR.

Applied to files:

  • supporting_scripts/course-scripts/hyperion-benchmark-workflow/utils.py
  • supporting_scripts/course-scripts/hyperion-benchmark-workflow/manage_programming_exercise.py
📚 Learning: 2024-10-04T23:23:49.139Z
Learnt from: magaupp
Repo: ls1intum/Artemis PR: 9261
File: src/main/resources/templates/c_plus_plus/test/testUtils/TestFailedError.py:6-6
Timestamp: 2024-10-04T23:23:49.139Z
Learning: In the Artemis project, when adding new programming language templates like C++, files such as `src/main/resources/templates/c_plus_plus/test/testUtils/TestFailedError.py` may be copied from existing templates without modifications. In such cases, suggesting modifications to these files (e.g., removing unnecessary `pass` statements) may not be necessary.

Applied to files:

  • supporting_scripts/course-scripts/hyperion-benchmark-workflow/utils.py
  • supporting_scripts/course-scripts/hyperion-benchmark-workflow/manage_programming_exercise.py
📚 Learning: 2024-10-20T18:35:39.224Z
Learnt from: SamuelRoettgermann
Repo: ls1intum/Artemis PR: 9303
File: src/main/java/de/tum/in/www1/artemis/service/exam/StudentExamService.java:266-267
Timestamp: 2024-10-20T18:35:39.224Z
Learning: When reviewing code in this project, avoid suggesting code changes that are outside the scope of the PR.

Applied to files:

  • supporting_scripts/course-scripts/hyperion-benchmark-workflow/utils.py
📚 Learning: 2024-10-31T20:40:30.235Z
Learnt from: magaupp
Repo: ls1intum/Artemis PR: 9626
File: src/main/resources/templates/c_sharp/exercise/BubbleSort.cs:3-4
Timestamp: 2024-10-31T20:40:30.235Z
Learning: In this project, files under the `exercise` directory are incomplete exercises to be completed by students. Therefore, review comments suggesting implementations in these files may not be necessary.

Applied to files:

  • supporting_scripts/course-scripts/hyperion-benchmark-workflow/utils.py
  • supporting_scripts/course-scripts/hyperion-benchmark-workflow/manage_programming_exercise.py
📚 Learning: 2024-10-08T15:35:48.767Z
Learnt from: magaupp
Repo: ls1intum/Artemis PR: 9261
File: src/main/resources/templates/c_plus_plus/test/testUtils/Utils.py:15-35
Timestamp: 2024-10-08T15:35:48.767Z
Learning: In the Artemis project, when adding new programming language templates (e.g., C++), if files like `src/main/resources/templates/c_plus_plus/test/testUtils/Utils.py` are copied from the original C template without significant changes, code style improvements such as adding type annotations are not required in the initial PR introducing them.

Applied to files:

  • supporting_scripts/course-scripts/hyperion-benchmark-workflow/utils.py
  • supporting_scripts/course-scripts/hyperion-benchmark-workflow/manage_programming_exercise.py
📚 Learning: 2025-06-10T12:26:42.449Z
Learnt from: Wallenstein61
Repo: ls1intum/Artemis PR: 10989
File: src/main/java/de/tum/cit/aet/artemis/programming/service/ProgrammingExerciseImportFromFileService.java:108-117
Timestamp: 2025-06-10T12:26:42.449Z
Learning: In ProgrammingExerciseImportFromFileService, the current directory traversal logic for sharing imports (walking importExerciseDir before extraction) is working correctly in practice and should not be changed to more complex solutions, even if there are theoretical issues with the approach.

Applied to files:

  • supporting_scripts/course-scripts/hyperion-benchmark-workflow/manage_programming_exercise.py
📚 Learning: 2024-10-15T08:00:53.531Z
Learnt from: Hialus
Repo: ls1intum/Artemis PR: 8607
File: src/main/java/de/tum/in/www1/artemis/web/rest/programming/ProgrammingExerciseResource.java:64-64
Timestamp: 2024-10-15T08:00:53.531Z
Learning: For the Artemis project, import statements are automatically managed by formatters and should not be commented on.

Applied to files:

  • supporting_scripts/course-scripts/hyperion-benchmark-workflow/manage_programming_exercise.py
  • supporting_scripts/course-scripts/hyperion-benchmark-workflow/create_pecv_bench_course.py
📚 Learning: 2024-10-12T17:52:44.113Z
Learnt from: magaupp
Repo: ls1intum/Artemis PR: 9440
File: src/main/resources/templates/typescript/test/package.json:9-11
Timestamp: 2024-10-12T17:52:44.113Z
Learning: In the Artemis TypeScript programming exercise templates, the "assignment" workspace directory specified in `src/main/resources/templates/typescript/test/package.json` is copied in by the CI beforehand.

Applied to files:

  • supporting_scripts/course-scripts/hyperion-benchmark-workflow/manage_programming_exercise.py
📚 Learning: 2024-10-31T20:40:39.930Z
Learnt from: magaupp
Repo: ls1intum/Artemis PR: 9626
File: src/main/resources/templates/c_sharp/exercise/BubbleSort.cs:9-12
Timestamp: 2024-10-31T20:40:39.930Z
Learning: In the Artemis project, files under the `exercise` directory are incomplete exercises intended to be completed by the student. TODO comments in these files are intentional and should not be implemented.

Applied to files:

  • supporting_scripts/course-scripts/hyperion-benchmark-workflow/manage_programming_exercise.py
📚 Learning: 2024-10-20T18:37:45.365Z
Learnt from: SamuelRoettgermann
Repo: ls1intum/Artemis PR: 9303
File: src/main/java/de/tum/in/www1/artemis/service/exam/StudentExamService.java:296-300
Timestamp: 2024-10-20T18:37:45.365Z
Learning: When reviewing code changes in `StudentExamService.saveSubmission`, if the PR aims to improve readability without changing logic, avoid suggesting changes that alter logic, such as adding exceptions in the default case of switch statements.

Applied to files:

  • supporting_scripts/course-scripts/hyperion-benchmark-workflow/manage_programming_exercise.py
📚 Learning: 2024-10-12T16:13:02.782Z
Learnt from: magaupp
Repo: ls1intum/Artemis PR: 9440
File: src/main/resources/templates/typescript/exercise/src/mergesort.ts:2-2
Timestamp: 2024-10-12T16:13:02.782Z
Learning: In files under the `exercise` directory, TODO comments are intentionally included for students to complete and should remain as is.

Applied to files:

  • supporting_scripts/course-scripts/hyperion-benchmark-workflow/manage_programming_exercise.py
📚 Learning: 2025-01-25T17:22:31.410Z
Learnt from: magaupp
Repo: ls1intum/Artemis PR: 10202
File: src/main/resources/templates/ruby/test/test/test_structural.rb:5-18
Timestamp: 2025-01-25T17:22:31.410Z
Learning: When reviewing exercise templates, avoid adding tests that would pass immediately with the starter code. Tests should verify the actual implementation that students need to complete, not just the presence of classes and methods defined in the template.

Applied to files:

  • supporting_scripts/course-scripts/hyperion-benchmark-workflow/manage_programming_exercise.py
📚 Learning: 2024-10-31T20:41:04.600Z
Learnt from: magaupp
Repo: ls1intum/Artemis PR: 9626
File: src/main/resources/templates/c_sharp/exercise/MergeSort.cs:9-12
Timestamp: 2024-10-31T20:41:04.600Z
Learning: In the C# programming language template, files under the `exercise` directory (e.g., `MergeSort.cs`) are intentionally left incomplete as exercises for students to complete, and should not be flagged for missing implementations during code reviews.

Applied to files:

  • supporting_scripts/course-scripts/hyperion-benchmark-workflow/manage_programming_exercise.py
🧬 Code graph analysis (1)
supporting_scripts/course-scripts/hyperion-benchmark-workflow/run_pecv_bench_in_artemis.py (3)
supporting_scripts/course-scripts/hyperion-benchmark-workflow/utils.py (1)
  • login_as_admin (14-16)
supporting_scripts/course-scripts/hyperion-benchmark-workflow/create_pecv_bench_course.py (1)
  • create_pecv_bench_course (30-109)
supporting_scripts/course-scripts/hyperion-benchmark-workflow/manage_programming_exercise.py (4)
  • check_exercise_consistency (208-224)
  • convert_variant_to_zip (32-140)
  • import_programming_exercise (142-205)
  • process_variant_consistency_check (227-254)
🪛 Ruff (0.14.6)
supporting_scripts/course-scripts/hyperion-benchmark-workflow/run_pecv_bench_in_artemis.py

17-17: Redefinition of unused config from line 8

(F811)


34-34: Starting a process with a partial executable path

(S607)


38-38: Starting a process with a partial executable path

(S607)


42-42: Starting a process with a partial executable path

(S607)


55-55: subprocess call: check for execution of untrusted input

(S603)


56-56: Starting a process with a partial executable path

(S607)


70-70: subprocess call: check for execution of untrusted input

(S603)


102-102: Use raise without specifying exception name

Remove exception name

(TRY201)


131-131: Local variable path is assigned to but never used

Remove assignment to unused variable path

(F841)


133-133: Do not catch blind exception: Exception

(BLE001)


138-138: Do not catch blind exception: Exception

(BLE001)


172-172: Do not catch blind exception: Exception

(BLE001)


226-226: Do not catch blind exception: Exception

(BLE001)


297-297: Do not catch blind exception: Exception

(BLE001)


335-335: Do not catch blind exception: Exception

(BLE001)


353-353: subprocess call: check for execution of untrusted input

(S603)

supporting_scripts/course-scripts/hyperion-benchmark-workflow/utils.py

18-18: Do not perform function call requests.Session in argument defaults; instead, perform the call within the function, or read the default from a module-level singleton variable

(B008)


36-37: Create your own exception

(TRY002)


36-37: Avoid specifying long messages outside the exception class

(TRY003)

supporting_scripts/course-scripts/hyperion-benchmark-workflow/manage_programming_exercise.py

76-76: Do not catch blind exception: Exception

(BLE001)


190-190: f-string without any placeholders

Remove extraneous f prefix

(F541)


251-251: Consider moving this statement to an else block

(TRY300)


252-252: Do not catch blind exception: Exception

(BLE001)

supporting_scripts/course-scripts/hyperion-benchmark-workflow/create_pecv_bench_course.py

93-93: f-string without any placeholders

Remove extraneous f prefix

(F541)


99-99: Create your own exception

(TRY002)


99-99: Avoid specifying long messages outside the exception class

(TRY003)


106-109: Create your own exception

(TRY002)


106-109: Avoid specifying long messages outside the exception class

(TRY003)


139-139: f-string without any placeholders

Remove extraneous f prefix

(F541)


146-146: Do not catch blind exception: Exception

(BLE001)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: Codacy Static Code Analysis
  • GitHub Check: Analyse
🔇 Additional comments (4)
supporting_scripts/course-scripts/hyperion-benchmark-workflow/utils.py (1)

14-39: LGTM!

The authentication logic is straightforward and includes appropriate logging for success and failure cases.

supporting_scripts/course-scripts/hyperion-benchmark-workflow/create_pecv_bench_course.py (1)

30-109: Course creation and retry logic looks solid.

The implementation handles the 400 status (existing course) gracefully by attempting deletion and retry. The flow is clear and well-logged.

supporting_scripts/course-scripts/hyperion-benchmark-workflow/run_pecv_bench_in_artemis.py (2)

27-64: Git operations include appropriate cleanup before pull.

The git reset --hard HEAD and git clean -fd before pulling ensures a clean state, which is good practice for automation scripts.


265-299: Thread pool implementation for variant imports looks good.

The concurrent import logic properly collects results and handles errors. The dictionary update after as_completed is thread-safe since it happens in the main thread.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

♻️ Duplicate comments (2)
supporting_scripts/course-scripts/hyperion-benchmark-workflow/run_pecv_bench_in_artemis.py (1)

257-262: Add validation for course_id after creation.

While .get("id") prevents a KeyError, if course_id is None (e.g., due to an error response), subsequent operations will fail with unclear errors. This was flagged in a previous review but not fully addressed.

     # Step 5: Create PECV Bench Course
     response_data = create_pecv_bench_course(session)
     course_id = response_data.get("id")
+    if course_id is None:
+        logging.error("Failed to retrieve course ID from response. Exiting.")
+        sys.exit(1)
supporting_scripts/course-scripts/hyperion-benchmark-workflow/manage_programming_exercise.py (1)

80-93: UnboundLocalError if problem-statement.md does not exist.

problem_statement_content is only assigned when the file exists (line 83), but the check at line 92 assumes it's defined. If the file is missing, this will raise NameError: name 'problem_statement_content' is not defined.

     # Overwrite problem statement, exercise ID, course ID, title and shortName in the config file
     problem_statement_file_path = os.path.join(variant_path, "problem-statement.md")
+    problem_statement_content = None
     if os.path.exists(problem_statement_file_path):
         problem_statement_content = read_problem_statement(problem_statement_file_path)
🧹 Nitpick comments (3)
supporting_scripts/course-scripts/hyperion-benchmark-workflow/run_pecv_bench_in_artemis.py (2)

99-101: Use bare raise instead of raise e.

When re-raising a caught exception, prefer bare raise to preserve the original traceback.

     except Exception as e:
         logging.exception(f"Failed creating exercise from git patch file: {e}")
-        raise e
+        raise

128-134: Remove unused variable assignment.

The return value from materialize_variant is assigned to path but never used.

             try:
                 # 'variant.variant_id' gets the ID string like "001"
-                path = manager.materialize_variant(variant.variant_id, force=True)
+                manager.materialize_variant(variant.variant_id, force=True)
                 logging.info(f"Generated {variant.variant_id}")
             except Exception as e:
                 logging.exception(f"Failed to create variant {variant.variant_id}: {e}")
                 continue
supporting_scripts/course-scripts/hyperion-benchmark-workflow/manage_programming_exercise.py (1)

189-190: Remove extraneous f-string prefix.

The f-string has no placeholders.

-    logging.info(f"Multipart form-data body and content type prepared.")
+    logging.info("Multipart form-data body and content type prepared.")
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 8f03485 and e930c7d.

📒 Files selected for processing (2)
  • supporting_scripts/course-scripts/hyperion-benchmark-workflow/manage_programming_exercise.py (1 hunks)
  • supporting_scripts/course-scripts/hyperion-benchmark-workflow/run_pecv_bench_in_artemis.py (1 hunks)
🧰 Additional context used
🧠 Learnings (20)
📓 Common learnings
Learnt from: magaupp
Repo: ls1intum/Artemis PR: 8802
File: src/main/resources/templates/rust/exercise/src/context.rs:1-1
Timestamp: 2024-10-08T15:35:42.972Z
Learning: Code inside the `exercise` directories in the Artemis platform is provided to students and is intended for them to implement. TODO comments in these directories are meant to guide students and should not be addressed in the PR.
Learnt from: magaupp
Repo: ls1intum/Artemis PR: 8802
File: src/main/resources/templates/rust/exercise/src/context.rs:1-1
Timestamp: 2024-08-05T00:11:50.650Z
Learning: Code inside the `exercise` directories in the Artemis platform is provided to students and is intended for them to implement. TODO comments in these directories are meant to guide students and should not be addressed in the PR.
📚 Learning: 2024-11-26T20:26:32.835Z
Learnt from: magaupp
Repo: ls1intum/Artemis PR: 9751
File: src/main/resources/templates/go/solution/bubblesort.go:11-19
Timestamp: 2024-11-26T20:26:32.835Z
Learning: In this project, prefer simple and understandable solutions that demonstrate basic principles over optimized implementations.

Applied to files:

  • supporting_scripts/course-scripts/hyperion-benchmark-workflow/run_pecv_bench_in_artemis.py
📚 Learning: 2025-08-11T12:57:51.535Z
Learnt from: ekayandan
Repo: ls1intum/Artemis PR: 11027
File: src/main/java/de/tum/cit/aet/artemis/programming/service/GitService.java:1455-1465
Timestamp: 2025-08-11T12:57:51.535Z
Learning: In the Artemis project, when ekayandan responds with "same as above" to a code review suggestion, it means they want to defer the suggested change to a follow-up PR to keep the current PR scope minimal and focused on the core functionality being implemented.

Applied to files:

  • supporting_scripts/course-scripts/hyperion-benchmark-workflow/run_pecv_bench_in_artemis.py
📚 Learning: 2024-07-05T20:02:19.606Z
Learnt from: magaupp
Repo: ls1intum/Artemis PR: 8802
File: src/main/resources/templates/gitlabci/rust/regularRuns/.gitlab-ci.yml:22-25
Timestamp: 2024-07-05T20:02:19.606Z
Learning: In the Artemis project, comments should focus on providing reasoning for non-obvious situations rather than describing self-explanatory code.

Applied to files:

  • supporting_scripts/course-scripts/hyperion-benchmark-workflow/run_pecv_bench_in_artemis.py
📚 Learning: 2025-06-06T14:45:29.888Z
Learnt from: Wallenstein61
Repo: ls1intum/Artemis PR: 10989
File: src/main/webapp/app/programming/manage/update/programming-exercise-update.component.ts:947-971
Timestamp: 2025-06-06T14:45:29.888Z
Learning: When introducing new features in large PRs, developers may intentionally choose not to refactor existing code to minimize impact on the source codebase, prioritize stability, and keep changes focused and reviewable. This is a valid engineering decision that should be respected.

Applied to files:

  • supporting_scripts/course-scripts/hyperion-benchmark-workflow/run_pecv_bench_in_artemis.py
📚 Learning: 2024-10-31T20:40:30.235Z
Learnt from: magaupp
Repo: ls1intum/Artemis PR: 9626
File: src/main/resources/templates/c_sharp/exercise/BubbleSort.cs:3-4
Timestamp: 2024-10-31T20:40:30.235Z
Learning: In this project, files under the `exercise` directory are incomplete exercises to be completed by students. Therefore, review comments suggesting implementations in these files may not be necessary.

Applied to files:

  • supporting_scripts/course-scripts/hyperion-benchmark-workflow/manage_programming_exercise.py
📚 Learning: 2024-07-02T17:40:10.186Z
Learnt from: bensofficial
Repo: ls1intum/Artemis PR: 8951
File: src/main/java/de/tum/in/www1/artemis/service/connectors/localci/buildagent/BuildAgentSSHKeyService.java:1-1
Timestamp: 2024-07-02T17:40:10.186Z
Learning: Ensure to verify the presence of wildcard imports before commenting on their usage in the code review.

Applied to files:

  • supporting_scripts/course-scripts/hyperion-benchmark-workflow/manage_programming_exercise.py
📚 Learning: 2024-10-15T08:00:53.531Z
Learnt from: Hialus
Repo: ls1intum/Artemis PR: 8607
File: src/main/java/de/tum/in/www1/artemis/web/rest/programming/ProgrammingExerciseResource.java:64-64
Timestamp: 2024-10-15T08:00:53.531Z
Learning: For the Artemis project, import statements are automatically managed by formatters and should not be commented on.

Applied to files:

  • supporting_scripts/course-scripts/hyperion-benchmark-workflow/manage_programming_exercise.py
📚 Learning: 2024-10-08T15:35:42.972Z
Learnt from: julian-christl
Repo: ls1intum/Artemis PR: 7829
File: src/main/java/de/tum/in/www1/artemis/web/rest/ComplaintResponseResource.java:0-0
Timestamp: 2024-10-08T15:35:42.972Z
Learning: The user has fixed the issue regarding the redundant wildcard import in `ComplaintResponseResource.java` by removing it in commit 7e392e0.

Applied to files:

  • supporting_scripts/course-scripts/hyperion-benchmark-workflow/manage_programming_exercise.py
📚 Learning: 2024-10-12T17:52:44.113Z
Learnt from: magaupp
Repo: ls1intum/Artemis PR: 9440
File: src/main/resources/templates/typescript/test/package.json:9-11
Timestamp: 2024-10-12T17:52:44.113Z
Learning: In the Artemis TypeScript programming exercise templates, the "assignment" workspace directory specified in `src/main/resources/templates/typescript/test/package.json` is copied in by the CI beforehand.

Applied to files:

  • supporting_scripts/course-scripts/hyperion-benchmark-workflow/manage_programming_exercise.py
📚 Learning: 2025-06-10T12:26:42.449Z
Learnt from: Wallenstein61
Repo: ls1intum/Artemis PR: 10989
File: src/main/java/de/tum/cit/aet/artemis/programming/service/ProgrammingExerciseImportFromFileService.java:108-117
Timestamp: 2025-06-10T12:26:42.449Z
Learning: In ProgrammingExerciseImportFromFileService, the current directory traversal logic for sharing imports (walking importExerciseDir before extraction) is working correctly in practice and should not be changed to more complex solutions, even if there are theoretical issues with the approach.

Applied to files:

  • supporting_scripts/course-scripts/hyperion-benchmark-workflow/manage_programming_exercise.py
📚 Learning: 2024-10-08T15:35:42.972Z
Learnt from: magaupp
Repo: ls1intum/Artemis PR: 8802
File: src/main/resources/templates/rust/exercise/src/context.rs:1-1
Timestamp: 2024-10-08T15:35:42.972Z
Learning: Code inside the `exercise` directories in the Artemis platform is provided to students and is intended for them to implement. TODO comments in these directories are meant to guide students and should not be addressed in the PR.

Applied to files:

  • supporting_scripts/course-scripts/hyperion-benchmark-workflow/manage_programming_exercise.py
📚 Learning: 2024-10-31T20:40:39.930Z
Learnt from: magaupp
Repo: ls1intum/Artemis PR: 9626
File: src/main/resources/templates/c_sharp/exercise/BubbleSort.cs:9-12
Timestamp: 2024-10-31T20:40:39.930Z
Learning: In the Artemis project, files under the `exercise` directory are incomplete exercises intended to be completed by the student. TODO comments in these files are intentional and should not be implemented.

Applied to files:

  • supporting_scripts/course-scripts/hyperion-benchmark-workflow/manage_programming_exercise.py
📚 Learning: 2024-10-04T23:23:49.139Z
Learnt from: magaupp
Repo: ls1intum/Artemis PR: 9261
File: src/main/resources/templates/c_plus_plus/test/testUtils/TestFailedError.py:6-6
Timestamp: 2024-10-04T23:23:49.139Z
Learning: In the Artemis project, when adding new programming language templates like C++, files such as `src/main/resources/templates/c_plus_plus/test/testUtils/TestFailedError.py` may be copied from existing templates without modifications. In such cases, suggesting modifications to these files (e.g., removing unnecessary `pass` statements) may not be necessary.

Applied to files:

  • supporting_scripts/course-scripts/hyperion-benchmark-workflow/manage_programming_exercise.py
📚 Learning: 2024-10-20T18:37:45.365Z
Learnt from: SamuelRoettgermann
Repo: ls1intum/Artemis PR: 9303
File: src/main/java/de/tum/in/www1/artemis/service/exam/StudentExamService.java:296-300
Timestamp: 2024-10-20T18:37:45.365Z
Learning: When reviewing code changes in `StudentExamService.saveSubmission`, if the PR aims to improve readability without changing logic, avoid suggesting changes that alter logic, such as adding exceptions in the default case of switch statements.

Applied to files:

  • supporting_scripts/course-scripts/hyperion-benchmark-workflow/manage_programming_exercise.py
📚 Learning: 2024-10-12T16:13:02.782Z
Learnt from: magaupp
Repo: ls1intum/Artemis PR: 9440
File: src/main/resources/templates/typescript/exercise/src/mergesort.ts:2-2
Timestamp: 2024-10-12T16:13:02.782Z
Learning: In files under the `exercise` directory, TODO comments are intentionally included for students to complete and should remain as is.

Applied to files:

  • supporting_scripts/course-scripts/hyperion-benchmark-workflow/manage_programming_exercise.py
📚 Learning: 2024-10-08T15:35:48.767Z
Learnt from: magaupp
Repo: ls1intum/Artemis PR: 9261
File: src/main/resources/templates/c_plus_plus/test/testUtils/Utils.py:15-35
Timestamp: 2024-10-08T15:35:48.767Z
Learning: In the Artemis project, when adding new programming language templates (e.g., C++), if files like `src/main/resources/templates/c_plus_plus/test/testUtils/Utils.py` are copied from the original C template without significant changes, code style improvements such as adding type annotations are not required in the initial PR introducing them.

Applied to files:

  • supporting_scripts/course-scripts/hyperion-benchmark-workflow/manage_programming_exercise.py
📚 Learning: 2025-01-25T17:22:31.410Z
Learnt from: magaupp
Repo: ls1intum/Artemis PR: 10202
File: src/main/resources/templates/ruby/test/test/test_structural.rb:5-18
Timestamp: 2025-01-25T17:22:31.410Z
Learning: When reviewing exercise templates, avoid adding tests that would pass immediately with the starter code. Tests should verify the actual implementation that students need to complete, not just the presence of classes and methods defined in the template.

Applied to files:

  • supporting_scripts/course-scripts/hyperion-benchmark-workflow/manage_programming_exercise.py
📚 Learning: 2024-10-31T20:41:04.600Z
Learnt from: magaupp
Repo: ls1intum/Artemis PR: 9626
File: src/main/resources/templates/c_sharp/exercise/MergeSort.cs:9-12
Timestamp: 2024-10-31T20:41:04.600Z
Learning: In the C# programming language template, files under the `exercise` directory (e.g., `MergeSort.cs`) are intentionally left incomplete as exercises for students to complete, and should not be flagged for missing implementations during code reviews.

Applied to files:

  • supporting_scripts/course-scripts/hyperion-benchmark-workflow/manage_programming_exercise.py
📚 Learning: 2025-04-22T10:22:01.154Z
Learnt from: tobias-lippert
Repo: ls1intum/Artemis PR: 10714
File: src/main/webapp/app/exercise/exercise-create-buttons/exercise-manage-button/exercise-manage-button.component.ts:38-43
Timestamp: 2025-04-22T10:22:01.154Z
Learning: In the Artemis codebase, the ExerciseType enum has uppercase keys (PROGRAMMING, MODELING, etc.) but lowercase string values ('programming', 'modeling', etc.), which are used directly in translation keys and route paths.

Applied to files:

  • supporting_scripts/course-scripts/hyperion-benchmark-workflow/manage_programming_exercise.py
🧬 Code graph analysis (1)
supporting_scripts/course-scripts/hyperion-benchmark-workflow/run_pecv_bench_in_artemis.py (3)
supporting_scripts/course-scripts/hyperion-benchmark-workflow/utils.py (1)
  • login_as_admin (14-16)
supporting_scripts/course-scripts/hyperion-benchmark-workflow/create_pecv_bench_course.py (1)
  • create_pecv_bench_course (30-109)
supporting_scripts/course-scripts/hyperion-benchmark-workflow/manage_programming_exercise.py (4)
  • check_exercise_consistency (208-224)
  • convert_variant_to_zip (32-140)
  • import_programming_exercise (142-205)
  • process_variant_consistency_check (227-254)
🪛 Ruff (0.14.6)
supporting_scripts/course-scripts/hyperion-benchmark-workflow/run_pecv_bench_in_artemis.py

33-33: Starting a process with a partial executable path

(S607)


37-37: Starting a process with a partial executable path

(S607)


41-41: Starting a process with a partial executable path

(S607)


54-54: subprocess call: check for execution of untrusted input

(S603)


55-55: Starting a process with a partial executable path

(S607)


69-69: subprocess call: check for execution of untrusted input

(S603)


101-101: Use raise without specifying exception name

Remove exception name

(TRY201)


130-130: Local variable path is assigned to but never used

Remove assignment to unused variable path

(F841)


132-132: Do not catch blind exception: Exception

(BLE001)


137-137: Do not catch blind exception: Exception

(BLE001)


171-171: Do not catch blind exception: Exception

(BLE001)


225-225: Do not catch blind exception: Exception

(BLE001)


296-296: Do not catch blind exception: Exception

(BLE001)


334-334: Do not catch blind exception: Exception

(BLE001)


352-352: subprocess call: check for execution of untrusted input

(S603)

supporting_scripts/course-scripts/hyperion-benchmark-workflow/manage_programming_exercise.py

76-76: Do not catch blind exception: Exception

(BLE001)


190-190: f-string without any placeholders

Remove extraneous f prefix

(F541)


251-251: Consider moving this statement to an else block

(TRY300)


252-252: Do not catch blind exception: Exception

(BLE001)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: Codacy Static Code Analysis
  • GitHub Check: Analyse
🔇 Additional comments (14)
supporting_scripts/course-scripts/hyperion-benchmark-workflow/run_pecv_bench_in_artemis.py (7)

1-24: Configuration and imports look good.

The configuration loading with fallback values is properly implemented. The REFERENCE fallback issue from previous reviews has been addressed.


26-64: Repository management logic is sound.

The function properly handles both fresh clone and update scenarios with appropriate cleanup (git reset --hard and git clean -fd) before pulling. Error handling exits the script on failure, which is appropriate for a workflow script.


65-78: LGTM!

Using sys.executable ensures the correct Python interpreter is used, and editable install mode is appropriate for accessing the pecv-bench CLI tools.


140-173: LGTM!

The safer dictionary access using .get("id") has been properly implemented. The function handles both zip creation and import failures gracefully.


175-226: LGTM!

The report summarization logic is clean with proper file existence checks and error handling.


264-298: LGTM!

The parallel import workflow is well-structured. Results are collected in the main thread after future.result(), making the dictionary updates thread-safe.


339-368: LGTM!

The report generation step properly sequences the analysis commands and exits on failure. The final report summarization ties everything together.

supporting_scripts/course-scripts/hyperion-benchmark-workflow/manage_programming_exercise.py (7)

1-11: Imports are clean.

Previous review feedback about unused imports has been addressed.


13-21: LGTM!

The sanitization logic correctly handles edge cases like names starting with numbers.


23-30: LGTM!

Simple file reading utility. The caller (convert_variant_to_zip) checks file existence before calling.


111-140: LGTM!

The zip packaging logic correctly handles the template-to-exercise rename and includes proper cleanup of intermediate files.


154-156: Case mismatch issue has been addressed.

The config file path now correctly uses lowercase "exercise-details.json", matching what convert_variant_to_zip creates.


208-224: LGTM!

The consistency check function is straightforward with proper error logging.


227-254: LGTM!

The worker function properly handles missing exercise IDs and writes results to per-variant files. The None check for exercise_server_id prevents unnecessary network calls for failed imports.

coderabbitai[bot]
coderabbitai bot previously approved these changes Dec 1, 2025
Copy link
Contributor

@IcanCUthere IcanCUthere left a comment

Choose a reason for hiding this comment

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

Tested it locally, seems to work as expected, but got some weird errors when executing the script.

coderabbitai[bot]
coderabbitai bot previously approved these changes Dec 1, 2025
Updated Python version in installation instructions.
Copy link

@sawys777 sawys777 left a comment

Choose a reason for hiding this comment

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

Tested locally, report.md generated as expected

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Ready For Review
Status: In review

Development

Successfully merging this pull request may close these issues.

4 participants