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

feat: add module timing storage #53

Merged
merged 5 commits into from
Mar 27, 2024
Merged

Conversation

blaukc
Copy link

@blaukc blaukc commented Mar 25, 2024

Adds the json adapted things for module storage. Mostly copypasting and refactoring after changing the Student constructor.

Will rebase and change target branch to master once the other PR is reviewed and merged

Closes: #49

@blaukc blaukc added this to the v1.3 milestone Mar 25, 2024
Copy link

codecov bot commented Mar 25, 2024

Codecov Report

Attention: Patch coverage is 43.39623% with 30 lines in your changes are missing coverage. Please review.

Project coverage is 65.18%. Comparing base (1f4e3cc) to head (0e453ec).

Files Patch % Lines
...seedu/address/storage/JsonAdaptedModuleTiming.java 0.00% 17 Missing ⚠️
.../java/seedu/address/model/util/SampleDataUtil.java 0.00% 6 Missing ⚠️
...main/java/seedu/address/model/student/Student.java 57.14% 1 Missing and 2 partials ⚠️
...java/seedu/address/storage/JsonAdaptedStudent.java 78.57% 2 Missing and 1 partial ⚠️
...java/seedu/address/logic/commands/EditCommand.java 87.50% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master      #53      +/-   ##
============================================
- Coverage     65.67%   65.18%   -0.50%     
- Complexity      433      434       +1     
============================================
  Files            86       87       +1     
  Lines          1620     1660      +40     
  Branches        150      154       +4     
============================================
+ Hits           1064     1082      +18     
- Misses          521      540      +19     
- Partials         35       38       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

@AdityaB4 AdityaB4 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🚀

You can consider force pushing with a different commit message if you'd like, I believe commit message quality might be manually reviewed.

Comment on lines 37 to 40
*/
public Student(Name name, Phone phone, Email email, Address address, Set<Tag> tags, List<ModuleCode> modules) {
public Student(Name name, Phone phone, Email email, Address address, Set<Tag> tags, List<ModuleCode> modules,
List<ModuleTiming> moduleTimings) {
requireAllNonNull(name, phone, email, address, tags);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it be useful to instead have a Module that encapsulates ModuleCode and ModuleTiming. I think this approach might make more sense since the student object does not need to interact with ModuleCode and ModuleTiming directly, and can instead operate at a higher level of abstraction with just a list for Module.

We can consider doing this as a quality improvement in the next iteration!

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was thinking about that too but I realised that we only instantiate each Module once and store them all inside the ModuleMap, which was why I didn't put ModuleTiming under Module.

@blaukc blaukc changed the base branch from brandon/add-module-timing to master March 27, 2024 04:38
@blaukc blaukc force-pushed the brandon/add-module-timing-storage branch from d38e0a3 to 0e453ec Compare March 27, 2024 04:41
@blaukc blaukc merged commit b5af1f7 into master Mar 27, 2024
2 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add ModuleTiming class to Module
2 participants