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 Go programming language template #9751

Merged
merged 25 commits into from
Dec 22, 2024

Conversation

magaupp
Copy link
Contributor

@magaupp magaupp commented Nov 11, 2024

Checklist

General

Server

Changes affecting Programming Exercises

  • High priority: I tested all changes and their related features with all corresponding user types on a test server configured with the integrated lifecycle setup (LocalVC and LocalCI).
  • I tested all changes and their related features with all corresponding user types on a local server configured with LocalVC and Jenkins.

Motivation and Context

Go currently is on rank 12 of the PYPL Index and should be included as a relevant language for programming exercises.

Description

This PR adds Go as a programming exercise template. It uses the Strategy Pattern example as used in the other languages.
The tests use the standard testing package to be run with go test. The output is converted to JUnit XML using go-junit-report.

This PR also includes refactoring of client code for easy extensibility of package name verification.

Steps for Testing

Prerequisites:

  • 1 Instructor
  1. Navigate to the exercise creation page
  2. Select Go for the language
  3. Verify that only valid Go identifiers can be used for the package name
  4. Fill out all necessary fields correctly and generate the exercise
  5. Wait until the test results are available in the exercise details page
  6. Verify that the template result passes 0/8 tests without build failure
  7. Verify that the solution result passes 8/8 tests without build failure

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

Summary by CodeRabbit

Release Notes

  • New Features

    • Added support for the Go programming language across various components, including programming exercises, plagiarism detection, and continuous integration.
    • Introduced new Go-related templates and scripts for automated testing and exercise management.
  • Enhancements

    • Improved validation for package names and application names for Go and other languages.
    • Updated documentation to reflect new Go support and validation messages in multiple languages.
  • Bug Fixes

    • Refined error handling and validation logic related to programming exercises, ensuring better user guidance.
  • Chores

    • Updated localization files to include Go-specific validation messages in German and English.

@github-actions github-actions bot added server Pull requests that update Java code. (Added Automatically!) client Pull requests that update TypeScript code. (Added Automatically!) config-change Pull requests that change the config in a way that they require a deployment via Ansible. template plagiarism Pull requests that affect the corresponding module programming Pull requests that affect the corresponding module labels Nov 11, 2024
@magaupp magaupp force-pushed the feature/programming-exercises/go-template branch 5 times, most recently from 6e3ce88 to 1572313 Compare November 24, 2024 17:40
@github-actions github-actions bot added tests documentation buildagent Pull requests that affect the corresponding module labels Nov 24, 2024
@magaupp magaupp changed the base branch from develop to feature/programming-exercises/concat-nested-testsuite-names November 24, 2024 17:42
@magaupp magaupp temporarily deployed to artemis-test4.artemis.cit.tum.de November 24, 2024 17:52 — with GitHub Actions Inactive
@magaupp magaupp force-pushed the feature/programming-exercises/go-template branch from 1572313 to d6c458e Compare November 25, 2024 22:38
@github-actions github-actions bot removed the buildagent Pull requests that affect the corresponding module label Nov 25, 2024
@magaupp magaupp force-pushed the feature/programming-exercises/go-template branch 3 times, most recently from a1f7ac3 to bb2a6c8 Compare November 26, 2024 17:37
@magaupp magaupp temporarily deployed to artemis-test1.artemis.cit.tum.de November 26, 2024 17:46 — with GitHub Actions Inactive
@magaupp magaupp added the stacked-pr PR that depends on another PR label Nov 26, 2024
@github-actions github-actions bot removed core Pull requests that affect the corresponding module exam Pull requests that affect the corresponding module exercise Pull requests that affect the corresponding module iris Pull requests that affect the corresponding module quiz Pull requests that affect the corresponding module labels Dec 19, 2024
@magaupp magaupp added ready for review and removed stacked-pr PR that depends on another PR labels Dec 19, 2024
@magaupp
Copy link
Contributor Author

magaupp commented Dec 19, 2024

I was requested to make this independent of #9691. Please re-test.

Copy link
Contributor

@AjayvirS AjayvirS 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 TS1:

image

Copy link
Contributor

@coolchock coolchock 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 ts1, go exercises build

Copy link
Member

@BBesrour BBesrour 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 7.8.0 milestone Dec 22, 2024
@krusche krusche merged commit 947845c into develop Dec 22, 2024
64 of 68 checks passed
@krusche krusche deleted the feature/programming-exercises/go-template branch December 22, 2024 18:42
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!) config-change Pull requests that change the config in a way that they require a deployment via Ansible. documentation plagiarism Pull requests that affect the corresponding module programming Pull requests that affect the corresponding module ready for review server Pull requests that update Java code. (Added Automatically!) template tests
Projects
Status: Merged
Status: Done
Development

Successfully merging this pull request may close these issues.

9 participants