{"action":"created","issue":{"url":"https://api.github.com/repos/emfoundation/ce100-app/issues/503","repository_url":"https://api.github.com/repos/emfoundation/ce100-app","labels_url":"https://api.github.com/repos/emfoundation/ce100-app/issues/503/labels{/name}","comments_url":"https://api.github.com/repos/emfoundation/ce100-app/issues/503/comments","events_url":"https://api.github.com/repos/emfoundation/ce100-app/issues/503/events","html_url":"https://github.com/emfoundation/ce100-app/issues/503","id":196432275,"number":503,"title":"Unify mock data","user":{"login":"JMurphyWeb","id":12638261,"avatar_url":"https://avatars.githubusercontent.com/u/12638261?v=3","gravatar_id":"","url":"https://api.github.com/users/JMurphyWeb","html_url":"https://github.com/JMurphyWeb","followers_url":"https://api.github.com/users/JMurphyWeb/followers","following_url":"https://api.github.com/users/JMurphyWeb/following{/other_user}","gists_url":"https://api.github.com/users/JMurphyWeb/gists{/gist_id}","starred_url":"https://api.github.com/users/JMurphyWeb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JMurphyWeb/subscriptions","organizations_url":"https://api.github.com/users/JMurphyWeb/orgs","repos_url":"https://api.github.com/users/JMurphyWeb/repos","events_url":"https://api.github.com/users/JMurphyWeb/events{/privacy}","received_events_url":"https://api.github.com/users/JMurphyWeb/received_events","type":"User","site_admin":false},"labels":[{"id":411819301,"url":"https://api.github.com/repos/emfoundation/ce100-app/labels/enhancement","name":"enhancement","color":"84b6eb","default":true},{"id":411819302,"url":"https://api.github.com/repos/emfoundation/ce100-app/labels/help%20wanted","name":"help wanted","color":"128A0C","default":true},{"id":417340254,"url":"https://api.github.com/repos/emfoundation/ce100-app/labels/priority-2","name":"priority-2","color":"1976D2","default":false},{"id":417341385,"url":"https://api.github.com/repos/emfoundation/ce100-app/labels/technical","name":"technical","color":"d4c5f9","default":false}],"state":"open","locked":false,"assignee":{"login":"SimonLab","id":6057298,"avatar_url":"https://avatars.githubusercontent.com/u/6057298?v=3","gravatar_id":"","url":"https://api.github.com/users/SimonLab","html_url":"https://github.com/SimonLab","followers_url":"https://api.github.com/users/SimonLab/followers","following_url":"https://api.github.com/users/SimonLab/following{/other_user}","gists_url":"https://api.github.com/users/SimonLab/gists{/gist_id}","starred_url":"https://api.github.com/users/SimonLab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SimonLab/subscriptions","organizations_url":"https://api.github.com/users/SimonLab/orgs","repos_url":"https://api.github.com/users/SimonLab/repos","events_url":"https://api.github.com/users/SimonLab/events{/privacy}","received_events_url":"https://api.github.com/users/SimonLab/received_events","type":"User","site_admin":false},"assignees":[{"login":"SimonLab","id":6057298,"avatar_url":"https://avatars.githubusercontent.com/u/6057298?v=3","gravatar_id":"","url":"https://api.github.com/users/SimonLab","html_url":"https://github.com/SimonLab","followers_url":"https://api.github.com/users/SimonLab/followers","following_url":"https://api.github.com/users/SimonLab/following{/other_user}","gists_url":"https://api.github.com/users/SimonLab/gists{/gist_id}","starred_url":"https://api.github.com/users/SimonLab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SimonLab/subscriptions","organizations_url":"https://api.github.com/users/SimonLab/orgs","repos_url":"https://api.github.com/users/SimonLab/repos","events_url":"https://api.github.com/users/SimonLab/events{/privacy}","received_events_url":"https://api.github.com/users/SimonLab/received_events","type":"User","site_admin":false},{"login":"JMurphyWeb","id":12638261,"avatar_url":"https://avatars.githubusercontent.com/u/12638261?v=3","gravatar_id":"","url":"https://api.github.com/users/JMurphyWeb","html_url":"https://github.com/JMurphyWeb","followers_url":"https://api.github.com/users/JMurphyWeb/followers","following_url":"https://api.github.com/users/JMurphyWeb/following{/other_user}","gists_url":"https://api.github.com/users/JMurphyWeb/gists{/gist_id}","starred_url":"https://api.github.com/users/JMurphyWeb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JMurphyWeb/subscriptions","organizations_url":"https://api.github.com/users/JMurphyWeb/orgs","repos_url":"https://api.github.com/users/JMurphyWeb/repos","events_url":"https://api.github.com/users/JMurphyWeb/events{/privacy}","received_events_url":"https://api.github.com/users/JMurphyWeb/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/emfoundation/ce100-app/milestones/4","html_url":"https://github.com/emfoundation/ce100-app/milestone/4","labels_url":"https://api.github.com/repos/emfoundation/ce100-app/milestones/4/labels","id":2043576,"number":4,"title":"Sprint 3","description":"Due 25/11","creator":{"login":"iteles","id":4185328,"avatar_url":"https://avatars.githubusercontent.com/u/4185328?v=3","gravatar_id":"","url":"https://api.github.com/users/iteles","html_url":"https://github.com/iteles","followers_url":"https://api.github.com/users/iteles/followers","following_url":"https://api.github.com/users/iteles/following{/other_user}","gists_url":"https://api.github.com/users/iteles/gists{/gist_id}","starred_url":"https://api.github.com/users/iteles/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iteles/subscriptions","organizations_url":"https://api.github.com/users/iteles/orgs","repos_url":"https://api.github.com/users/iteles/repos","events_url":"https://api.github.com/users/iteles/events{/privacy}","received_events_url":"https://api.github.com/users/iteles/received_events","type":"User","site_admin":false},"open_issues":15,"closed_issues":59,"state":"open","created_at":"2016-10-03T09:27:17Z","updated_at":"2016-12-19T15:03:26Z","due_on":null,"closed_at":null},"comments":1,"created_at":"2016-12-19T14:52:57Z","updated_at":"2016-12-19T15:13:29Z","closed_at":null,"body":"We are having an issue with introducing new mock data. \r\n\r\nCurrently we use a single 'batch' of mock data, which is useful as we can use it in all of our tests and when we are manually testing the application.  However this 'batch' of mock data is in 3 plugins and the main app. Now that we will be introducing new features with new tables (eg insights), it is going to be very time consuming to introduce and maintain this in 4 different places. We need to find a way to only have our batch of mock data in a single place.\r\n\r\n\r\nIn the main application the [data/](https://github.com/emfoundation/ce100-app/tree/master/data) folder holds all of the json files.  This is read into the plugins when the server is initialised.\r\n\r\nAt the moment, the only way I can see us using one set of mock data and use it between our separate plugins is via npm. If we were to publish the mock data we can require it into each place that it is used. \r\n\r\nProblems that i can see with this method: \r\n- it seems strange\r\n- every time we update the mock data module, we would need to `npm update` the app and our 3 plugins.\r\n\r\n\r\nAdvice would be appreciated."},"comment":{"url":"https://api.github.com/repos/emfoundation/ce100-app/issues/comments/267988355","html_url":"https://github.com/emfoundation/ce100-app/issues/503#issuecomment-267988355","issue_url":"https://api.github.com/repos/emfoundation/ce100-app/issues/503","id":267988355,"user":{"login":"SimonLab","id":6057298,"avatar_url":"https://avatars.githubusercontent.com/u/6057298?v=3","gravatar_id":"","url":"https://api.github.com/users/SimonLab","html_url":"https://github.com/SimonLab","followers_url":"https://api.github.com/users/SimonLab/followers","following_url":"https://api.github.com/users/SimonLab/following{/other_user}","gists_url":"https://api.github.com/users/SimonLab/gists{/gist_id}","starred_url":"https://api.github.com/users/SimonLab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SimonLab/subscriptions","organizations_url":"https://api.github.com/users/SimonLab/orgs","repos_url":"https://api.github.com/users/SimonLab/repos","events_url":"https://api.github.com/users/SimonLab/events{/privacy}","received_events_url":"https://api.github.com/users/SimonLab/received_events","type":"User","site_admin":false},"created_at":"2016-12-19T15:13:29Z","updated_at":"2016-12-19T15:13:29Z","body":"To try to clarify, we have at the moment three different modules:\r\n- [people](https://github.com/postgres-plugin/people)\r\n- [challenges](https://github.com/postgres-plugin/challenges)\r\n- [tags](https://github.com/postgres-plugin/tags-system)\r\n\r\nThis three modules can be reuse in other projects as they are not directly linked to the main application. However we are using the same data for the main application and the three modules as it is simpler for us at the moment to reason and tests the features by having the mock data unified. But really the three different modules could have totally different kind of mock data.\r\n\r\nI think at this stage it's still better to keep the mock data unified as it will be quicker to tests the new functions added to the plugins. @JMurphyWeb I had the same idea of creating a mock data npm package that we can update and include in our different project. At the moment I think it's the easy way to go.\r\n- \"It seems strange\" - a bit but it's not shocking\r\n-  \"every time we update the mock data module, we would need to npm update the app and our 3 plugins\" Yes we will need to update the package.json of the application and plugins but it's easy and quick, I don't see this as a big blocker.\r\n\r\nI don't see another solution at the moment so I think creating an npm package is a good first approach. Let's review this later on but I think we should try this solution.\r\n\r\n@JMurphyWeb any other comments or questions?"}}
{"actor":{"display_login":"SimonLab"}}