Skip to content

Commit 3da297d

Browse files
Merge branch 'develop' into feature/exam-mode/seating-distribution-algorithm
2 parents 1a18996 + c926613 commit 3da297d

35 files changed

+1048
-798
lines changed

gradle/jacoco.gradle

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
ext {
22
// TODO: this should become 90% for INSTRUCTION and 0 for CLASS
3-
AggregatedCoverageThresholds = ["INSTRUCTION": 0.865, "CLASS": 119]
3+
//This also needs to be lowered if we merge nebula PRs
4+
AggregatedCoverageThresholds = ["INSTRUCTION": 0.865, "CLASS": 123]
45
// TODO: each module should achieve 90% for INSTRUCTION and 0 for CLASS
56
ModuleCoverageThresholds = [
67
"assessment" : ["INSTRUCTION": 0.926, "CLASS": 0],
@@ -22,6 +23,8 @@ ext {
2223
"quiz" : ["INSTRUCTION": 0.906, "CLASS": 2],
2324
"text" : ["INSTRUCTION": 0.947, "CLASS": 1],
2425
"tutorialgroup" : ["INSTRUCTION": 0.915, "CLASS": 1],
26+
//Adjust this after we merge the corresponding PRs
27+
"nebula" : ["INSTRUCTION": 0.000, "CLASS": 6],
2528
]
2629
// If no explicit modules defined -> generate reports and validate for each module
2730
reportedModules = includedModules.size() == 0

jest.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ module.exports = {
9797
statements: 89.66,
9898
branches: 75.85,
9999
functions: 83.68,
100-
lines: 89.73 ,
100+
lines: 89.73,
101101
},
102102
},
103103
// 'json-summary' reporter is used by supporting_scripts/code-coverage/module-coverage-client/check-client-module-coverage.mjs

package-lock.json

Lines changed: 528 additions & 742 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 34 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -13,31 +13,31 @@
1313
"node_modules"
1414
],
1515
"dependencies": {
16-
"@angular/animations": "20.3.2",
17-
"@angular/cdk": "20.2.5",
18-
"@angular/common": "20.3.2",
19-
"@angular/compiler": "20.3.2",
20-
"@angular/core": "20.3.2",
21-
"@angular/forms": "20.3.2",
22-
"@angular/localize": "20.3.2",
23-
"@angular/material": "20.2.5",
24-
"@angular/platform-browser": "20.3.2",
25-
"@angular/platform-browser-dynamic": "20.3.2",
26-
"@angular/router": "20.3.2",
27-
"@angular/service-worker": "20.3.2",
16+
"@angular/animations": "20.3.3",
17+
"@angular/cdk": "20.2.7",
18+
"@angular/common": "20.3.3",
19+
"@angular/compiler": "20.3.3",
20+
"@angular/core": "20.3.3",
21+
"@angular/forms": "20.3.3",
22+
"@angular/localize": "20.3.3",
23+
"@angular/material": "20.2.7",
24+
"@angular/platform-browser": "20.3.3",
25+
"@angular/platform-browser-dynamic": "20.3.3",
26+
"@angular/router": "20.3.3",
27+
"@angular/service-worker": "20.3.3",
2828
"@ctrl/ngx-emoji-mart": "9.3.0",
2929
"@danielmoncada/angular-datetime-picker": "20.0.0",
3030
"@fingerprintjs/fingerprintjs": "4.6.2",
3131
"@fortawesome/angular-fontawesome": "3.0.0",
32-
"@fortawesome/fontawesome-svg-core": "7.0.1",
33-
"@fortawesome/free-regular-svg-icons": "7.0.1",
34-
"@fortawesome/free-solid-svg-icons": "7.0.1",
32+
"@fortawesome/fontawesome-svg-core": "7.1.0",
33+
"@fortawesome/free-regular-svg-icons": "7.1.0",
34+
"@fortawesome/free-solid-svg-icons": "7.1.0",
3535
"@ls1intum/apollon": "3.4.3",
3636
"@ng-bootstrap/ng-bootstrap": "19.0.1",
3737
"@ngx-translate/core": "16.0.4",
3838
"@ngx-translate/http-loader": "16.0.1",
3939
"@primeuix/themes": "1.2.5",
40-
"@sentry/angular": "10.16.0",
40+
"@sentry/angular": "10.17.0",
4141
"@siemens/ngx-datatable": "24.3.0",
4242
"@swimlane/ngx-charts": "23.0.1",
4343
"@swimlane/ngx-graph": "11.0.0",
@@ -47,7 +47,7 @@
4747
"dayjs": "1.11.18",
4848
"diff-match-patch-typescript": "1.1.2",
4949
"dompurify": "3.2.7",
50-
"emoji-js": "3.8.1",
50+
"emoji-js": "3.9.0",
5151
"export-to-csv": "1.4.0",
5252
"fast-json-patch": "3.1.1",
5353
"franc-min": "6.2.0",
@@ -86,15 +86,15 @@
8686
"express": "5.1.0",
8787
"globals": "16.4.0",
8888
"jsdom": "26.1.0",
89-
"katex": "0.16.22",
89+
"katex": "0.16.23",
9090
"postcss": "8.5.6",
9191
"punycode": "2.3.1",
9292
"rimraf": "6.0.1",
9393
"semver": "7.7.2",
9494
"tmp": "0.2.5",
9595
"tough-cookie": "6.0.0",
96-
"vite": "7.1.7",
97-
"webpack": "5.101.3",
96+
"vite": "7.1.9",
97+
"webpack": "5.102.0",
9898
"webpack-dev-middleware": "7.4.5",
9999
"webpack-dev-server": "5.2.2",
100100
"word-wrap": "1.2.5",
@@ -103,30 +103,30 @@
103103
},
104104
"devDependencies": {
105105
"@angular-builders/jest": "20.0.0",
106-
"@angular-devkit/build-angular": "20.3.3",
106+
"@angular-devkit/build-angular": "20.3.4",
107107
"@angular-eslint/builder": "20.3.0",
108108
"@angular-eslint/eslint-plugin": "20.3.0",
109109
"@angular-eslint/schematics": "20.3.0",
110110
"@angular-eslint/template-parser": "20.3.0",
111-
"@angular/build": "20.3.3",
112-
"@angular/cli": "20.3.3",
113-
"@angular/compiler-cli": "20.3.2",
114-
"@angular/language-service": "20.3.2",
115-
"@sentry/types": "10.16.0",
111+
"@angular/build": "20.3.4",
112+
"@angular/cli": "20.3.4",
113+
"@angular/compiler-cli": "20.3.3",
114+
"@angular/language-service": "20.3.3",
115+
"@sentry/types": "10.17.0",
116116
"@types/d3-shape": "3.1.7",
117117
"@types/emoji-js": "3.5.2",
118118
"@types/jest": "29.5.14",
119119
"@types/lodash-es": "4.17.12",
120120
"@types/markdown-it": "14.1.2",
121-
"@types/node": "24.5.2",
121+
"@types/node": "24.6.2",
122122
"@types/pako": "2.0.4",
123123
"@types/papaparse": "5.3.16",
124124
"@types/turndown": "5.0.5",
125-
"@typescript-eslint/eslint-plugin": "8.44.1",
126-
"@typescript-eslint/parser": "8.44.1",
127-
"@typescript-eslint/utils": "8.44.1",
125+
"@typescript-eslint/eslint-plugin": "8.45.0",
126+
"@typescript-eslint/parser": "8.45.0",
127+
"@typescript-eslint/utils": "8.45.0",
128128
"angular-eslint": "20.3.0",
129-
"cross-env": "10.0.0",
129+
"cross-env": "10.1.0",
130130
"eslint": "9.36.0",
131131
"eslint-plugin-jest": "29.0.1",
132132
"eslint-plugin-jest-extended": "3.0.1",
@@ -148,13 +148,13 @@
148148
"prettier": "3.6.2",
149149
"rimraf": "6.0.1",
150150
"sass": "1.93.2",
151-
"stylelint": "16.24.0",
151+
"stylelint": "16.25.0",
152152
"stylelint-config-html": "1.1.0",
153153
"stylelint-config-standard": "39.0.0",
154154
"stylelint-config-standard-scss": "16.0.0",
155155
"stylelint-scss": "6.12.1",
156-
"typescript": "5.9.2",
157-
"typescript-eslint": "8.44.1"
156+
"typescript": "5.9.3",
157+
"typescript-eslint": "8.45.0"
158158
},
159159
"engines": {
160160
"node": ">=24.7.0",

src/main/java/de/tum/cit/aet/artemis/core/config/ArtemisConfigHelper.java

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import static de.tum.cit.aet.artemis.core.config.Constants.ATLAS_ENABLED_PROPERTY_NAME;
44
import static de.tum.cit.aet.artemis.core.config.Constants.EXAM_ENABLED_PROPERTY_NAME;
55
import static de.tum.cit.aet.artemis.core.config.Constants.HYPERION_ENABLED_PROPERTY_NAME;
6+
import static de.tum.cit.aet.artemis.core.config.Constants.NEBULA_ENABLED_PROPERTY_NAME;
67
import static de.tum.cit.aet.artemis.core.config.Constants.PASSKEY_ENABLED_PROPERTY_NAME;
78

89
import org.springframework.core.env.Environment;
@@ -84,6 +85,16 @@ public boolean isTutorialGroupEnabled(Environment environment) {
8485
return getPropertyOrExitArtemis(Constants.TUTORIAL_GROUP_ENABLED_PROPERTY_NAME, environment);
8586
}
8687

88+
/**
89+
* Check if the Nebula module is enabled.
90+
*
91+
* @param environment the Spring environment
92+
* @return true if the Nebula module is enabled, false otherwise
93+
*/
94+
public boolean isNebulaEnabled(Environment environment) {
95+
return getPropertyOrExitArtemis(NEBULA_ENABLED_PROPERTY_NAME, environment);
96+
}
97+
8798
private boolean getPropertyOrExitArtemis(String key, Environment environment) {
8899
Boolean value = environment.getProperty(key, Boolean.class);
89100
if (value == null) {

src/main/java/de/tum/cit/aet/artemis/core/config/Constants.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -420,6 +420,11 @@ public final class Constants {
420420
*/
421421
public static final String MODULE_FEATURE_TUTORIALGROUP = "tutorialgroup";
422422

423+
/**
424+
* The name of the module feature used for nebula functionality.
425+
*/
426+
public static final String MODULE_FEATURE_NEBULA = "nebula";
427+
423428
/**
424429
* The name of the property used to enable or disable Atlas functionality.
425430
*/
@@ -455,6 +460,11 @@ public final class Constants {
455460
*/
456461
public static final String PASSKEY_ENABLED_PROPERTY_NAME = "artemis.user-management.passkey.enabled";
457462

463+
/**
464+
* The name of the property used to enable or disable nebula functionalities.
465+
*/
466+
public static final String NEBULA_ENABLED_PROPERTY_NAME = "artemis.nebula.enabled";
467+
458468
/**
459469
* The name of the property used to define the directories for file uploads.
460470
*/

src/main/java/de/tum/cit/aet/artemis/core/config/ModuleFeatureInfoContributor.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,9 @@ public void contribute(Info.Builder builder) {
6060
if (artemisConfigHelper.isPasskeyEnabled(environment)) {
6161
enabledArtemisFeatures.add(Constants.FEATURE_PASSKEY);
6262
}
63+
if (artemisConfigHelper.isNebulaEnabled(environment)) {
64+
enabledArtemisFeatures.add(Constants.MODULE_FEATURE_NEBULA);
65+
}
6366
builder.withDetail(ACTIVE_MODULE_FEATURES, enabledArtemisFeatures);
6467
}
6568
}

src/main/java/de/tum/cit/aet/artemis/core/config/RestTemplateConfiguration.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
import jakarta.validation.constraints.NotNull;
1212

1313
import org.springframework.context.annotation.Bean;
14+
import org.springframework.context.annotation.Conditional;
1415
import org.springframework.context.annotation.Configuration;
1516
import org.springframework.context.annotation.Lazy;
1617
import org.springframework.context.annotation.Primary;
@@ -24,6 +25,7 @@
2425

2526
import de.tum.cit.aet.artemis.athena.config.AthenaAuthorizationInterceptor;
2627
import de.tum.cit.aet.artemis.iris.config.PyrisAuthorizationInterceptor;
28+
import de.tum.cit.aet.artemis.nebula.config.NebulaEnabled;
2729
import de.tum.cit.aet.artemis.programming.service.jenkins.JenkinsAuthorizationInterceptor;
2830

2931
/**
@@ -118,6 +120,12 @@ public RestTemplate shortTimeoutPyrisRestTemplate(PyrisAuthorizationInterceptor
118120
return initializeRestTemplateWithInterceptors(pyrisAuthorizationInterceptor, createShortTimeoutRestTemplate());
119121
}
120122

123+
@Bean
124+
@Conditional(NebulaEnabled.class)
125+
public RestTemplate nebulaRestTemplate() {
126+
return createRestTemplate();
127+
}
128+
121129
/**
122130
* Creates a RestTemplate that can be used to communicate with Aeolus
123131
*
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
package de.tum.cit.aet.artemis.nebula.config;
2+
3+
import org.springframework.context.annotation.Condition;
4+
import org.springframework.context.annotation.ConditionContext;
5+
import org.springframework.core.type.AnnotatedTypeMetadata;
6+
7+
import de.tum.cit.aet.artemis.core.config.ArtemisConfigHelper;
8+
9+
/**
10+
* Condition to check if the Nebula module is enabled.
11+
* Based on this condition, Spring components concerning nebula functionality can be enabled or disabled.
12+
*/
13+
public class NebulaEnabled implements Condition {
14+
15+
private final ArtemisConfigHelper artemisConfigHelper;
16+
17+
public NebulaEnabled() {
18+
this.artemisConfigHelper = new ArtemisConfigHelper();
19+
}
20+
21+
@Override
22+
public boolean matches(ConditionContext context, AnnotatedTypeMetadata metadata) {
23+
return artemisConfigHelper.isNebulaEnabled(context.getEnvironment());
24+
}
25+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
package de.tum.cit.aet.artemis.nebula.exception;
2+
3+
public class NebulaConnectorException extends RuntimeException {
4+
5+
public NebulaConnectorException(String message) {
6+
super(message);
7+
}
8+
}

0 commit comments

Comments
 (0)