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

Development: Update called endpoints for large course script #10443

Merged

Conversation

az108
Copy link
Contributor

@az108 az108 commented Mar 5, 2025

Checklist

General

Motivation and Context

After the following PR (#10416) was merged, server URLs received a module-specific prefix. As a result, the large course script stopped working because it relies on calling endpoints on the server. Therefore, it is necessary to update these endpoints in the script.

Additionally, for developers who may not be familiar with the script, getting started could be challenging. To address this, the configuration file has been updated to be more user-friendly.

Description

The endpoints called by the script have been updated accordingly, and the configuration file has been improved with better comments. Furthermore, the run cleanup process has been commented out, as it is rare for developers to run the corresponding randomize script. Without running this script, the cleanup process always results in an error. Instead, a commented-out version of the cleanup is provided, allowing developers to uncomment it if they wish to use the randomize script.

Steps for Testing (This PR can only be tested locally)

Any further description or reminders can be found in the readme which can be found in the supporting_scripts section or in the following PR (#9252).
Prerequisites:

  • 1 Developer
  1. Checkout to this branch
  2. Start the Artemis Server and Client
  3. Navigate to "supporting_scripts/course-scripts"
  4. Run large_course_main.py
  5. Verify if the students and a Course was created on your Local Setup with a Programming Exercise and Sumbissions based on the amount of students you created.

Review Progress

Review Progress

Code Review

  • Code Review 1
  • Code Review 2

Summary by CodeRabbit

  • New Features

    • Updated API endpoints for course setup, user enrollment, and programming exercise processes.
    • Enhanced configuration for special character handling in course names.
  • Bug Fixes

    • Adjusted cleanup routines to prevent unintended execution during course and exercise management.

@az108 az108 requested a review from a team as a code owner March 5, 2025 10:43
Copy link

coderabbitai bot commented Mar 5, 2025

Walkthrough

This PR updates several API endpoint URLs by adding new path segments such as /core, and in some cases, additional path restructuring. It also shifts a configuration source for special characters and removes calls to the run_cleanup() function in various scripts affecting error handling and main execution. These changes systematically alter the communication paths between the scripts and the server endpoints while disabling automated cleanup routines.

Changes

File(s) Change Summary
supporting_scripts/.../add_users_to_course.py, supporting_scripts/.../create_users.py, supporting_scripts/.../create_course.py, supporting_scripts/.../utils.py, supporting_scripts/.../manage_programming_exercise.py Updated URL constructions across the functions to include added segments (e.g. /core, additional restructuring for programming endpoints). Also in create_course.py, the regex configuration source was moved from Settings to CourseSettings.
supporting_scripts/.../create_course.py, supporting_scripts/.../large_course_main.py, supporting_scripts/.../manage_programming_exercise.py Removed or commented out calls to run_cleanup() (in error handling and main flows), thereby disabling the automated cleanup steps formerly executed during course creation and programming exercise setup.

Sequence Diagram(s)

sequenceDiagram
    participant Client
    participant API_Server
    Client->>API_Server: POST /core/admin/courses (course data)
    API_Server-->>Client: 400 Error Response
    Note right of Client: Cleanup process (run_cleanup) is not invoked

Possibly related PRs

Suggested labels

chore, ready to merge, template

Suggested reviewers

  • SimonEntholzer
  • krusche
  • HanyangXu0508

📜 Recent review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between bb75d97 and 8f12a5b.

📒 Files selected for processing (1)
  • supporting_scripts/course-scripts/quick-course-setup/large_course_main.py (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • supporting_scripts/course-scripts/quick-course-setup/large_course_main.py
⏰ Context from checks skipped due to timeout of 90000ms (6)
  • GitHub Check: Call Build Workflow / Build .war artifact
  • GitHub Check: Call Build Workflow / Build and Push Docker Image
  • GitHub Check: client-tests
  • GitHub Check: server-style
  • GitHub Check: server-tests
  • GitHub Check: Analyse

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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai or @coderabbitai title anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@az108 az108 changed the title Development: Update server urls for large course script Development: Update called endpoints for large course script Mar 5, 2025
Copy link
Contributor

@jfr2102 jfr2102 left a comment

Choose a reason for hiding this comment

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

script changes LGTM, thanks!

Copy link
Contributor

@ole-ve ole-ve left a comment

Choose a reason for hiding this comment

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

code

@krusche krusche added this to the 8.0 milestone Mar 9, 2025
@krusche krusche merged commit 675d958 into develop Mar 9, 2025
31 of 37 checks passed
@krusche krusche deleted the chore/general/improve-usability-large-course-script branch March 9, 2025 07:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Merged
Development

Successfully merging this pull request may close these issues.

4 participants