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: Restructure server code completely into modules #9307

Merged
merged 45 commits into from
Sep 12, 2024
Merged
Show file tree
Hide file tree
Changes from 41 commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
deb4e07
change package path for Java and resources from de.tum.in.www1.artemi…
krusche Sep 11, 2024
aac0b84
update package path in IntelliJ files
krusche Sep 11, 2024
caa1926
initial split into modules
krusche Sep 11, 2024
20964e4
move repository files into modules
krusche Sep 11, 2024
9462ce6
Migrate slash-separated paths from in.www1.artemis to cit.ww1.artemis
ole-ve Sep 11, 2024
9cf2603
move domain classes into modules (part 1)
krusche Sep 11, 2024
c35d8fb
move domain classes into modules (part 2)
krusche Sep 11, 2024
e492290
Fix domain/dto package path in repository classes
ole-ve Sep 11, 2024
a0a73ce
Temporarily adjust architecture tests
MaximilianAnzinger Sep 11, 2024
ff02f25
move services into modules (part 1)
krusche Sep 11, 2024
bffecad
move services into modules (part 2)
krusche Sep 11, 2024
615666f
fix test compile issues due to package private
krusche Sep 11, 2024
043991e
fix issue with dto in query
krusche Sep 11, 2024
2c3aef9
Move web layer (part 1, WIP)
ole-ve Sep 11, 2024
957f39e
move services into modules (part 2)
krusche Sep 11, 2024
93fc94c
remove unwanted changes and fix imports
krusche Sep 11, 2024
36e4fc8
Move web layer (part 2)
ole-ve Sep 11, 2024
532a861
Autowire UserTestRepository
ole-ve Sep 11, 2024
9634036
Temporarily scan different package for repositories
ole-ve Sep 11, 2024
d1ecab7
Change exception path in test file
ole-ve Sep 11, 2024
92f0e46
move services into modules (part 3), also fix some web resource locat…
krusche Sep 11, 2024
07aed98
fix DTO references in repositories
krusche Sep 11, 2024
baac238
move files to their respective service
krusche Sep 11, 2024
2307855
remove unrelated file
krusche Sep 11, 2024
98b6a6f
remove unused field in test
krusche Sep 11, 2024
b419e14
fix issues with lti files spread in different modules
krusche Sep 11, 2024
08b6b16
use iris profile consistently, add missing repository annotations
krusche Sep 11, 2024
c8a6a29
use athena profile consistently
krusche Sep 11, 2024
1cea424
use apollon profile consistently
krusche Sep 11, 2024
61e529f
fix base package in DatabaseConfiguration
krusche Sep 11, 2024
17c5cb5
make LTI code optional in ExerciseService
krusche Sep 11, 2024
60c5073
Adjust architecture tests
MaximilianAnzinger Sep 11, 2024
767dd14
Move test repositories into second package
MaximilianAnzinger Sep 11, 2024
c30530a
Merge branch 'chore/restructure-server' of https://github.com/ls1intu…
MaximilianAnzinger Sep 11, 2024
2ada39c
use profile constants
krusche Sep 11, 2024
79e94e0
move online course configuration repository to tests
krusche Sep 11, 2024
0a613cd
define base repo baths explicitly
krusche Sep 11, 2024
0916b9e
Avoid confusion when scanning for Ldap repositories
krusche Sep 12, 2024
6402571
fix test configuration issues
krusche Sep 12, 2024
4f16982
fix another issue due to missing LTI profile
krusche Sep 12, 2024
40a43b6
fix more server tests
krusche Sep 12, 2024
39cf7ae
fix a naming conflict
krusche Sep 12, 2024
60e21f2
Fix ObjectMethodTest
MaximilianAnzinger Sep 12, 2024
220a5b8
Merge branch 'chore/restructure-server' of https://github.com/ls1intu…
MaximilianAnzinger Sep 12, 2024
ef96ce9
Remove unused code
MaximilianAnzinger Sep 12, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .idea/runConfigurations/Artemis__BuildAgent_.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/runConfigurations/Artemis__Server_.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/runConfigurations/Artemis__Server__Aeolus_.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/runConfigurations/Artemis__Server___Client_.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ plugins {
id "com.adarshr.test-logger" version "4.0.0"
}

group = "de.tum.in.www1.artemis"
group = "de.tum.cit.aet.artemis"
version = "7.5.3"
description = "Interactive Learning with Individual Feedback"

Expand Down Expand Up @@ -103,7 +103,7 @@ spotless {
defaultTasks "bootRun"

springBoot {
mainClass = "de.tum.in.www1.artemis.ArtemisApp"
mainClass = "de.tum.cit.aet.artemis.ArtemisApp"
}

modernizer {
Expand Down
2 changes: 1 addition & 1 deletion docs/dev/guidelines/criteria-builder.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ In order to use Criteria Builder and benefit from Specifications, we need to adj
@Generated(value = "org.hibernate.jpamodelgen.JPAMetaModelEntityProcessor")
@StaticMetamodel(User.class)
public abstract class User_ extends de.tum.in.www1.artemis.domain.AbstractAuditingEntity_ {
public abstract class User_ extends de.tum.cit.aet.artemis.domain.AbstractAuditingEntity_ {
public static volatile SingularAttribute<User, String> lastName;
public static volatile SingularAttribute<User, Instant> resetDate;
Expand Down
2 changes: 1 addition & 1 deletion docs/dev/guidelines/database.rst
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ Solutions for known issues

There is a problem with the way you save the associated objects. You must follow this procedure:

#. Save the child entity (e.g., `Feedback <https://github.com/ls1intum/Artemis/blob/develop/src/main/java/de/tum/in/www1/artemis/domain/Feedback.java>`_) without connection to the parent entity (e.g., `Result <https://github.com/ls1intum/Artemis/blob/develop/src/main/java/de/tum/in/www1/artemis/domain/Result.java>`_)
#. Save the child entity (e.g., `Feedback <https://github.com/ls1intum/Artemis/blob/develop/src/main/java/de/tum/cit/aet/artemis/domain/Feedback.java>`_) without connection to the parent entity (e.g., `Result <https://github.com/ls1intum/Artemis/blob/develop/src/main/java/de/tum/cit/aet/artemis/domain/Result.java>`_)
#. Add back the connection of the child entity to the parent entity.
#. Save the parent entity.
#. Always use the returned value after saving the entity, see: ``feedback = feedbackRepository.save(feedback);``
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ skinparam class {
ArrowColor black
}
!pragma useIntermediatePackages false
package "src.main.java.de.tum.in.www1.artemis.repository" {
package "src.main.java.de.tum.cit.aet.artemis.repository" {
interface FileUploadExerciseRepository {
save(FileUploadExerciseRepository): FileUploadExerciseRepository
}
}
package "src.test.java.de.tum.in.www1.artemis.exercise" {
package "src.test.java.de.tum.cit.aet.artemis.exercise" {
class ExerciseTestFactory {
+ {static} populateExercise(Exercise, [...]): Exercise
+ {static} populateExerciseForExam(Exercise, [...]): Exercise
Expand Down
2 changes: 1 addition & 1 deletion docs/dev/guidelines/server-tests.rst
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ the name of the test group (matching the ``abstract`` base class name) as a para
@Execution(ExecutionMode.CONCURRENT)
@ResourceLock("AbstractSpringIntegrationIndependentTest")
@AutoConfigureEmbeddedDatabase
@ActiveProfiles({ SPRING_PROFILE_TEST, "artemis", PROFILE_SCHEDULING, "lti" })
@ActiveProfiles({ SPRING_PROFILE_TEST, PROFILE_ARTEMIS, PROFILE_SCHEDULING, PROFILE_IRIS })
@TestPropertySource(properties = { "artemis.user-management.use-external=false" })
public abstract class AbstractSpringIntegrationIndependentTest extends AbstractArtemisIntegrationTest { ... }
Expand Down
4 changes: 2 additions & 2 deletions docs/dev/setup/server.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Server Setup
To start the Artemis application server from the development
environment, first import the project into IntelliJ and then make sure
to install the Spring Boot plugins to run the main class
``de.tum.in.www1.artemis.ArtemisApp``. Before the application runs, you
``de.tum.cit.aet.artemis.ArtemisApp``. Before the application runs, you
have to change some configuration options.
You can change the options directly in the file ``application-artemis.yml`` in the folder
``src/main/resources/config``. However, you have to be careful that you do not
Expand Down Expand Up @@ -214,7 +214,7 @@ Run the server with Spring Boot and Spring profiles
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

The Artemis server should startup by running the main class
``de.tum.in.www1.artemis.ArtemisApp`` using Spring Boot.
``de.tum.cit.aet.artemis.ArtemisApp`` using Spring Boot.

.. note::
Artemis uses Spring profiles to segregate parts of the
Expand Down
2 changes: 1 addition & 1 deletion gradle/war.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apply plugin: "war"

bootWar {
mainClass = 'de.tum.in.www1.artemis.ArtemisApp'
mainClass = 'de.tum.cit.aet.artemis.ArtemisApp'
includes = ["WEB-INF/**", "META-INF/**"]
webXml = file("${project.rootDir}/src/main/webapp/WEB-INF/web.xml")
manifest {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package de.tum.in.www1.artemis;
package de.tum.cit.aet.artemis;

import java.net.InetAddress;
import java.net.UnknownHostException;
Expand All @@ -18,8 +18,8 @@
import org.springframework.boot.info.GitProperties;
import org.springframework.core.env.Environment;

import de.tum.in.www1.artemis.config.ProgrammingLanguageConfiguration;
import de.tum.in.www1.artemis.config.TheiaConfiguration;
import de.tum.cit.aet.artemis.core.config.ProgrammingLanguageConfiguration;
import de.tum.cit.aet.artemis.core.config.TheiaConfiguration;
import tech.jhipster.config.DefaultProfileUtil;
import tech.jhipster.config.JHipsterConstants;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package de.tum.in.www1.artemis.service.listeners;
package de.tum.cit.aet.artemis.assessment;

import static de.tum.in.www1.artemis.config.Constants.PROFILE_CORE;
import static de.tum.cit.aet.artemis.core.config.Constants.PROFILE_CORE;

import jakarta.persistence.PostPersist;
import jakarta.persistence.PostUpdate;
Expand All @@ -11,13 +11,14 @@
import org.springframework.context.annotation.Profile;
import org.springframework.stereotype.Component;

import de.tum.in.www1.artemis.domain.Result;
import de.tum.in.www1.artemis.domain.participation.StudentParticipation;
import de.tum.in.www1.artemis.service.messaging.InstanceMessageSendService;
import de.tum.in.www1.artemis.service.scheduled.ParticipantScoreScheduleService;
import de.tum.cit.aet.artemis.assessment.domain.ParticipantScore;
import de.tum.cit.aet.artemis.assessment.domain.Result;
import de.tum.cit.aet.artemis.assessment.service.ParticipantScoreScheduleService;
import de.tum.cit.aet.artemis.core.service.messaging.InstanceMessageSendService;
import de.tum.cit.aet.artemis.exercise.domain.participation.StudentParticipation;

/**
* Listener for updates on {@link Result} entities to update the {@link de.tum.in.www1.artemis.domain.scores.ParticipantScore}.
* Listener for updates on {@link Result} entities to update the {@link ParticipantScore}.
*
* @see ParticipantScoreScheduleService
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package de.tum.in.www1.artemis.domain;
package de.tum.cit.aet.artemis.assessment.domain;

import java.time.Instant;

Expand All @@ -16,6 +16,9 @@
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;

import de.tum.cit.aet.artemis.core.domain.DomainObject;
import de.tum.cit.aet.artemis.core.domain.User;

/**
* Represents an internal assessment note.
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package de.tum.in.www1.artemis.domain.enumeration;
package de.tum.cit.aet.artemis.assessment.domain;

/**
* The AssessmentType enumeration.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package de.tum.in.www1.artemis.domain;
package de.tum.cit.aet.artemis.assessment.domain;

import jakarta.persistence.Column;
import jakarta.persistence.Entity;
Expand All @@ -13,6 +13,8 @@
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;

import de.tum.cit.aet.artemis.core.domain.DomainObject;

/**
* A bonus source for an exam that maps bonus from another course or exam to the target exam
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@

package de.tum.in.www1.artemis.domain;
package de.tum.cit.aet.artemis.assessment.domain;

import static de.tum.in.www1.artemis.service.util.RoundingUtil.roundScoreSpecifiedByCourseSettings;
import static de.tum.cit.aet.artemis.core.util.RoundingUtil.roundScoreSpecifiedByCourseSettings;

import org.apache.commons.lang3.NotImplementedException;

import de.tum.in.www1.artemis.repository.GradingScaleRepository;
import de.tum.in.www1.artemis.web.rest.dto.BonusExampleDTO;
import de.tum.in.www1.artemis.web.rest.errors.BadRequestAlertException;
import de.tum.cit.aet.artemis.assessment.dto.BonusExampleDTO;
import de.tum.cit.aet.artemis.assessment.repository.GradingScaleRepository;
import de.tum.cit.aet.artemis.core.exception.BadRequestAlertException;

public enum BonusStrategy implements IBonusStrategy {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package de.tum.in.www1.artemis.domain.enumeration;
package de.tum.cit.aet.artemis.assessment.domain;

/**
* Enumeration for category states used by StaticCodeAnalysisCategory
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package de.tum.in.www1.artemis.domain;
package de.tum.cit.aet.artemis.assessment.domain;

import static de.tum.in.www1.artemis.config.Constants.COMPLAINT_TEXT_LIMIT;
import static de.tum.cit.aet.artemis.core.config.Constants.COMPLAINT_TEXT_LIMIT;

import java.time.ZonedDateTime;
import java.util.Optional;
Expand All @@ -22,8 +22,10 @@
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;

import de.tum.in.www1.artemis.domain.enumeration.ComplaintType;
import de.tum.in.www1.artemis.domain.participation.Participant;
import de.tum.cit.aet.artemis.core.domain.DomainObject;
import de.tum.cit.aet.artemis.core.domain.User;
import de.tum.cit.aet.artemis.exercise.domain.Team;
import de.tum.cit.aet.artemis.exercise.domain.participation.Participant;

/**
* A Complaint.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package de.tum.in.www1.artemis.domain;
package de.tum.cit.aet.artemis.assessment.domain;

import static de.tum.in.www1.artemis.config.Constants.COMPLAINT_LOCK_DURATION_IN_MINUTES;
import static de.tum.in.www1.artemis.config.Constants.COMPLAINT_RESPONSE_TEXT_LIMIT;
import static de.tum.cit.aet.artemis.core.config.Constants.COMPLAINT_LOCK_DURATION_IN_MINUTES;
import static de.tum.cit.aet.artemis.core.config.Constants.COMPLAINT_RESPONSE_TEXT_LIMIT;

import java.time.ZoneOffset;
import java.time.ZonedDateTime;
Expand All @@ -21,6 +21,9 @@
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;

import de.tum.cit.aet.artemis.core.domain.AbstractAuditingEntity;
import de.tum.cit.aet.artemis.core.domain.User;

/**
* A ComplaintResponse.
* <p>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package de.tum.in.www1.artemis.domain.enumeration;
package de.tum.cit.aet.artemis.assessment.domain;

public enum ComplaintType {
COMPLAINT, MORE_FEEDBACK
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package de.tum.in.www1.artemis.domain;
package de.tum.cit.aet.artemis.assessment.domain;

import java.util.HashSet;
import java.util.Set;
Expand All @@ -18,7 +18,9 @@
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;

import de.tum.in.www1.artemis.domain.participation.TutorParticipation;
import de.tum.cit.aet.artemis.core.domain.DomainObject;
import de.tum.cit.aet.artemis.exercise.domain.Exercise;
import de.tum.cit.aet.artemis.exercise.domain.Submission;

/**
* A ExampleSubmission.
Expand Down
Loading
Loading