{"action":"created","issue":{"url":"https://api.github.com/repos/OpenWaterAnalytics/Stormwater-Management-Model/issues/57","repository_url":"https://api.github.com/repos/OpenWaterAnalytics/Stormwater-Management-Model","labels_url":"https://api.github.com/repos/OpenWaterAnalytics/Stormwater-Management-Model/issues/57/labels{/name}","comments_url":"https://api.github.com/repos/OpenWaterAnalytics/Stormwater-Management-Model/issues/57/comments","events_url":"https://api.github.com/repos/OpenWaterAnalytics/Stormwater-Management-Model/issues/57/events","html_url":"https://github.com/OpenWaterAnalytics/Stormwater-Management-Model/issues/57","id":244560473,"number":57,"title":"Add Unit tests (to API)","user":{"login":"goanpeca","id":3627835,"avatar_url":"https://avatars3.githubusercontent.com/u/3627835?v=4","gravatar_id":"","url":"https://api.github.com/users/goanpeca","html_url":"https://github.com/goanpeca","followers_url":"https://api.github.com/users/goanpeca/followers","following_url":"https://api.github.com/users/goanpeca/following{/other_user}","gists_url":"https://api.github.com/users/goanpeca/gists{/gist_id}","starred_url":"https://api.github.com/users/goanpeca/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/goanpeca/subscriptions","organizations_url":"https://api.github.com/users/goanpeca/orgs","repos_url":"https://api.github.com/users/goanpeca/repos","events_url":"https://api.github.com/users/goanpeca/events{/privacy}","received_events_url":"https://api.github.com/users/goanpeca/received_events","type":"User","site_admin":false},"labels":[{"id":845125756,"url":"https://api.github.com/repos/OpenWaterAnalytics/Stormwater-Management-Model/labels/High%20Priority","name":"High Priority","color":"fef2c0","default":false},{"id":651779907,"url":"https://api.github.com/repos/OpenWaterAnalytics/Stormwater-Management-Model/labels/type:tech-debt","name":"type:tech-debt","color":"e99695","default":false}],"state":"open","locked":false,"assignee":{"login":"bemcdonnell","id":6105134,"avatar_url":"https://avatars0.githubusercontent.com/u/6105134?v=4","gravatar_id":"","url":"https://api.github.com/users/bemcdonnell","html_url":"https://github.com/bemcdonnell","followers_url":"https://api.github.com/users/bemcdonnell/followers","following_url":"https://api.github.com/users/bemcdonnell/following{/other_user}","gists_url":"https://api.github.com/users/bemcdonnell/gists{/gist_id}","starred_url":"https://api.github.com/users/bemcdonnell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bemcdonnell/subscriptions","organizations_url":"https://api.github.com/users/bemcdonnell/orgs","repos_url":"https://api.github.com/users/bemcdonnell/repos","events_url":"https://api.github.com/users/bemcdonnell/events{/privacy}","received_events_url":"https://api.github.com/users/bemcdonnell/received_events","type":"User","site_admin":false},"assignees":[{"login":"bemcdonnell","id":6105134,"avatar_url":"https://avatars0.githubusercontent.com/u/6105134?v=4","gravatar_id":"","url":"https://api.github.com/users/bemcdonnell","html_url":"https://github.com/bemcdonnell","followers_url":"https://api.github.com/users/bemcdonnell/followers","following_url":"https://api.github.com/users/bemcdonnell/following{/other_user}","gists_url":"https://api.github.com/users/bemcdonnell/gists{/gist_id}","starred_url":"https://api.github.com/users/bemcdonnell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bemcdonnell/subscriptions","organizations_url":"https://api.github.com/users/bemcdonnell/orgs","repos_url":"https://api.github.com/users/bemcdonnell/repos","events_url":"https://api.github.com/users/bemcdonnell/events{/privacy}","received_events_url":"https://api.github.com/users/bemcdonnell/received_events","type":"User","site_admin":false},{"login":"michaeltryby","id":6942309,"avatar_url":"https://avatars3.githubusercontent.com/u/6942309?v=4","gravatar_id":"","url":"https://api.github.com/users/michaeltryby","html_url":"https://github.com/michaeltryby","followers_url":"https://api.github.com/users/michaeltryby/followers","following_url":"https://api.github.com/users/michaeltryby/following{/other_user}","gists_url":"https://api.github.com/users/michaeltryby/gists{/gist_id}","starred_url":"https://api.github.com/users/michaeltryby/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michaeltryby/subscriptions","organizations_url":"https://api.github.com/users/michaeltryby/orgs","repos_url":"https://api.github.com/users/michaeltryby/repos","events_url":"https://api.github.com/users/michaeltryby/events{/privacy}","received_events_url":"https://api.github.com/users/michaeltryby/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/OpenWaterAnalytics/Stormwater-Management-Model/milestones/2","html_url":"https://github.com/OpenWaterAnalytics/Stormwater-Management-Model/milestone/2","labels_url":"https://api.github.com/repos/OpenWaterAnalytics/Stormwater-Management-Model/milestones/2/labels","id":2570388,"number":2,"title":"v5.2.0.dev3","description":"Extended API functionality\r\nRegression Testing","creator":{"login":"bemcdonnell","id":6105134,"avatar_url":"https://avatars0.githubusercontent.com/u/6105134?v=4","gravatar_id":"","url":"https://api.github.com/users/bemcdonnell","html_url":"https://github.com/bemcdonnell","followers_url":"https://api.github.com/users/bemcdonnell/followers","following_url":"https://api.github.com/users/bemcdonnell/following{/other_user}","gists_url":"https://api.github.com/users/bemcdonnell/gists{/gist_id}","starred_url":"https://api.github.com/users/bemcdonnell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bemcdonnell/subscriptions","organizations_url":"https://api.github.com/users/bemcdonnell/orgs","repos_url":"https://api.github.com/users/bemcdonnell/repos","events_url":"https://api.github.com/users/bemcdonnell/events{/privacy}","received_events_url":"https://api.github.com/users/bemcdonnell/received_events","type":"User","site_admin":false},"open_issues":19,"closed_issues":48,"state":"open","created_at":"2017-06-07T22:14:37Z","updated_at":"2018-02-22T15:28:54Z","due_on":"2018-01-31T08:00:00Z","closed_at":null},"comments":12,"created_at":"2017-07-21T04:20:32Z","updated_at":"2018-02-23T18:26:19Z","closed_at":null,"author_association":"COLLABORATOR","body":"I will start diving more and more with the codebase of SWMM in the following months (~6 months) and one of the things I have been looking around is for unit test libraries/frameworks for C.\r\n\r\nThis discuss some options.\r\n- https://en.wikipedia.org/wiki/List_of_unit_testing_frameworks#C\r\n- https://stackoverflow.com/questions/65820/unit-testing-c-code\r\n-\r\n https://sites.google.com/site/ruslancray/lab/projects/cunittestingframeworkswithcodecoveragemetrics/c-unit-testing\r\n\r\nI have no experience with any of the one mentioned but with CI in place, its a good opportunity to try some options with some part of SWMM. We will need to decouple modules a bit, but for instance the `shape.c` seems like a good candidate (pretty small and just some methods to test) to start with.\r\n\r\nWhat could be some loose list of requirements? for example,\r\n- Test framework should be for C and C++, in case the code uses C++ at some point in the future? \r\n- If it is a C only framework, tests would be much easier and simpler to write\r\n\r\nCUnit, Check seem to be the classic ones, but https://github.com/Snaipe/Criterion looks promising. CMocka also looks simple. Or we could use a C++ unit testing framework like [google test](https://www.codeproject.com/Articles/1040972/Using-GoogleTest-and-GoogleMock-frameworks-for-emb), but that would require C++ knowledge for running the tests.\r\n\r\nSteps:\r\n1. Decouple the code of `shape.c` so it can be compiled as a standalone thing (if not possible already)\r\n2. Write some basic unittests for the file using some of the tools/frameworks available.\r\n3. Pick something to work with :-p \r\n\r\nThoughts @bemcdonnell, @michaeltryby ?"},"comment":{"url":"https://api.github.com/repos/OpenWaterAnalytics/Stormwater-Management-Model/issues/comments/368096350","html_url":"https://github.com/OpenWaterAnalytics/Stormwater-Management-Model/issues/57#issuecomment-368096350","issue_url":"https://api.github.com/repos/OpenWaterAnalytics/Stormwater-Management-Model/issues/57","id":368096350,"user":{"login":"michaeltryby","id":6942309,"avatar_url":"https://avatars3.githubusercontent.com/u/6942309?v=4","gravatar_id":"","url":"https://api.github.com/users/michaeltryby","html_url":"https://github.com/michaeltryby","followers_url":"https://api.github.com/users/michaeltryby/followers","following_url":"https://api.github.com/users/michaeltryby/following{/other_user}","gists_url":"https://api.github.com/users/michaeltryby/gists{/gist_id}","starred_url":"https://api.github.com/users/michaeltryby/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/michaeltryby/subscriptions","organizations_url":"https://api.github.com/users/michaeltryby/orgs","repos_url":"https://api.github.com/users/michaeltryby/repos","events_url":"https://api.github.com/users/michaeltryby/events{/privacy}","received_events_url":"https://api.github.com/users/michaeltryby/received_events","type":"User","site_admin":false},"created_at":"2018-02-23T18:26:19Z","updated_at":"2018-02-23T18:26:19Z","author_association":"COLLABORATOR","body":"Hey @bemcdonnell I'm preparing to make a PR on this issue. Where would you like me to direct that? "}}
{"actor":{"display_login":"michaeltryby"}}