{"action":"created","comment":{"url":"https://api.github.com/repos/AY1920S1-CS2103T-T09-2/main/pulls/comments/334218573","pull_request_review_id":300983381,"id":334218573,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDMzNDIxODU3Mw==","diff_hunk":"@@ -75,22 +80,38 @@ public void init() throws Exception {\n      */\n     private Model initModelManager(Storage storage, ReadOnlyUserPrefs userPrefs) {\n         Optional<ReadOnlyExerciseBook> exerciseBookOptional;\n-        ReadOnlyExerciseBook initialData;\n+        ReadOnlyExerciseBook initialExerciseData;\n+        Optional<ReadOnlyRegimeBook> regimeBookOptional;\n+        ReadOnlyRegimeBook initialRegimeData;\n         try {\n             exerciseBookOptional = storage.readExerciseBook();\n             if (!exerciseBookOptional.isPresent()) {\n                 logger.info(\"Data file not found. Will be starting with a sample ExerciseBook\");\n             }\n-            initialData = exerciseBookOptional.orElseGet(SampleDataUtil::getSampleExerciseBook);\n+            initialExerciseData = exerciseBookOptional.orElseGet(SampleDataUtil::getSampleExerciseBook);\n         } catch (DataConversionException e) {\n             logger.warning(\"Data file not in the correct format. Will be starting with an empty ExerciseBook\");\n-            initialData = new ExerciseBook();\n+            initialExerciseData = new ExerciseBook();\n         } catch (IOException e) {\n             logger.warning(\"Problem while reading from the file. Will be starting with an empty ExerciseBook\");\n-            initialData = new ExerciseBook();\n+            initialExerciseData = new ExerciseBook();\n         }\n \n-        return new ModelManager(initialData, userPrefs);\n+        try {\n+            regimeBookOptional = storage.readRegimeBook();\n+            if (!regimeBookOptional.isPresent()) {\n+                logger.info(\"Data file not found. Will be starting with a sample RegimeBook\");\n+            }\n+            initialRegimeData = regimeBookOptional.orElseGet(SampleDataUtil::getSampleRegimeBook);\n+        } catch (DataConversionException e) {\n+            logger.warning(\"Data file not in the correct format. Will be starting with an empty RegimeBook\");\n+            initialRegimeData = new RegimeBook();\n+        } catch (IOException e) {\n+            logger.warning(\"Problem while reading from the file. Will be starting with an empty RegimeBook\");\n+            initialRegimeData = new RegimeBook();\n+        }\n+\n+        return new ModelManager(initialExerciseData, initialRegimeData, userPrefs);","path":"src/main/java/seedu/exercise/MainApp.java","position":67,"original_position":67,"commit_id":"1f4b3f679a2a4842551e6b13953eea1153b99ec6","original_commit_id":"1f4b3f679a2a4842551e6b13953eea1153b99ec6","user":{"login":"jietung","id":52001248,"node_id":"MDQ6VXNlcjUyMDAxMjQ4","avatar_url":"https://avatars1.githubusercontent.com/u/52001248?v=4","gravatar_id":"","url":"https://api.github.com/users/jietung","html_url":"https://github.com/jietung","followers_url":"https://api.github.com/users/jietung/followers","following_url":"https://api.github.com/users/jietung/following{/other_user}","gists_url":"https://api.github.com/users/jietung/gists{/gist_id}","starred_url":"https://api.github.com/users/jietung/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jietung/subscriptions","organizations_url":"https://api.github.com/users/jietung/orgs","repos_url":"https://api.github.com/users/jietung/repos","events_url":"https://api.github.com/users/jietung/events{/privacy}","received_events_url":"https://api.github.com/users/jietung/received_events","type":"User","site_admin":false},"body":"ok","created_at":"2019-10-12T03:37:26Z","updated_at":"2019-10-12T03:37:26Z","html_url":"https://github.com/AY1920S1-CS2103T-T09-2/main/pull/90#discussion_r334218573","pull_request_url":"https://api.github.com/repos/AY1920S1-CS2103T-T09-2/main/pulls/90","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/AY1920S1-CS2103T-T09-2/main/pulls/comments/334218573"},"html":{"href":"https://github.com/AY1920S1-CS2103T-T09-2/main/pull/90#discussion_r334218573"},"pull_request":{"href":"https://api.github.com/repos/AY1920S1-CS2103T-T09-2/main/pulls/90"}},"in_reply_to_id":334062364},"pull_request":{"url":"https://api.github.com/repos/AY1920S1-CS2103T-T09-2/main/pulls/90","id":327230989,"node_id":"MDExOlB1bGxSZXF1ZXN0MzI3MjMwOTg5","html_url":"https://github.com/AY1920S1-CS2103T-T09-2/main/pull/90","diff_url":"https://github.com/AY1920S1-CS2103T-T09-2/main/pull/90.diff","patch_url":"https://github.com/AY1920S1-CS2103T-T09-2/main/pull/90.patch","issue_url":"https://api.github.com/repos/AY1920S1-CS2103T-T09-2/main/issues/90","number":90,"state":"open","locked":false,"title":"Crud regime","user":{"login":"jietung","id":52001248,"node_id":"MDQ6VXNlcjUyMDAxMjQ4","avatar_url":"https://avatars1.githubusercontent.com/u/52001248?v=4","gravatar_id":"","url":"https://api.github.com/users/jietung","html_url":"https://github.com/jietung","followers_url":"https://api.github.com/users/jietung/followers","following_url":"https://api.github.com/users/jietung/following{/other_user}","gists_url":"https://api.github.com/users/jietung/gists{/gist_id}","starred_url":"https://api.github.com/users/jietung/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jietung/subscriptions","organizations_url":"https://api.github.com/users/jietung/orgs","repos_url":"https://api.github.com/users/jietung/repos","events_url":"https://api.github.com/users/jietung/events{/privacy}","received_events_url":"https://api.github.com/users/jietung/received_events","type":"User","site_admin":false},"body":"","created_at":"2019-10-11T14:35:34Z","updated_at":"2019-10-12T03:37:26Z","closed_at":null,"merged_at":null,"merge_commit_sha":"434c2abe18b36792a63270c33de633e37ff27231","assignee":null,"assignees":[],"requested_reviewers":[{"login":"kwekke","id":43212365,"node_id":"MDQ6VXNlcjQzMjEyMzY1","avatar_url":"https://avatars1.githubusercontent.com/u/43212365?v=4","gravatar_id":"","url":"https://api.github.com/users/kwekke","html_url":"https://github.com/kwekke","followers_url":"https://api.github.com/users/kwekke/followers","following_url":"https://api.github.com/users/kwekke/following{/other_user}","gists_url":"https://api.github.com/users/kwekke/gists{/gist_id}","starred_url":"https://api.github.com/users/kwekke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kwekke/subscriptions","organizations_url":"https://api.github.com/users/kwekke/orgs","repos_url":"https://api.github.com/users/kwekke/repos","events_url":"https://api.github.com/users/kwekke/events{/privacy}","received_events_url":"https://api.github.com/users/kwekke/received_events","type":"User","site_admin":false},{"login":"weihaw08","id":54030026,"node_id":"MDQ6VXNlcjU0MDMwMDI2","avatar_url":"https://avatars0.githubusercontent.com/u/54030026?v=4","gravatar_id":"","url":"https://api.github.com/users/weihaw08","html_url":"https://github.com/weihaw08","followers_url":"https://api.github.com/users/weihaw08/followers","following_url":"https://api.github.com/users/weihaw08/following{/other_user}","gists_url":"https://api.github.com/users/weihaw08/gists{/gist_id}","starred_url":"https://api.github.com/users/weihaw08/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/weihaw08/subscriptions","organizations_url":"https://api.github.com/users/weihaw08/orgs","repos_url":"https://api.github.com/users/weihaw08/repos","events_url":"https://api.github.com/users/weihaw08/events{/privacy}","received_events_url":"https://api.github.com/users/weihaw08/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/AY1920S1-CS2103T-T09-2/main/pulls/90/commits","review_comments_url":"https://api.github.com/repos/AY1920S1-CS2103T-T09-2/main/pulls/90/comments","review_comment_url":"https://api.github.com/repos/AY1920S1-CS2103T-T09-2/main/pulls/comments{/number}","comments_url":"https://api.github.com/repos/AY1920S1-CS2103T-T09-2/main/issues/90/comments","statuses_url":"https://api.github.com/repos/AY1920S1-CS2103T-T09-2/main/statuses/1f4b3f679a2a4842551e6b13953eea1153b99ec6","head":{"label":"jietung:crud-regime","ref":"crud-regime","sha":"1f4b3f679a2a4842551e6b13953eea1153b99ec6","user":{"login":"jietung","id":52001248,"node_id":"MDQ6VXNlcjUyMDAxMjQ4","avatar_url":"https://avatars1.githubusercontent.com/u/52001248?v=4","gravatar_id":"","url":"https://api.github.com/users/jietung","html_url":"https://github.com/jietung","followers_url":"https://api.github.com/users/jietung/followers","following_url":"https://api.github.com/users/jietung/following{/other_user}","gists_url":"https://api.github.com/users/jietung/gists{/gist_id}","starred_url":"https://api.github.com/users/jietung/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jietung/subscriptions","organizations_url":"https://api.github.com/users/jietung/orgs","repos_url":"https://api.github.com/users/jietung/repos","events_url":"https://api.github.com/users/jietung/events{/privacy}","received_events_url":"https://api.github.com/users/jietung/received_events","type":"User","site_admin":false},"repo":{"id":208749408,"node_id":"MDEwOlJlcG9zaXRvcnkyMDg3NDk0MDg=","name":"main","full_name":"jietung/main","private":false,"owner":{"login":"jietung","id":52001248,"node_id":"MDQ6VXNlcjUyMDAxMjQ4","avatar_url":"https://avatars1.githubusercontent.com/u/52001248?v=4","gravatar_id":"","url":"https://api.github.com/users/jietung","html_url":"https://github.com/jietung","followers_url":"https://api.github.com/users/jietung/followers","following_url":"https://api.github.com/users/jietung/following{/other_user}","gists_url":"https://api.github.com/users/jietung/gists{/gist_id}","starred_url":"https://api.github.com/users/jietung/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jietung/subscriptions","organizations_url":"https://api.github.com/users/jietung/orgs","repos_url":"https://api.github.com/users/jietung/repos","events_url":"https://api.github.com/users/jietung/events{/privacy}","received_events_url":"https://api.github.com/users/jietung/received_events","type":"User","site_admin":false},"html_url":"https://github.com/jietung/main","description":"Address Book - Level 3","fork":true,"url":"https://api.github.com/repos/jietung/main","forks_url":"https://api.github.com/repos/jietung/main/forks","keys_url":"https://api.github.com/repos/jietung/main/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jietung/main/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jietung/main/teams","hooks_url":"https://api.github.com/repos/jietung/main/hooks","issue_events_url":"https://api.github.com/repos/jietung/main/issues/events{/number}","events_url":"https://api.github.com/repos/jietung/main/events","assignees_url":"https://api.github.com/repos/jietung/main/assignees{/user}","branches_url":"https://api.github.com/repos/jietung/main/branches{/branch}","tags_url":"https://api.github.com/repos/jietung/main/tags","blobs_url":"https://api.github.com/repos/jietung/main/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jietung/main/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jietung/main/git/refs{/sha}","trees_url":"https://api.github.com/repos/jietung/main/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jietung/main/statuses/{sha}","languages_url":"https://api.github.com/repos/jietung/main/languages","stargazers_url":"https://api.github.com/repos/jietung/main/stargazers","contributors_url":"https://api.github.com/repos/jietung/main/contributors","subscribers_url":"https://api.github.com/repos/jietung/main/subscribers","subscription_url":"https://api.github.com/repos/jietung/main/subscription","commits_url":"https://api.github.com/repos/jietung/main/commits{/sha}","git_commits_url":"https://api.github.com/repos/jietung/main/git/commits{/sha}","comments_url":"https://api.github.com/repos/jietung/main/comments{/number}","issue_comment_url":"https://api.github.com/repos/jietung/main/issues/comments{/number}","contents_url":"https://api.github.com/repos/jietung/main/contents/{+path}","compare_url":"https://api.github.com/repos/jietung/main/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jietung/main/merges","archive_url":"https://api.github.com/repos/jietung/main/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jietung/main/downloads","issues_url":"https://api.github.com/repos/jietung/main/issues{/number}","pulls_url":"https://api.github.com/repos/jietung/main/pulls{/number}","milestones_url":"https://api.github.com/repos/jietung/main/milestones{/number}","notifications_url":"https://api.github.com/repos/jietung/main/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jietung/main/labels{/name}","releases_url":"https://api.github.com/repos/jietung/main/releases{/id}","deployments_url":"https://api.github.com/repos/jietung/main/deployments","created_at":"2019-09-16T08:32:01Z","updated_at":"2019-10-11T14:26:33Z","pushed_at":"2019-10-11T14:27:42Z","git_url":"git://github.com/jietung/main.git","ssh_url":"git@github.com:jietung/main.git","clone_url":"https://github.com/jietung/main.git","svn_url":"https://github.com/jietung/main","homepage":"https://nus-cs2103-ay1920s1.github.io/addressbook-level3/","size":12056,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"AY1920S1-CS2103T-T09-2:master","ref":"master","sha":"aee006037bf598aaf18a6815ab278e894dfe4531","user":{"login":"AY1920S1-CS2103T-T09-2","id":55120205,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU1MTIwMjA1","avatar_url":"https://avatars3.githubusercontent.com/u/55120205?v=4","gravatar_id":"","url":"https://api.github.com/users/AY1920S1-CS2103T-T09-2","html_url":"https://github.com/AY1920S1-CS2103T-T09-2","followers_url":"https://api.github.com/users/AY1920S1-CS2103T-T09-2/followers","following_url":"https://api.github.com/users/AY1920S1-CS2103T-T09-2/following{/other_user}","gists_url":"https://api.github.com/users/AY1920S1-CS2103T-T09-2/gists{/gist_id}","starred_url":"https://api.github.com/users/AY1920S1-CS2103T-T09-2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AY1920S1-CS2103T-T09-2/subscriptions","organizations_url":"https://api.github.com/users/AY1920S1-CS2103T-T09-2/orgs","repos_url":"https://api.github.com/users/AY1920S1-CS2103T-T09-2/repos","events_url":"https://api.github.com/users/AY1920S1-CS2103T-T09-2/events{/privacy}","received_events_url":"https://api.github.com/users/AY1920S1-CS2103T-T09-2/received_events","type":"Organization","site_admin":false},"repo":{"id":207473636,"node_id":"MDEwOlJlcG9zaXRvcnkyMDc0NzM2MzY=","name":"main","full_name":"AY1920S1-CS2103T-T09-2/main","private":false,"owner":{"login":"AY1920S1-CS2103T-T09-2","id":55120205,"node_id":"MDEyOk9yZ2FuaXphdGlvbjU1MTIwMjA1","avatar_url":"https://avatars3.githubusercontent.com/u/55120205?v=4","gravatar_id":"","url":"https://api.github.com/users/AY1920S1-CS2103T-T09-2","html_url":"https://github.com/AY1920S1-CS2103T-T09-2","followers_url":"https://api.github.com/users/AY1920S1-CS2103T-T09-2/followers","following_url":"https://api.github.com/users/AY1920S1-CS2103T-T09-2/following{/other_user}","gists_url":"https://api.github.com/users/AY1920S1-CS2103T-T09-2/gists{/gist_id}","starred_url":"https://api.github.com/users/AY1920S1-CS2103T-T09-2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AY1920S1-CS2103T-T09-2/subscriptions","organizations_url":"https://api.github.com/users/AY1920S1-CS2103T-T09-2/orgs","repos_url":"https://api.github.com/users/AY1920S1-CS2103T-T09-2/repos","events_url":"https://api.github.com/users/AY1920S1-CS2103T-T09-2/events{/privacy}","received_events_url":"https://api.github.com/users/AY1920S1-CS2103T-T09-2/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/AY1920S1-CS2103T-T09-2/main","description":"ExerHealth","fork":true,"url":"https://api.github.com/repos/AY1920S1-CS2103T-T09-2/main","forks_url":"https://api.github.com/repos/AY1920S1-CS2103T-T09-2/main/forks","keys_url":"https://api.github.com/repos/AY1920S1-CS2103T-T09-2/main/keys{/key_id}","collaborators_url":"https://api.github.com/repos/AY1920S1-CS2103T-T09-2/main/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/AY1920S1-CS2103T-T09-2/main/teams","hooks_url":"https://api.github.com/repos/AY1920S1-CS2103T-T09-2/main/hooks","issue_events_url":"https://api.github.com/repos/AY1920S1-CS2103T-T09-2/main/issues/events{/number}","events_url":"https://api.github.com/repos/AY1920S1-CS2103T-T09-2/main/events","assignees_url":"https://api.github.com/repos/AY1920S1-CS2103T-T09-2/main/assignees{/user}","branches_url":"https://api.github.com/repos/AY1920S1-CS2103T-T09-2/main/branches{/branch}","tags_url":"https://api.github.com/repos/AY1920S1-CS2103T-T09-2/main/tags","blobs_url":"https://api.github.com/repos/AY1920S1-CS2103T-T09-2/main/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/AY1920S1-CS2103T-T09-2/main/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/AY1920S1-CS2103T-T09-2/main/git/refs{/sha}","trees_url":"https://api.github.com/repos/AY1920S1-CS2103T-T09-2/main/git/trees{/sha}","statuses_url":"https://api.github.com/repos/AY1920S1-CS2103T-T09-2/main/statuses/{sha}","languages_url":"https://api.github.com/repos/AY1920S1-CS2103T-T09-2/main/languages","stargazers_url":"https://api.github.com/repos/AY1920S1-CS2103T-T09-2/main/stargazers","contributors_url":"https://api.github.com/repos/AY1920S1-CS2103T-T09-2/main/contributors","subscribers_url":"https://api.github.com/repos/AY1920S1-CS2103T-T09-2/main/subscribers","subscription_url":"https://api.github.com/repos/AY1920S1-CS2103T-T09-2/main/subscription","commits_url":"https://api.github.com/repos/AY1920S1-CS2103T-T09-2/main/commits{/sha}","git_commits_url":"https://api.github.com/repos/AY1920S1-CS2103T-T09-2/main/git/commits{/sha}","comments_url":"https://api.github.com/repos/AY1920S1-CS2103T-T09-2/main/comments{/number}","issue_comment_url":"https://api.github.com/repos/AY1920S1-CS2103T-T09-2/main/issues/comments{/number}","contents_url":"https://api.github.com/repos/AY1920S1-CS2103T-T09-2/main/contents/{+path}","compare_url":"https://api.github.com/repos/AY1920S1-CS2103T-T09-2/main/compare/{base}...{head}","merges_url":"https://api.github.com/repos/AY1920S1-CS2103T-T09-2/main/merges","archive_url":"https://api.github.com/repos/AY1920S1-CS2103T-T09-2/main/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/AY1920S1-CS2103T-T09-2/main/downloads","issues_url":"https://api.github.com/repos/AY1920S1-CS2103T-T09-2/main/issues{/number}","pulls_url":"https://api.github.com/repos/AY1920S1-CS2103T-T09-2/main/pulls{/number}","milestones_url":"https://api.github.com/repos/AY1920S1-CS2103T-T09-2/main/milestones{/number}","notifications_url":"https://api.github.com/repos/AY1920S1-CS2103T-T09-2/main/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/AY1920S1-CS2103T-T09-2/main/labels{/name}","releases_url":"https://api.github.com/repos/AY1920S1-CS2103T-T09-2/main/releases{/id}","deployments_url":"https://api.github.com/repos/AY1920S1-CS2103T-T09-2/main/deployments","created_at":"2019-09-10T05:38:00Z","updated_at":"2019-10-11T06:49:13Z","pushed_at":"2019-10-11T14:35:35Z","git_url":"git://github.com/AY1920S1-CS2103T-T09-2/main.git","ssh_url":"git@github.com:AY1920S1-CS2103T-T09-2/main.git","clone_url":"https://github.com/AY1920S1-CS2103T-T09-2/main.git","svn_url":"https://github.com/AY1920S1-CS2103T-T09-2/main","homepage":"https://ay1920s1-cs2103t-t09-2.github.io/main/","size":12035,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":5,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":66,"license":{"key":"other","name":"Other","spdx_id":"NOASSERTION","url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":5,"open_issues":66,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/AY1920S1-CS2103T-T09-2/main/pulls/90"},"html":{"href":"https://github.com/AY1920S1-CS2103T-T09-2/main/pull/90"},"issue":{"href":"https://api.github.com/repos/AY1920S1-CS2103T-T09-2/main/issues/90"},"comments":{"href":"https://api.github.com/repos/AY1920S1-CS2103T-T09-2/main/issues/90/comments"},"review_comments":{"href":"https://api.github.com/repos/AY1920S1-CS2103T-T09-2/main/pulls/90/comments"},"review_comment":{"href":"https://api.github.com/repos/AY1920S1-CS2103T-T09-2/main/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/AY1920S1-CS2103T-T09-2/main/pulls/90/commits"},"statuses":{"href":"https://api.github.com/repos/AY1920S1-CS2103T-T09-2/main/statuses/1f4b3f679a2a4842551e6b13953eea1153b99ec6"}},"author_association":"NONE"}}
{"actor":{"display_login":"jietung"}}