-
Notifications
You must be signed in to change notification settings - Fork 294
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
: Add science events to user data export
#8861
Conversation
Adds new DataExportScienceEventService. Ammends DataExportCreationService and ScienceEventRepository with necessary functionality
Tests if necessary CSV is present.
0d68c78
to
30bb32d
Compare
WalkthroughThe changes introduce functionality to export collected science events as part of user data. This includes new methods in repository, service, and test classes to handle the creation and processing of science event data. Additionally, scheduling logic for data exports is updated to reflect a new cron expression. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant DataExportController
participant DataExportCreationService
participant ScienceEventRepository
participant DataExportScienceEventService
User->>DataExportController: Request Data Export
DataExportController->>DataExportCreationService: Create Data Export
DataExportCreationService->>ScienceEventRepository: findAllByIdentity(userLogin)
ScienceEventRepository-->>DataExportCreationService: Set<ScienceEvent>
DataExportCreationService->>DataExportScienceEventService: createScienceEventExport(userLogin, workingDirectory)
DataExportScienceEventService->>DataExportCreationService: ScienceEvent CSV File
DataExportCreationService-->>User: ZIP file with user data including Science Event CSV
Assessment against linked issues
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? TipsChatThere are 3 ways to chat with CodeRabbit:
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 as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
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
src/test/java/de/tum/in/www1/artemis/service/DataExportCreationServiceTest.java
Outdated
Show resolved
Hide resolved
src/test/java/de/tum/in/www1/artemis/service/DataExportCreationServiceTest.java
Outdated
Show resolved
Hide resolved
src/main/java/de/tum/in/www1/artemis/service/export/DataExportScienceEventService.java
Outdated
Show resolved
Hide resolved
src/test/java/de/tum/in/www1/artemis/exercise/ExerciseUtilService.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.
Your test only test if there exists a science event file in the export, but it does not verify its content. Please also test that the events actually get correctly exported.
c3aa0a2
to
8723a0a
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: 3
src/test/java/de/tum/in/www1/artemis/service/DataExportCreationServiceTest.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.
Code
There is no privacy policy deployed on the testservers. Therfore when trying to load the policy a not found error is thrown. The data export should still be available. |
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.
Code
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.
code lgtm (if you change back the cron schedule)
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 on TS3, works as described
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 as expected (one could change the notifications in a follow up PR if one has already done an export and can't do another one)
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.
Approved,
Todo: revert cron schedule.
1f873cc
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.
Reverted cron schedule
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 Test
General
: Add science events to user data exportDevelopment
: Add science events to user data export
Checklist
General
Server
Motivation and Context
Due to GDPR regulations, all personal data has to be made available to the end user if requested. This was not the case for the science events collected.
Description
This PR adds a new
DataExportScienceEventService
responsible for exporting all science events associated with a user.All science events are exported as a single csv containing a timestamp, an event type and the associated resource.
Closes #8655
Steps for Testing
Prerequisites:
DataExportScheduleService
have to be commented out or removed.Data Export
Request Data Export
Request Data Export
Download data export
science_ecents.csv
coincide with the times noted down.Testserver 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
Test Coverage
Summary by CodeRabbit
New Features
Bug Fixes
Tests