-
Notifications
You must be signed in to change notification settings - Fork 4
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
Add module storage #35
Add module storage #35
Conversation
The JSON related files should be in storage/JsonAdapted*, to ensure seperation of concerns between the storage layer and the model layer
Holy cowabunga! This is a heavy PR 😮 Will get on it ASAP! 🤠 |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #35 +/- ##
============================================
- Coverage 75.10% 72.80% -2.31%
- Complexity 430 432 +2
============================================
Files 76 78 +2
Lines 1386 1434 +48
Branches 128 129 +1
============================================
+ Hits 1041 1044 +3
- Misses 314 360 +46
+ Partials 31 30 -1 ☔ View full report in Codecov by Sentry. |
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.
LGTM! Thanks for fixing my code LOL. Maybe taufiq can look thru first as well then merge since its good to read thru before doing his part i feel.
There isn't anything particularly wrong with the way you did, its how I would have done in almost any other project. In this project, they are very explicit with their separation between the Model and Storage, and thus, the code is extremely verbose as seen above. There are benefits to doing it like this, for example, when you'll be implementing the student <-> module integration. We can have completely different representations at the Model Layer as compared to the Storage Layer. Whereas if the JSON structures was embedded in the Model and Student, it would be very hard to separate the storage representation and the Model representation of our data. |
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.
lgtm
WIP PR to add module storage. This works by
JsonModuleMapStorage
which handles reading the JSON file from within the resourcesModuleCode
toModule
.JsonAdaptedModule
andModule
Closes #32
Closes #23