-
Notifications
You must be signed in to change notification settings - Fork 301
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into feature/programming-exercises/feedback-su…
…ggestions-server # Conflicts: # src/main/java/de/tum/in/www1/artemis/repository/ProgrammingExerciseRepository.java
- Loading branch information
Showing
125 changed files
with
4,319 additions
and
1,242 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# ---------------------------------------------------------------------------------------------------------------------- | ||
# Artemis configuration overrides for the Cypress E2E Postgres setups | ||
# ---------------------------------------------------------------------------------------------------------------------- | ||
|
||
SPRING_PROFILES_ACTIVE="artemis,scheduling,localvc,localci,prod,docker" | ||
|
||
ARTEMIS_USERMANAGEMENT_USEEXTERNAL="false" | ||
ARTEMIS_VERSIONCONTROL_URL='https://localhost' | ||
ARTEMIS_VERSIONCONTROL_USER='demo' | ||
ARTEMIS_VERSIONCONTROL_PASSWORD='demo' | ||
ARTEMIS_CONTINUOUSINTEGRATION_ARTEMISAUTHENTICATIONTOKENVALUE='demo' | ||
ARTEMIS_CONTINUOUSINTEGRATION_DOCKERCONNECTIONURI='unix:///var/run/docker.sock' | ||
ARTEMIS_GIT_NAME='artemis' | ||
ARTEMIS_GIT_EMAIL='[email protected]' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
# ---------------------------------------------------------------------------------------------------------------------- | ||
# Cypress Setup MySQL | ||
# ---------------------------------------------------------------------------------------------------------------------- | ||
|
||
services: | ||
mysql: | ||
extends: | ||
file: ./mysql.yml | ||
service: mysql | ||
|
||
artemis-app: | ||
extends: | ||
file: ./artemis.yml | ||
service: artemis-app | ||
user: 0:0 | ||
depends_on: | ||
mysql: | ||
condition: service_healthy | ||
env_file: | ||
- ./artemis/config/cypress.env | ||
- ./artemis/config/cypress-local.env | ||
volumes: | ||
- /var/run/docker.sock:/var/run/docker.sock | ||
|
||
nginx: | ||
extends: | ||
file: ./nginx.yml | ||
service: nginx | ||
# the artemis-app service needs to be started, otherwise there are problems with name resolution in docker | ||
depends_on: | ||
artemis-app: | ||
condition: service_started | ||
volumes: | ||
- ./nginx/artemis-nginx-cypress.conf:/etc/nginx/conf.d/artemis-nginx-cypress.conf:ro | ||
ports: | ||
- "80:80" | ||
- "443:443" | ||
# see comments in artemis/config/cypress.env why this port is necessary | ||
- "54321:54321" | ||
|
||
artemis-cypress: | ||
extends: | ||
file: ./cypress.yml | ||
service: artemis-cypress | ||
depends_on: | ||
artemis-app: | ||
condition: service_healthy | ||
environment: | ||
CYPRESS_DB_TYPE: "Local" | ||
SORRY_CYPRESS_PROJECT_ID: "artemis-local" | ||
CYPRESS_createUsers: "true" | ||
command: sh -c "cd /app/artemis/src/test/cypress && chmod 777 /root && npm ci && npm run cypress:setup && (npm run cypress:record:local & sleep 60 && npm run cypress:record:local & wait)" | ||
|
||
networks: | ||
artemis: | ||
driver: "bridge" | ||
name: artemis | ||
volumes: | ||
artemis-mysql-data: | ||
name: artemis-mysql-data | ||
artemis-data: | ||
name: artemis-data |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
58 changes: 58 additions & 0 deletions
58
src/main/java/de/tum/in/www1/artemis/domain/iris/settings/IrisChatSubSettings.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
package de.tum.in.www1.artemis.domain.iris.settings; | ||
|
||
import javax.annotation.Nullable; | ||
import javax.persistence.*; | ||
|
||
import com.fasterxml.jackson.annotation.JsonInclude; | ||
|
||
import de.tum.in.www1.artemis.domain.iris.IrisTemplate; | ||
|
||
/** | ||
* An {@link IrisSubSettings} implementation for chat settings. | ||
* Chat settings notably provide settings for the rate limit. | ||
* Chat settings provide a single {@link IrisTemplate} for the chat messages. | ||
*/ | ||
@Entity | ||
@DiscriminatorValue("CHAT") | ||
@JsonInclude(JsonInclude.Include.NON_EMPTY) | ||
public class IrisChatSubSettings extends IrisSubSettings { | ||
|
||
@Nullable | ||
@OneToOne(cascade = CascadeType.ALL, orphanRemoval = true, fetch = FetchType.EAGER) | ||
private IrisTemplate template; | ||
|
||
@Nullable | ||
@Column(name = "rate_limit") | ||
private Integer rateLimit; | ||
|
||
@Nullable | ||
@Column(name = "rate_limit_timeframe_hours") | ||
private Integer rateLimitTimeframeHours; | ||
|
||
@Nullable | ||
public IrisTemplate getTemplate() { | ||
return template; | ||
} | ||
|
||
public void setTemplate(@Nullable IrisTemplate template) { | ||
this.template = template; | ||
} | ||
|
||
@Nullable | ||
public Integer getRateLimit() { | ||
return rateLimit; | ||
} | ||
|
||
public void setRateLimit(@Nullable Integer rateLimit) { | ||
this.rateLimit = rateLimit; | ||
} | ||
|
||
@Nullable | ||
public Integer getRateLimitTimeframeHours() { | ||
return rateLimitTimeframeHours; | ||
} | ||
|
||
public void setRateLimitTimeframeHours(@Nullable Integer rateLimitTimeframeHours) { | ||
this.rateLimitTimeframeHours = rateLimitTimeframeHours; | ||
} | ||
} |
89 changes: 89 additions & 0 deletions
89
src/main/java/de/tum/in/www1/artemis/domain/iris/settings/IrisCodeEditorSubSettings.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
package de.tum.in.www1.artemis.domain.iris.settings; | ||
|
||
import javax.annotation.Nullable; | ||
import javax.persistence.*; | ||
|
||
import com.fasterxml.jackson.annotation.JsonInclude; | ||
|
||
import de.tum.in.www1.artemis.domain.iris.IrisTemplate; | ||
|
||
/** | ||
* An {@link IrisSubSettings} implementation for code editor settings. | ||
* Code editor settings notably provide multiple {@link IrisTemplate}s for the different steps in the code generation. | ||
*/ | ||
@Entity | ||
@DiscriminatorValue("CODE_EDITOR") | ||
@SecondaryTable(name = "iris_code_editor_sub_settings") | ||
@JsonInclude(JsonInclude.Include.NON_EMPTY) | ||
public class IrisCodeEditorSubSettings extends IrisSubSettings { | ||
|
||
@Nullable | ||
@JoinColumn(table = "iris_code_editor_sub_settings") | ||
@OneToOne(cascade = CascadeType.ALL, orphanRemoval = true, fetch = FetchType.EAGER) | ||
private IrisTemplate chatTemplate; | ||
|
||
@Nullable | ||
@JoinColumn(table = "iris_code_editor_sub_settings") | ||
@OneToOne(cascade = CascadeType.ALL, orphanRemoval = true, fetch = FetchType.EAGER) | ||
private IrisTemplate problemStatementGenerationTemplate; | ||
|
||
@Nullable | ||
@JoinColumn(table = "iris_code_editor_sub_settings") | ||
@OneToOne(cascade = CascadeType.ALL, orphanRemoval = true, fetch = FetchType.EAGER) | ||
private IrisTemplate templateRepoGenerationTemplate; | ||
|
||
@Nullable | ||
@JoinColumn(table = "iris_code_editor_sub_settings") | ||
@OneToOne(cascade = CascadeType.ALL, orphanRemoval = true, fetch = FetchType.EAGER) | ||
private IrisTemplate solutionRepoGenerationTemplate; | ||
|
||
@Nullable | ||
@JoinColumn(table = "iris_code_editor_sub_settings") | ||
@OneToOne(cascade = CascadeType.ALL, orphanRemoval = true, fetch = FetchType.EAGER) | ||
private IrisTemplate testRepoGenerationTemplate; | ||
|
||
@Nullable | ||
public IrisTemplate getChatTemplate() { | ||
return chatTemplate; | ||
} | ||
|
||
public void setChatTemplate(@Nullable IrisTemplate chatTemplate) { | ||
this.chatTemplate = chatTemplate; | ||
} | ||
|
||
@Nullable | ||
public IrisTemplate getProblemStatementGenerationTemplate() { | ||
return problemStatementGenerationTemplate; | ||
} | ||
|
||
public void setProblemStatementGenerationTemplate(@Nullable IrisTemplate problemStatementGenerationTemplate) { | ||
this.problemStatementGenerationTemplate = problemStatementGenerationTemplate; | ||
} | ||
|
||
@Nullable | ||
public IrisTemplate getTemplateRepoGenerationTemplate() { | ||
return templateRepoGenerationTemplate; | ||
} | ||
|
||
public void setTemplateRepoGenerationTemplate(@Nullable IrisTemplate templateRepoGenerationTemplate) { | ||
this.templateRepoGenerationTemplate = templateRepoGenerationTemplate; | ||
} | ||
|
||
@Nullable | ||
public IrisTemplate getSolutionRepoGenerationTemplate() { | ||
return solutionRepoGenerationTemplate; | ||
} | ||
|
||
public void setSolutionRepoGenerationTemplate(@Nullable IrisTemplate solutionRepoGenerationTemplate) { | ||
this.solutionRepoGenerationTemplate = solutionRepoGenerationTemplate; | ||
} | ||
|
||
@Nullable | ||
public IrisTemplate getTestRepoGenerationTemplate() { | ||
return testRepoGenerationTemplate; | ||
} | ||
|
||
public void setTestRepoGenerationTemplate(@Nullable IrisTemplate testRepoGenerationTemplate) { | ||
this.testRepoGenerationTemplate = testRepoGenerationTemplate; | ||
} | ||
} |
72 changes: 72 additions & 0 deletions
72
src/main/java/de/tum/in/www1/artemis/domain/iris/settings/IrisCourseSettings.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
package de.tum.in.www1.artemis.domain.iris.settings; | ||
|
||
import javax.persistence.*; | ||
|
||
import com.fasterxml.jackson.annotation.JsonInclude; | ||
|
||
import de.tum.in.www1.artemis.domain.Course; | ||
|
||
/** | ||
* An {@link IrisSettings} implementation for course specific settings. | ||
* Course settings are used to override global settings and allows all sub setting types. | ||
*/ | ||
@Entity | ||
@DiscriminatorValue("COURSE") | ||
@JsonInclude(JsonInclude.Include.NON_EMPTY) | ||
public class IrisCourseSettings extends IrisSettings { | ||
|
||
@OneToOne(optional = false) | ||
@JoinColumn(name = "course_id", unique = true, nullable = false) | ||
private Course course; | ||
|
||
@OneToOne(cascade = CascadeType.ALL, orphanRemoval = true, fetch = FetchType.EAGER) | ||
@JoinColumn(name = "iris_chat_settings_id") | ||
private IrisChatSubSettings irisChatSettings; | ||
|
||
@OneToOne(cascade = CascadeType.ALL, orphanRemoval = true, fetch = FetchType.EAGER) | ||
@JoinColumn(name = "iris_hestia_settings_id") | ||
private IrisHestiaSubSettings irisHestiaSettings; | ||
|
||
@OneToOne(cascade = CascadeType.ALL, orphanRemoval = true, fetch = FetchType.EAGER) | ||
@JoinColumn(name = "iris_code_editor_settings_id") | ||
private IrisCodeEditorSubSettings irisCodeEditorSettings; | ||
|
||
@Override | ||
public boolean isValid() { | ||
return course != null; | ||
} | ||
|
||
public Course getCourse() { | ||
return course; | ||
} | ||
|
||
public void setCourse(Course course) { | ||
this.course = course; | ||
} | ||
|
||
public IrisChatSubSettings getIrisChatSettings() { | ||
return irisChatSettings; | ||
} | ||
|
||
public void setIrisChatSettings(IrisChatSubSettings irisChatSettings) { | ||
this.irisChatSettings = irisChatSettings; | ||
} | ||
|
||
public IrisHestiaSubSettings getIrisHestiaSettings() { | ||
return irisHestiaSettings; | ||
} | ||
|
||
public void setIrisHestiaSettings(IrisHestiaSubSettings irisHestiaSettings) { | ||
this.irisHestiaSettings = irisHestiaSettings; | ||
} | ||
|
||
@Override | ||
public IrisCodeEditorSubSettings getIrisCodeEditorSettings() { | ||
return irisCodeEditorSettings; | ||
} | ||
|
||
@Override | ||
public void setIrisCodeEditorSettings(IrisCodeEditorSubSettings irisCodeEditorSettings) { | ||
this.irisCodeEditorSettings = irisCodeEditorSettings; | ||
} | ||
} |
Oops, something went wrong.