-
Notifications
You must be signed in to change notification settings - Fork 291
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
Iris
: Upgrade settings system for Pyris V2
#9247
Conversation
f631b9c
to
5368123
Compare
This comment was marked as off-topic.
This comment was marked as off-topic.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 4
...settings-update/iris-common-sub-settings-update/iris-common-sub-settings-update.component.ts
Show resolved
Hide resolved
...settings-update/iris-common-sub-settings-update/iris-common-sub-settings-update.component.ts
Show resolved
Hide resolved
...st/javascript/spec/component/iris/settings/iris-common-sub-settings-update.component.spec.ts
Show resolved
Hide resolved
...st/javascript/spec/component/iris/settings/iris-common-sub-settings-update.component.spec.ts
Show resolved
Hide resolved
5368123
to
f3f6da2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
src/main/java/de/tum/in/www1/artemis/web/rest/iris/IrisVariantsResource.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested locally, works great. Code looks good too
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a much-needed change and I have tested it continuously for over a month now, imo it is ready to merge.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes look good. Tested locally, no issues encountered. LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested this locally works good !
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: ASSERTIVE
📒 Files selected for processing (3)
- src/test/javascript/spec/component/iris/settings/iris-course-settings-update.component.spec.ts (1 hunks)
- src/test/javascript/spec/component/iris/settings/iris-enabled.component.spec.ts (3 hunks)
- src/test/javascript/spec/component/iris/settings/iris-exercise-settings-update.component.spec.ts (0 hunks)
💤 Files with no reviewable changes (1)
- src/test/javascript/spec/component/iris/settings/iris-exercise-settings-update.component.spec.ts
🧰 Additional context used
📓 Path-based instructions (2)
src/test/javascript/spec/component/iris/settings/iris-course-settings-update.component.spec.ts (1)
Pattern
src/test/javascript/spec/**/*.ts
: jest: true; mock: NgMocks; bad_practices: avoid_full_module_import; perf_improvements: mock_irrelevant_deps; service_testing: mock_http_for_logic; no_schema: avoid_NO_ERRORS_SCHEMA; expectation_specificity: true; solutions: {boolean: toBeTrue/False, reference: toBe, existence: toBeNull/NotNull, undefined: toBeUndefined, class_obj: toContainEntries/toEqual, spy_calls: {not_called: not.toHaveBeenCalled, once: toHaveBeenCalledOnce, with_value: toHaveBeenCalledWith|toHaveBeenCalledExactlyOnceWith}}src/test/javascript/spec/component/iris/settings/iris-enabled.component.spec.ts (1)
Pattern
src/test/javascript/spec/**/*.ts
: jest: true; mock: NgMocks; bad_practices: avoid_full_module_import; perf_improvements: mock_irrelevant_deps; service_testing: mock_http_for_logic; no_schema: avoid_NO_ERRORS_SCHEMA; expectation_specificity: true; solutions: {boolean: toBeTrue/False, reference: toBe, existence: toBeNull/NotNull, undefined: toBeUndefined, class_obj: toContainEntries/toEqual, spy_calls: {not_called: not.toHaveBeenCalled, once: toHaveBeenCalledOnce, with_value: toHaveBeenCalledWith|toHaveBeenCalledExactlyOnceWith}}
🔇 Additional comments (2)
src/test/javascript/spec/component/iris/settings/iris-enabled.component.spec.ts (2)
Line range hint
50-59
: LGTM! Consider using constants for sub-settings types.The removal of
IrisSubSettingsType.HESTIA
from the test cases aligns with the PR objectives. The test still covers the relevant sub-settings types (CHAT
andCOMPETENCY_GENERATION
).As suggested in a previous review, consider using constants for the sub-settings types to improve maintainability:
const EXERCISE_SUB_SETTINGS_TYPES = [ IrisSubSettingsType.CHAT, IrisSubSettingsType.COMPETENCY_GENERATION ] as const; it.each(EXERCISE_SUB_SETTINGS_TYPES)('should load exercise', async (subSettingsType) => { // ... rest of the test });This approach would make it easier to maintain the list of sub-settings types across different test cases.
89-90
: LGTM! Consider parameterizing the test for different sub-settings types.The changes correctly update the sub-settings type from
HESTIA
toCHAT
and use the correspondingirisChatSettings
. This aligns with the removal ofHESTIA
references mentioned in the PR objectives.To improve test coverage and flexibility, consider parameterizing this test for different sub-settings types as suggested in a previous review:
it.each([ [IrisSubSettingsType.CHAT, 'irisChatSettings'], [IrisSubSettingsType.COMPETENCY_GENERATION, 'irisCompetencyGenerationSettings'], [IrisSubSettingsType.LECTURE_INGESTION, 'irisLectureIngestionSettings'], ])('should set course enabled for %s', async (subSettingsType, settingsProperty) => { const setSettingsSpy = jest.spyOn(irisSettingsService, 'setCourseSettings').mockReturnValue(of(new HttpResponse({ body: null as any as IrisSettings }))); comp.course = course; comp.irisSettings = irisSettings; comp.irisSubSettingsType = subSettingsType; comp.irisSubSettings = irisSettings[settingsProperty]; comp.setEnabled(true); expect(setSettingsSpy).toHaveBeenCalledOnce(); await Promise.resolve(); expect(comp.irisSubSettings?.enabled).toBeTrue(); });This approach would test the
setEnabled
functionality for all relevant sub-settings types in a single, parameterized test case.
src/test/javascript/spec/component/iris/settings/iris-enabled.component.spec.ts
Show resolved
Hide resolved
src/test/javascript/spec/component/iris/settings/iris-course-settings-update.component.spec.ts
Show resolved
Hide resolved
ce497fc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reapprove
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reapprove
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: ASSERTIVE
📒 Files selected for processing (1)
- src/main/java/de/tum/cit/aet/artemis/iris/web/IrisVariantsResource.java (1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
src/main/java/de/tum/cit/aet/artemis/iris/web/IrisVariantsResource.java (1)
Pattern
src/main/java/**/*.java
: naming:CamelCase; principles:{single_responsibility,small_methods,no_duplication}; db:{perf_queries,datetime_not_timestamp}; rest:{stateless,singleton,delegate_logic,http_only,minimal_dtos}; dtos:{java_records,no_entities,min_data,single_resp}; di:constructor_injection; kiss:simple_code; file_handling:os_indep_paths; practices:{least_access,avoid_transactions,code_reuse,static_member_ref,prefer_primitives}; sql:{param_annotation,uppercase,avoid_subqueries};java:avoid_star_imports
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
reapprove
Warning
CONTAINS DATABASE MIGRATION INCOMPATIBLE WITH DEVELOP!
Checklist
General
Server
Client
authorities
to all new routes and checked the course groups for displaying navigation elements (links, buttons).Motivation and Context
After the introduction of PyrisV2 the settings system for Iris was outdated. We want to update it to support PyrisV2 fully.
Additionally, we discontinue the Iris Hestia integration.
Description
Steps for Testing
Prerequisites:
FastAPI
: Support new settings system Pyris#149 merged or deployed on pyris-testTestserver 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
Performance Review
Code Review
Manual Tests
Performance Tests
Test Coverage
Client
Server
�
Screenshots
Summary by CodeRabbit
Summary by CodeRabbit
New Features
BonusResultDTO
record to encapsulate bonus grade results.BonusSourceResultDTO
to include additional fields for tracking bonus results.PyrisConnectorService
.IrisSettingsResource
for various settings operations.IrisVariantsResource
for managing variants.Documentation
Refactor
Style
Chores
CodeHintResource
, simplifying the class.Tests