{"action":"created","comment":{"url":"https://api.github.com/repos/fchollet/keras/pulls/comments/46760690","id":46760690,"diff_hunk":"@@ -0,0 +1,139 @@\n+import unittest\n+from numpy.testing import assert_allclose\n+import numpy as np\n+from keras import backend as K\n+\n+np.random.seed(1337)\n+\n+def get_standard_values():\n+    '''\n+    These are just a set of floats used for testing the activation\n+    functions, and are useful in multiple tests.\n+\n+    The values should all be non-negative becasue they and their negative\n+    are used to test the ReLU derivates in this file.\n+    '''\n+    return np.array([[0, 0.1, 0.5, 0.9, 1.0, 10, 1e3, 0.0001]], dtype=K.floatx())\n+\n+class TestAdvancedActivations(unittest.TestCase):","path":"tests/keras/layers/test_advanced_activations.py","position":18,"original_position":18,"commit_id":"39cf3752788b467212801a02af7e54afcb551f58","original_commit_id":"39cf3752788b467212801a02af7e54afcb551f58","user":{"login":"phreeza","id":123894,"avatar_url":"https://avatars.githubusercontent.com/u/123894?v=3","gravatar_id":"","url":"https://api.github.com/users/phreeza","html_url":"https://github.com/phreeza","followers_url":"https://api.github.com/users/phreeza/followers","following_url":"https://api.github.com/users/phreeza/following{/other_user}","gists_url":"https://api.github.com/users/phreeza/gists{/gist_id}","starred_url":"https://api.github.com/users/phreeza/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phreeza/subscriptions","organizations_url":"https://api.github.com/users/phreeza/orgs","repos_url":"https://api.github.com/users/phreeza/repos","events_url":"https://api.github.com/users/phreeza/events{/privacy}","received_events_url":"https://api.github.com/users/phreeza/received_events","type":"User","site_admin":false},"body":"I guess you are right, I originally started with unittest, a few months ago, and now all the tests I wrote have this structure, even though the running is now handled by pytest... The only benefit I can see is that the files can be run as standalone files (i suppose that could probably also be achieved with pytest but I don't know how).","created_at":"2015-12-05T17:21:44Z","updated_at":"2015-12-05T17:21:44Z","html_url":"https://github.com/fchollet/keras/pull/1179#discussion_r46760690","pull_request_url":"https://api.github.com/repos/fchollet/keras/pulls/1179","_links":{"self":{"href":"https://api.github.com/repos/fchollet/keras/pulls/comments/46760690"},"html":{"href":"https://github.com/fchollet/keras/pull/1179#discussion_r46760690"},"pull_request":{"href":"https://api.github.com/repos/fchollet/keras/pulls/1179"}}},"pull_request":{"url":"https://api.github.com/repos/fchollet/keras/pulls/1179","id":52755467,"html_url":"https://github.com/fchollet/keras/pull/1179","diff_url":"https://github.com/fchollet/keras/pull/1179.diff","patch_url":"https://github.com/fchollet/keras/pull/1179.patch","issue_url":"https://api.github.com/repos/fchollet/keras/issues/1179","number":1179,"state":"open","locked":false,"title":"Sprint to bring up test coverage","user":{"login":"phreeza","id":123894,"avatar_url":"https://avatars.githubusercontent.com/u/123894?v=3","gravatar_id":"","url":"https://api.github.com/users/phreeza","html_url":"https://github.com/phreeza","followers_url":"https://api.github.com/users/phreeza/followers","following_url":"https://api.github.com/users/phreeza/following{/other_user}","gists_url":"https://api.github.com/users/phreeza/gists{/gist_id}","starred_url":"https://api.github.com/users/phreeza/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phreeza/subscriptions","organizations_url":"https://api.github.com/users/phreeza/orgs","repos_url":"https://api.github.com/users/phreeza/repos","events_url":"https://api.github.com/users/phreeza/events{/privacy}","received_events_url":"https://api.github.com/users/phreeza/received_events","type":"User","site_admin":false},"body":"This is a work in progress. I will be working on this all weekend (I hope). My timezone is CET. If anyone wants to join me, let me know ( @olegsinyavskiy @EderSantana @farizrahman4u ?) and I will give you push access.\r\n\r\n# Todos\r\n## Meta \r\nThings that are not tests as such but that would be nice to have\r\n- [x] Get coveralls to work (now available for my fork on https://coveralls.io/github/phreeza/keras )\r\n- [ ] Tag front page with coveralls and travis tags\r\n- [ ] clean up tests directory with a structure that matches the main project\r\n\r\n## Tests\r\nTests that need to be written, in approximate order of coverage increase they will bring\r\n- [ ] preprocessing code\r\n- [ ] examples ( @olegsinyavskiy started work on this in #1177 )\r\n- [ ] Siamese, Lambda and LambdaMerge layers (just saw @farizrahman4u is working on this in #1171)\r\n- [ ] Changed interface in Graph and Sequential containers\r\n- [ ] Reuters make_dataset\r\n- [ ] advanced activations\r\n- [ ] sklearn wrapper\r\n- [ ] I/O utils\r\n- [ ] overwrite protection in model saving\r\n\r\nI recon if all these are met, we should be pretty close to 90%, which seems like a more presentable number.","created_at":"2015-12-05T14:00:22Z","updated_at":"2015-12-05T17:21:44Z","closed_at":null,"merged_at":null,"merge_commit_sha":"26458fc9e7209dbf8a3413b2777e713977678e94","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/fchollet/keras/pulls/1179/commits","review_comments_url":"https://api.github.com/repos/fchollet/keras/pulls/1179/comments","review_comment_url":"https://api.github.com/repos/fchollet/keras/pulls/comments{/number}","comments_url":"https://api.github.com/repos/fchollet/keras/issues/1179/comments","statuses_url":"https://api.github.com/repos/fchollet/keras/statuses/39cf3752788b467212801a02af7e54afcb551f58","head":{"label":"phreeza:test-sprint","ref":"test-sprint","sha":"39cf3752788b467212801a02af7e54afcb551f58","user":{"login":"phreeza","id":123894,"avatar_url":"https://avatars.githubusercontent.com/u/123894?v=3","gravatar_id":"","url":"https://api.github.com/users/phreeza","html_url":"https://github.com/phreeza","followers_url":"https://api.github.com/users/phreeza/followers","following_url":"https://api.github.com/users/phreeza/following{/other_user}","gists_url":"https://api.github.com/users/phreeza/gists{/gist_id}","starred_url":"https://api.github.com/users/phreeza/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phreeza/subscriptions","organizations_url":"https://api.github.com/users/phreeza/orgs","repos_url":"https://api.github.com/users/phreeza/repos","events_url":"https://api.github.com/users/phreeza/events{/privacy}","received_events_url":"https://api.github.com/users/phreeza/received_events","type":"User","site_admin":false},"repo":{"id":36176806,"name":"keras","full_name":"phreeza/keras","owner":{"login":"phreeza","id":123894,"avatar_url":"https://avatars.githubusercontent.com/u/123894?v=3","gravatar_id":"","url":"https://api.github.com/users/phreeza","html_url":"https://github.com/phreeza","followers_url":"https://api.github.com/users/phreeza/followers","following_url":"https://api.github.com/users/phreeza/following{/other_user}","gists_url":"https://api.github.com/users/phreeza/gists{/gist_id}","starred_url":"https://api.github.com/users/phreeza/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phreeza/subscriptions","organizations_url":"https://api.github.com/users/phreeza/orgs","repos_url":"https://api.github.com/users/phreeza/repos","events_url":"https://api.github.com/users/phreeza/events{/privacy}","received_events_url":"https://api.github.com/users/phreeza/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/phreeza/keras","description":"Theano-based Deep Learning library (convnets, recurrent neural networks, and more).","fork":true,"url":"https://api.github.com/repos/phreeza/keras","forks_url":"https://api.github.com/repos/phreeza/keras/forks","keys_url":"https://api.github.com/repos/phreeza/keras/keys{/key_id}","collaborators_url":"https://api.github.com/repos/phreeza/keras/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/phreeza/keras/teams","hooks_url":"https://api.github.com/repos/phreeza/keras/hooks","issue_events_url":"https://api.github.com/repos/phreeza/keras/issues/events{/number}","events_url":"https://api.github.com/repos/phreeza/keras/events","assignees_url":"https://api.github.com/repos/phreeza/keras/assignees{/user}","branches_url":"https://api.github.com/repos/phreeza/keras/branches{/branch}","tags_url":"https://api.github.com/repos/phreeza/keras/tags","blobs_url":"https://api.github.com/repos/phreeza/keras/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/phreeza/keras/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/phreeza/keras/git/refs{/sha}","trees_url":"https://api.github.com/repos/phreeza/keras/git/trees{/sha}","statuses_url":"https://api.github.com/repos/phreeza/keras/statuses/{sha}","languages_url":"https://api.github.com/repos/phreeza/keras/languages","stargazers_url":"https://api.github.com/repos/phreeza/keras/stargazers","contributors_url":"https://api.github.com/repos/phreeza/keras/contributors","subscribers_url":"https://api.github.com/repos/phreeza/keras/subscribers","subscription_url":"https://api.github.com/repos/phreeza/keras/subscription","commits_url":"https://api.github.com/repos/phreeza/keras/commits{/sha}","git_commits_url":"https://api.github.com/repos/phreeza/keras/git/commits{/sha}","comments_url":"https://api.github.com/repos/phreeza/keras/comments{/number}","issue_comment_url":"https://api.github.com/repos/phreeza/keras/issues/comments{/number}","contents_url":"https://api.github.com/repos/phreeza/keras/contents/{+path}","compare_url":"https://api.github.com/repos/phreeza/keras/compare/{base}...{head}","merges_url":"https://api.github.com/repos/phreeza/keras/merges","archive_url":"https://api.github.com/repos/phreeza/keras/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/phreeza/keras/downloads","issues_url":"https://api.github.com/repos/phreeza/keras/issues{/number}","pulls_url":"https://api.github.com/repos/phreeza/keras/pulls{/number}","milestones_url":"https://api.github.com/repos/phreeza/keras/milestones{/number}","notifications_url":"https://api.github.com/repos/phreeza/keras/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/phreeza/keras/labels{/name}","releases_url":"https://api.github.com/repos/phreeza/keras/releases{/id}","created_at":"2015-05-24T14:46:45Z","updated_at":"2015-05-24T14:46:45Z","pushed_at":"2015-12-05T16:41:29Z","git_url":"git://github.com/phreeza/keras.git","ssh_url":"git@github.com:phreeza/keras.git","clone_url":"https://github.com/phreeza/keras.git","svn_url":"https://github.com/phreeza/keras","homepage":"http://keras.io/","size":1308,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"fchollet:master","ref":"master","sha":"ada2f2fa0dd9dca2972e374ff937b59461cfacb5","user":{"login":"fchollet","id":710255,"avatar_url":"https://avatars.githubusercontent.com/u/710255?v=3","gravatar_id":"","url":"https://api.github.com/users/fchollet","html_url":"https://github.com/fchollet","followers_url":"https://api.github.com/users/fchollet/followers","following_url":"https://api.github.com/users/fchollet/following{/other_user}","gists_url":"https://api.github.com/users/fchollet/gists{/gist_id}","starred_url":"https://api.github.com/users/fchollet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fchollet/subscriptions","organizations_url":"https://api.github.com/users/fchollet/orgs","repos_url":"https://api.github.com/users/fchollet/repos","events_url":"https://api.github.com/users/fchollet/events{/privacy}","received_events_url":"https://api.github.com/users/fchollet/received_events","type":"User","site_admin":false},"repo":{"id":33015583,"name":"keras","full_name":"fchollet/keras","owner":{"login":"fchollet","id":710255,"avatar_url":"https://avatars.githubusercontent.com/u/710255?v=3","gravatar_id":"","url":"https://api.github.com/users/fchollet","html_url":"https://github.com/fchollet","followers_url":"https://api.github.com/users/fchollet/followers","following_url":"https://api.github.com/users/fchollet/following{/other_user}","gists_url":"https://api.github.com/users/fchollet/gists{/gist_id}","starred_url":"https://api.github.com/users/fchollet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fchollet/subscriptions","organizations_url":"https://api.github.com/users/fchollet/orgs","repos_url":"https://api.github.com/users/fchollet/repos","events_url":"https://api.github.com/users/fchollet/events{/privacy}","received_events_url":"https://api.github.com/users/fchollet/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/fchollet/keras","description":"Deep Learning library for Python. Convnets, recurrent neural networks, and more. Runs on Theano and TensorFlow.","fork":false,"url":"https://api.github.com/repos/fchollet/keras","forks_url":"https://api.github.com/repos/fchollet/keras/forks","keys_url":"https://api.github.com/repos/fchollet/keras/keys{/key_id}","collaborators_url":"https://api.github.com/repos/fchollet/keras/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/fchollet/keras/teams","hooks_url":"https://api.github.com/repos/fchollet/keras/hooks","issue_events_url":"https://api.github.com/repos/fchollet/keras/issues/events{/number}","events_url":"https://api.github.com/repos/fchollet/keras/events","assignees_url":"https://api.github.com/repos/fchollet/keras/assignees{/user}","branches_url":"https://api.github.com/repos/fchollet/keras/branches{/branch}","tags_url":"https://api.github.com/repos/fchollet/keras/tags","blobs_url":"https://api.github.com/repos/fchollet/keras/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/fchollet/keras/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/fchollet/keras/git/refs{/sha}","trees_url":"https://api.github.com/repos/fchollet/keras/git/trees{/sha}","statuses_url":"https://api.github.com/repos/fchollet/keras/statuses/{sha}","languages_url":"https://api.github.com/repos/fchollet/keras/languages","stargazers_url":"https://api.github.com/repos/fchollet/keras/stargazers","contributors_url":"https://api.github.com/repos/fchollet/keras/contributors","subscribers_url":"https://api.github.com/repos/fchollet/keras/subscribers","subscription_url":"https://api.github.com/repos/fchollet/keras/subscription","commits_url":"https://api.github.com/repos/fchollet/keras/commits{/sha}","git_commits_url":"https://api.github.com/repos/fchollet/keras/git/commits{/sha}","comments_url":"https://api.github.com/repos/fchollet/keras/comments{/number}","issue_comment_url":"https://api.github.com/repos/fchollet/keras/issues/comments{/number}","contents_url":"https://api.github.com/repos/fchollet/keras/contents/{+path}","compare_url":"https://api.github.com/repos/fchollet/keras/compare/{base}...{head}","merges_url":"https://api.github.com/repos/fchollet/keras/merges","archive_url":"https://api.github.com/repos/fchollet/keras/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/fchollet/keras/downloads","issues_url":"https://api.github.com/repos/fchollet/keras/issues{/number}","pulls_url":"https://api.github.com/repos/fchollet/keras/pulls{/number}","milestones_url":"https://api.github.com/repos/fchollet/keras/milestones{/number}","notifications_url":"https://api.github.com/repos/fchollet/keras/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/fchollet/keras/labels{/name}","releases_url":"https://api.github.com/repos/fchollet/keras/releases{/id}","created_at":"2015-03-28T00:35:42Z","updated_at":"2015-12-05T16:06:51Z","pushed_at":"2015-12-05T16:41:30Z","git_url":"git://github.com/fchollet/keras.git","ssh_url":"git@github.com:fchollet/keras.git","clone_url":"https://github.com/fchollet/keras.git","svn_url":"https://github.com/fchollet/keras","homepage":"http://keras.io/","size":2505,"stargazers_count":3458,"watchers_count":3458,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":770,"mirror_url":null,"open_issues_count":277,"forks":770,"open_issues":277,"watchers":3458,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/fchollet/keras/pulls/1179"},"html":{"href":"https://github.com/fchollet/keras/pull/1179"},"issue":{"href":"https://api.github.com/repos/fchollet/keras/issues/1179"},"comments":{"href":"https://api.github.com/repos/fchollet/keras/issues/1179/comments"},"review_comments":{"href":"https://api.github.com/repos/fchollet/keras/pulls/1179/comments"},"review_comment":{"href":"https://api.github.com/repos/fchollet/keras/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/fchollet/keras/pulls/1179/commits"},"statuses":{"href":"https://api.github.com/repos/fchollet/keras/statuses/39cf3752788b467212801a02af7e54afcb551f58"}}}}