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: Define DTO architecture test per module with module-specific thresholds #9959

Merged
merged 17 commits into from
Jan 20, 2025

Conversation

ole-ve
Copy link
Contributor

@ole-ve ole-ve commented Dec 6, 2024

Checklist

General

Server

Motivation and Context

As part of restructuring the server code into modules, we temporarily disabled ArchitectureTest#testDtoImplementations because of too many violations. This PR enables it again.

Note: The changed line count does not reflect the complexity of the changes - most of the code is simple boilerplate Java inheritance code.

Description

Moved the test to a common abstract architecture superclass AbstractModuleCodeStyleTest and implement it in each module test directory. These specify the module-respective DTO-package names and violation thresholds.

Review Progress

Code Review

  • Code Review 1
  • Code Review 2

Summary by CodeRabbit

Release Notes

  • New Features

    • Introduced multiple new test classes to enforce code style conventions for various modules within the Artemis application, including Assessment, Athena, Atlas, Communication, Core, Exam, Exercise, File Upload, Iris, Lecture, LTI, Modeling, Plagiarism, Programming, Quiz, Text, and Tutorial Group.
    • Each test class provides specific threshold values for Data Transfer Objects (DTOs) and ensures adherence to naming conventions.
  • Bug Fixes

    • Removed deprecated test methods to streamline testing processes and improve code quality.
  • Chores

    • Added a new abstract test class for modular code style validation, enhancing the testing framework's structure.

@github-actions github-actions bot added tests assessment Pull requests that affect the corresponding module athena Pull requests that affect the corresponding module atlas Pull requests that affect the corresponding module communication Pull requests that affect the corresponding module core Pull requests that affect the corresponding module exam Pull requests that affect the corresponding module exercise Pull requests that affect the corresponding module fileupload Pull requests that affect the corresponding module iris Pull requests that affect the corresponding module lecture Pull requests that affect the corresponding module lti Pull requests that affect the corresponding module modeling Pull requests that affect the corresponding module plagiarism Pull requests that affect the corresponding module programming Pull requests that affect the corresponding module quiz Pull requests that affect the corresponding module text Pull requests that affect the corresponding module tutorialgroup Pull requests that affect the corresponding module labels Dec 6, 2024
@ole-ve ole-ve marked this pull request as ready for review December 6, 2024 13:48
@ole-ve ole-ve requested a review from a team as a code owner December 6, 2024 13:48
Copy link

coderabbitai bot commented Dec 6, 2024

Warning

There were issues while running some tools. Please review the errors and either fix the tool’s configuration or disable the tool if it’s a critical failure.

🔧 pmd (7.8.0)
src/test/java/de/tum/cit/aet/artemis/athena/architecture/AthenaCodeStyleArchitectureTest.java

The following rules are missing or misspelled in your ruleset file category/vm/bestpractices.xml: BooleanInstantiation, DontImportJavaLang, DuplicateImports, EmptyFinallyBlock, EmptyIfStmt, EmptyInitializer, EmptyStatementBlock, EmptyStatementNotInLoop, EmptySwitchStatements, EmptySynchronizedBlock, EmptyTryBlock, EmptyWhileStmt, ExcessiveClassLength, ExcessiveMethodLength, ImportFromSamePackage, MissingBreakInSwitch, SimplifyBooleanAssertion. Please check your ruleset configuration.

src/test/java/de/tum/cit/aet/artemis/atlas/architecture/AtlasCodeStyleArchitectureTest.java

The following rules are missing or misspelled in your ruleset file category/vm/bestpractices.xml: BooleanInstantiation, DontImportJavaLang, DuplicateImports, EmptyFinallyBlock, EmptyIfStmt, EmptyInitializer, EmptyStatementBlock, EmptyStatementNotInLoop, EmptySwitchStatements, EmptySynchronizedBlock, EmptyTryBlock, EmptyWhileStmt, ExcessiveClassLength, ExcessiveMethodLength, ImportFromSamePackage, MissingBreakInSwitch, SimplifyBooleanAssertion. Please check your ruleset configuration.

src/test/java/de/tum/cit/aet/artemis/exam/architecture/ExamCodeStyleArchitectureTest.java

The following rules are missing or misspelled in your ruleset file category/vm/bestpractices.xml: BooleanInstantiation, DontImportJavaLang, DuplicateImports, EmptyFinallyBlock, EmptyIfStmt, EmptyInitializer, EmptyStatementBlock, EmptyStatementNotInLoop, EmptySwitchStatements, EmptySynchronizedBlock, EmptyTryBlock, EmptyWhileStmt, ExcessiveClassLength, ExcessiveMethodLength, ImportFromSamePackage, MissingBreakInSwitch, SimplifyBooleanAssertion. Please check your ruleset configuration.

  • 9 others

Walkthrough

This pull request introduces multiple new test classes for various modules within the Artemis application. Each new test class extends AbstractModuleCodeStyleTest and implements specific methods to enforce code style checks related to Data Transfer Objects (DTOs) for its respective module. Additionally, the pull request includes the removal of an abstract test class and modifications to an existing architecture test class, reflecting a restructuring of the testing framework.

Changes

File Path Change Summary
src/test/java/de/tum/cit/aet/artemis/assessment/architecture/AssessmentCodeStyleArchitectureTest.java Class added: AssessmentCodeStyleArchitectureTest, methods overridden: getModulePackage(), dtoAsAnnotatedRecordThreshold(), dtoNameEndingThreshold()
src/test/java/de/tum/cit/aet/artemis/athena/architecture/AthenaCodeStyleArchitectureTest.java Class added: AthenaCodeStyleArchitectureTest, methods overridden: getModulePackage(), dtoNameEndingThreshold()
src/test/java/de/tum/cit/aet/artemis/atlas/architecture/AtlasCodeStyleArchitectureTest.java Class added: AtlasCodeStyleArchitectureTest, methods overridden: getModulePackage(), dtoNameEndingThreshold()
src/test/java/de/tum/cit/aet/artemis/communication/architecture/CommunicationCodeStyleArchitectureTest.java Class added: CommunicationCodeStyleArchitectureTest, methods overridden: getModulePackage(), dtoAsAnnotatedRecordThreshold(), dtoNameEndingThreshold()
src/test/java/de/tum/cit/aet/artemis/core/architecture/CoreCodeStyleArchitectureTest.java Class added: CoreCodeStyleArchitectureTest, methods overridden: getModulePackage(), dtoAsAnnotatedRecordThreshold(), dtoNameEndingThreshold()
src/test/java/de/tum/cit/aet/artemis/exam/architecture/ExamCodeStyleArchitectureTest.java Class added: ExamCodeStyleArchitectureTest, methods overridden: getModulePackage(), dtoNameEndingThreshold()
src/test/java/de/tum/cit/aet/artemis/exercise/architecture/ExerciseCodeStyleArchitectureTest.java Class added: ExerciseCodeStyleArchitectureTest, methods overridden: getModulePackage(), dtoAsAnnotatedRecordThreshold(), dtoNameEndingThreshold()
src/test/java/de/tum/cit/aet/artemis/fileupload/architecture/FileUploadCodeStyleArchitectureTest.java Class added: FileUploadCodeStyleArchitectureTest, methods overridden: getModulePackage()
src/test/java/de/tum/cit/aet/artemis/iris/architecture/IrisCodeStyleArchitectureTest.java Class added: IrisCodeStyleArchitectureTest, methods overridden: getModulePackage(), dtoAsAnnotatedRecordThreshold(), dtoNameEndingThreshold()
src/test/java/de/tum/cit/aet/artemis/lecture/architecture/LectureCodeStyleArchitectureTest.java Class added: LectureCodeStyleArchitectureTest, methods overridden: getModulePackage()
src/test/java/de/tum/cit/aet/artemis/lti/architecture/LtiCodeStyleArchitectureTest.java Class added: LtiCodeStyleArchitectureTest, methods overridden: getModulePackage(), dtoNameEndingThreshold()
src/test/java/de/tum/cit/aet/artemis/modeling/architecture/ModelingCodeStyleArchitectureTest.java Class added: ModelingCodeStyleArchitectureTest, methods overridden: getModulePackage()
src/test/java/de/tum/cit/aet/artemis/plagiarism/architecture/PlagiarismCodeStyleArchitectureTest.java Class added: PlagiarismCodeStyleArchitectureTest, methods overridden: getModulePackage(), dtoNameEndingThreshold()
src/test/java/de/tum/cit/aet/artemis/programming/architecture/ProgrammingCodeStyleArchitectureTest.java Class added: ProgrammingCodeStyleArchitectureTest, methods overridden: getModulePackage(), dtoAsAnnotatedRecordThreshold(), dtoNameEndingThreshold()
src/test/java/de/tum/cit/aet/artemis/quiz/architecture/QuizCodeStyleArchitectureTest.java Class added: QuizCodeStyleArchitectureTest, methods overridden: getModulePackage()
src/test/java/de/tum/cit/aet/artemis/shared/architecture/AbstractModuleTestArchitectureTest.java Class removed: AbstractModuleTestArchitectureTest
src/test/java/de/tum/cit/aet/artemis/shared/architecture/ArchitectureTest.java Method removed: testDTOImplementations()
src/test/java/de/tum/cit/aet/artemis/shared/architecture/module/AbstractModuleCodeStyleTest.java Class added: AbstractModuleCodeStyleTest, methods added: dtoAsAnnotatedRecordThreshold(), dtoNameEndingThreshold(), testDTOImplementations(), getModuleDtoSubpackage()
src/test/java/de/tum/cit/aet/artemis/text/architecture/TextCodeStyleArchitectureTest.java Class added: TextCodeStyleArchitectureTest, methods overridden: getModulePackage(), dtoAsAnnotatedRecordThreshold(), dtoNameEndingThreshold()
src/test/java/de/tum/cit/aet/artemis/tutorialgroup/architecture/TutorialGroupCodeStyleArchitectureTest.java Class added: TutorialGroupCodeStyleArchitectureTest, methods overridden: getModulePackage()

Possibly related PRs

  • Development: Add check for REST endpoints to be in kebab case #9210: The AssessmentCodeStyleArchitectureTest class in the main PR is related to the AthenaCodeStyleArchitectureTest, AtlasCodeStyleArchitectureTest, and other similar tests in the retrieved PRs, as they all extend AbstractModuleCodeStyleTest and implement methods for module-specific code style checks.
  • Development: Execute architecture tests on module basis #9409: The AssessmentCodeStyleArchitectureTest is related to the AssessmentRepositoryArchitectureTest and AssessmentResourceArchitectureTest in this PR, as they all focus on the assessment module and involve similar architectural testing patterns.
  • Development: Refactor tutorial group tests #9419: The AssessmentCodeStyleArchitectureTest is related to the TutorialGroupTestArchitectureTest in this PR, as both involve creating architecture tests for specific modules within the Artemis application.
  • Development: Ensure correct @Repository annotation usage #9610: The changes in the LongFeedbackTextRepository and other repositories in this PR relate to the AssessmentCodeStyleArchitectureTest, as they both involve ensuring proper annotations and configurations for repositories within the assessment module.
  • Development: Fix client test coverage #9703: The AssessmentCodeStyleArchitectureTest is indirectly related to the client tests in this PR, as both aim to ensure proper functionality and coverage for their respective modules within the Artemis application.

Suggested labels

ready for review

Suggested reviewers

  • JohannesStoehr
  • MaximilianAnzinger
  • SimonEntholzer

Tip

CodeRabbit's docstrings feature is now available as part of our Early Access Program! Simply use the command @coderabbitai generate docstrings to have CodeRabbit automatically generate docstrings for your pull request. We would love to hear your feedback on Discord.


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ 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. (Beta)
  • @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.

coderabbitai[bot]
coderabbitai bot previously approved these changes Dec 20, 2024
Copy link

@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 (1)
src/test/java/de/tum/cit/aet/artemis/shared/architecture/module/AbstractModuleCodeStyleTest.java (1)

18-32: 🛠️ Refactor suggestion

Consider providing default implementations instead of abstract methods.

The current implementation requires each module to override these methods, leading to code duplication. Since the goal is to eventually reduce all thresholds to 0, consider:

  1. Making these concrete methods with default implementation of 0
  2. Allowing modules to override only when necessary during the transition period
-    protected int dtoAsAnnotatedRecordThreshold() {
-        return 0;
-    }
+    protected int dtoAsAnnotatedRecordThreshold() {
+        return 0; // Override in specific modules if needed during transition
+    }

-    protected int dtoNameEndingThreshold() {
-        return 0;
-    }
+    protected int dtoNameEndingThreshold() {
+        return 0; // Override in specific modules if needed during transition
+    }
🧹 Nitpick comments (5)
src/test/java/de/tum/cit/aet/artemis/shared/architecture/module/AbstractModuleCodeStyleTest.java (3)

34-35: Add JavaDoc to document test method behavior.

Add documentation to explain the test's purpose, rules being checked, and expected outcomes.

+    /**
+     * Tests the implementation of DTOs in the module for compliance with:
+     * 1. All DTOs should be records and annotated with @JsonInclude
+     * 2. All classes in DTO package should have names ending with "DTO"
+     */
     @Test
     void testDTOImplementations() {

36-48: Improve test maintainability and readability.

  1. Consider using lessThanOrEqualTo instead of hasSize to allow for improvements without requiring immediate threshold updates.
  2. Move the inline comment to JavaDoc as suggested in previous reviews.
  3. Consider extracting the rules into separate methods for better readability.
-        assertThat(result.getFailureReport().getDetails()).hasSize(dtoAsAnnotatedRecordThreshold());
+        assertThat(result.getFailureReport().getDetails()).hasSizeLessThanOrEqualTo(dtoAsAnnotatedRecordThreshold());

-        assertThat(result.getFailureReport().getDetails()).hasSize(dtoNameEndingThreshold());
+        assertThat(result.getFailureReport().getDetails()).hasSizeLessThanOrEqualTo(dtoNameEndingThreshold());

50-52: Add JavaDoc to document helper method.

Add documentation to explain the purpose and format of the returned package path.

+    /**
+     * Constructs the package path for DTO classes in the module.
+     * Uses '..' to match any number of subpackages.
+     * @return The package path pattern for finding DTOs
+     */
     private String getModuleDtoSubpackage() {
src/test/java/de/tum/cit/aet/artemis/fileupload/architecture/FileUploadCodeStyleArchitectureTest.java (1)

5-5: Consider making the test class public

While package-private visibility works, making the test class public would:

  1. Follow common JUnit test visibility patterns
  2. Allow potential reuse in other test scenarios
  3. Improve discoverability
-class FileUploadCodeStyleArchitectureTest extends AbstractModuleCodeStyleTest {
+public class FileUploadCodeStyleArchitectureTest extends AbstractModuleCodeStyleTest {
src/test/java/de/tum/cit/aet/artemis/quiz/architecture/QuizCodeStyleArchitectureTest.java (1)

5-5: Add JavaDoc documentation to describe the test's purpose.

Since this is a test class enforcing architectural rules, it should be documented with JavaDoc explaining its specific role in enforcing DTO implementations for the quiz module.

+/**
+ * Architectural test class that enforces DTO implementation rules specific to the quiz module.
+ * This test ensures proper separation of DTOs and maintains consistent architectural patterns.
+ */
 class QuizCodeStyleArchitectureTest extends AbstractModuleCodeStyleTest {
📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between cb76b88 and 750a60e.

📒 Files selected for processing (12)
  • src/test/java/de/tum/cit/aet/artemis/athena/architecture/AthenaCodeStyleArchitectureTest.java (1 hunks)
  • src/test/java/de/tum/cit/aet/artemis/atlas/architecture/AtlasCodeStyleArchitectureTest.java (1 hunks)
  • src/test/java/de/tum/cit/aet/artemis/exam/architecture/ExamCodeStyleArchitectureTest.java (1 hunks)
  • src/test/java/de/tum/cit/aet/artemis/fileupload/architecture/FileUploadCodeStyleArchitectureTest.java (1 hunks)
  • src/test/java/de/tum/cit/aet/artemis/lecture/architecture/LectureCodeStyleArchitectureTest.java (1 hunks)
  • src/test/java/de/tum/cit/aet/artemis/lti/architecture/LtiCodeStyleArchitectureTest.java (1 hunks)
  • src/test/java/de/tum/cit/aet/artemis/modeling/architecture/ModelingCodeStyleArchitectureTest.java (1 hunks)
  • src/test/java/de/tum/cit/aet/artemis/plagiarism/architecture/PlagiarismCodeStyleArchitectureTest.java (1 hunks)
  • src/test/java/de/tum/cit/aet/artemis/programming/architecture/ProgrammingCodeStyleArchitectureTest.java (1 hunks)
  • src/test/java/de/tum/cit/aet/artemis/quiz/architecture/QuizCodeStyleArchitectureTest.java (1 hunks)
  • src/test/java/de/tum/cit/aet/artemis/shared/architecture/module/AbstractModuleCodeStyleTest.java (1 hunks)
  • src/test/java/de/tum/cit/aet/artemis/tutorialgroup/architecture/TutorialGroupCodeStyleArchitectureTest.java (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (9)
  • src/test/java/de/tum/cit/aet/artemis/lecture/architecture/LectureCodeStyleArchitectureTest.java
  • src/test/java/de/tum/cit/aet/artemis/atlas/architecture/AtlasCodeStyleArchitectureTest.java
  • src/test/java/de/tum/cit/aet/artemis/athena/architecture/AthenaCodeStyleArchitectureTest.java
  • src/test/java/de/tum/cit/aet/artemis/tutorialgroup/architecture/TutorialGroupCodeStyleArchitectureTest.java
  • src/test/java/de/tum/cit/aet/artemis/plagiarism/architecture/PlagiarismCodeStyleArchitectureTest.java
  • src/test/java/de/tum/cit/aet/artemis/programming/architecture/ProgrammingCodeStyleArchitectureTest.java
  • src/test/java/de/tum/cit/aet/artemis/lti/architecture/LtiCodeStyleArchitectureTest.java
  • src/test/java/de/tum/cit/aet/artemis/exam/architecture/ExamCodeStyleArchitectureTest.java
  • src/test/java/de/tum/cit/aet/artemis/modeling/architecture/ModelingCodeStyleArchitectureTest.java
🧰 Additional context used
📓 Path-based instructions (3)
src/test/java/de/tum/cit/aet/artemis/quiz/architecture/QuizCodeStyleArchitectureTest.java (1)

Pattern src/test/java/**/*.java: test_naming: descriptive; test_size: small_specific; fixed_data: true; junit5_features: true; assert_use: assertThat; assert_specificity: true; archunit_use: enforce_package_rules; db_query_count_tests: track_performance; util_service_factory_pattern: true; avoid_db_access: true; mock_strategy: static_mocks; context_restart_minimize: true

src/test/java/de/tum/cit/aet/artemis/fileupload/architecture/FileUploadCodeStyleArchitectureTest.java (1)

Pattern src/test/java/**/*.java: test_naming: descriptive; test_size: small_specific; fixed_data: true; junit5_features: true; assert_use: assertThat; assert_specificity: true; archunit_use: enforce_package_rules; db_query_count_tests: track_performance; util_service_factory_pattern: true; avoid_db_access: true; mock_strategy: static_mocks; context_restart_minimize: true

src/test/java/de/tum/cit/aet/artemis/shared/architecture/module/AbstractModuleCodeStyleTest.java (1)

Pattern src/test/java/**/*.java: test_naming: descriptive; test_size: small_specific; fixed_data: true; junit5_features: true; assert_use: assertThat; assert_specificity: true; archunit_use: enforce_package_rules; db_query_count_tests: track_performance; util_service_factory_pattern: true; avoid_db_access: true; mock_strategy: static_mocks; context_restart_minimize: true

🔇 Additional comments (7)
src/test/java/de/tum/cit/aet/artemis/shared/architecture/module/AbstractModuleCodeStyleTest.java (2)

1-14: LGTM: Class structure and imports are well-organized.

The class hierarchy and package structure are appropriate for the module-specific architecture testing purpose.


16-16: LGTM: Logger declaration follows best practices.

The logger is properly configured with appropriate access modifiers and naming.

src/test/java/de/tum/cit/aet/artemis/fileupload/architecture/FileUploadCodeStyleArchitectureTest.java (2)

1-4: LGTM: Package structure and imports are well-organized

The package name follows the module structure, and imports are minimal.


7-10: LGTM: Method implementation is correct

The getModulePackage implementation correctly constructs the module-specific package name.

Let's verify the ARTEMIS_PACKAGE constant usage across other module tests:

✅ Verification successful

Verified: Implementation follows consistent pattern across all module tests

The implementation in FileUploadCodeStyleArchitectureTest follows the same pattern used across all other module tests. Each module test consistently:

  • Extends AbstractModuleCodeStyleTest
  • Overrides getModulePackage()
  • Returns ARTEMIS_PACKAGE concatenated with its specific module name
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify consistent usage of ARTEMIS_PACKAGE constant in other module tests
# Expected: All module tests should use ARTEMIS_PACKAGE constant similarly

ast-grep --pattern 'class $_ extends AbstractModuleCodeStyleTest {
  $$$
  @Override
  public String getModulePackage() {
    return ARTEMIS_PACKAGE + $_
  }
  $$$
}'

Length of output: 292


Script:

#!/bin/bash
# Let's try a different approach using ripgrep to find all getModulePackage implementations
rg -U "class.*extends\s+AbstractModuleCodeStyleTest[\s\S]*?getModulePackage\(\)[\s\S]*?return.*ARTEMIS_PACKAGE.*;" -A 1

Length of output: 13125

src/test/java/de/tum/cit/aet/artemis/quiz/architecture/QuizCodeStyleArchitectureTest.java (3)

1-4: LGTM! Clean package structure and imports.

The package name correctly reflects the module structure, and imports are minimal.


7-10: Consider implementing this in the superclass.

As noted in a previous review, this implementation might not be needed if a default implementation was provided in the superclass. The package name could be derived from the class name or package automatically.


5-11: Consider adding module-specific threshold configuration.

The PR objectives mention allowing "module-specific violation thresholds", but this implementation doesn't specify any thresholds. Consider overriding additional methods to configure thresholds specific to the quiz module if needed.

Let's check if other modules implement custom thresholds:

coderabbitai[bot]
coderabbitai bot previously approved these changes Dec 20, 2024
Copy link

There hasn't been any activity on this pull request recently. Therefore, this pull request has been automatically marked as stale and will be closed if no further activity occurs within seven days. Thank you for your contributions.

@github-actions github-actions bot added the stale label Dec 28, 2024
# Conflicts:
#	src/test/java/de/tum/cit/aet/artemis/shared/architecture/AbstractModuleTestArchitectureTest.java
coolchock
coolchock previously approved these changes Jan 3, 2025
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.

code LGTM 👍

Copy link

There hasn't been any activity on this pull request recently. Therefore, this pull request has been automatically marked as stale and will be closed if no further activity occurs within seven days. Thank you for your contributions.

@krusche krusche added this to the 7.9.0 milestone Jan 19, 2025
@github-actions github-actions bot removed the stale label Jan 20, 2025
@krusche krusche merged commit 302ce50 into develop Jan 20, 2025
22 of 26 checks passed
@krusche krusche deleted the chore/dto-arch-test-per-module branch January 20, 2025 20:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
assessment Pull requests that affect the corresponding module athena Pull requests that affect the corresponding module atlas Pull requests that affect the corresponding module communication Pull requests that affect the corresponding module core Pull requests that affect the corresponding module exam Pull requests that affect the corresponding module exercise Pull requests that affect the corresponding module fileupload Pull requests that affect the corresponding module iris Pull requests that affect the corresponding module lecture Pull requests that affect the corresponding module lti Pull requests that affect the corresponding module modeling Pull requests that affect the corresponding module plagiarism Pull requests that affect the corresponding module programming Pull requests that affect the corresponding module quiz Pull requests that affect the corresponding module ready to merge tests text Pull requests that affect the corresponding module tutorialgroup Pull requests that affect the corresponding module
Projects
Status: Merged
Development

Successfully merging this pull request may close these issues.

6 participants