{"action":"created","comment":{"url":"https://api.github.com/repos/hpcugent/easybuild-framework/pulls/comments/34682341","id":34682341,"diff_hunk":"@@ -0,0 +1,125 @@\n+# #\n+# Copyright 2012-2015 Ghent University\n+#\n+# This file is part of EasyBuild,\n+# originally created by the HPC team of Ghent University (http://ugent.be/hpc/en),\n+# with support of Ghent University (http://ugent.be/hpc),\n+# the Flemish Supercomputer Centre (VSC) (https://vscentrum.be/nl/en),\n+# the Hercules foundation (http://www.herculesstichting.be/in_English)\n+# and the Department of Economy, Science and Innovation (EWI) (http://www.ewi-vlaanderen.be/en).\n+#\n+# http://github.com/hpcugent/easybuild\n+#\n+# EasyBuild is free software: you can redistribute it and/or modify\n+# it under the terms of the GNU General Public License as published by\n+# the Free Software Foundation v2.\n+#\n+# EasyBuild is distributed in the hope that it will be useful,\n+# but WITHOUT ANY WARRANTY; without even the implied warranty of\n+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n+# GNU General Public License for more details.\n+#\n+# You should have received a copy of the GNU General Public License\n+# along with EasyBuild.  If not, see <http://www.gnu.org/licenses/>.\n+##\n+\"\"\"\n+Unit tests for docs.py.\n+\"\"\"\n+\n+import os\n+import re\n+import sys\n+import inspect\n+\n+from easybuild.tools.docs import gen_easyblocks_overview_rst, mk_rst_table\n+from easybuild.tools.utilities import import_available_modules\n+from test.framework.utilities import EnhancedTestCase, init_config\n+from unittest import TestLoader, main\n+\n+class DocsTest(EnhancedTestCase):\n+\n+    def test_rst_table(self):\n+        \"\"\" Test mk_rst_table function \"\"\"\n+        entries = [['one', 'two', 'three']]\n+        t = 'This title is longer than the entries in the column'\n+        titles = [t]\n+\n+        # small table\n+        table = '\\n'.join(mk_rst_table(titles, entries))\n+        check = '\\n'.join([\n+            '=' * len(t),\n+            t,\n+            '=' * len(t),\n+            'one' + ' ' * (len(t) - 3),\n+            'two' + ' ' * (len(t) -3),\n+            'three' + ' ' * (len(t) - 5),\n+            '=' * len(t),\n+            '',\n+        ])\n+\n+        self.assertEqual(table, check)\n+\n+    def test_gen_easyblocks(self):\n+        \"\"\" Test gen_easyblocks_overview_rst function \"\"\"\n+        module = 'easybuild.easyblocks.generic'\n+        modules = import_available_modules(module)\n+        common_params = {\n+            'ConfigureMake' : ['configopts', 'buildopts', 'installopts'],\n+        }\n+        doc_functions = ['build_step', 'configure_step', 'test_step']\n+\n+        eb_overview = gen_easyblocks_overview_rst(module, 'easyconfigs', common_params, doc_functions)\n+        ebdoc = '\\n'.join(eb_overview)\n+\n+        # extensive check for ConfigureMake easyblock\n+        check_configuremake = '\\n'.join([\n+            \".. _ConfigureMake:\",\n+            '',\n+            \"``ConfigureMake``\",\n+            \"=================\",\n+            '',\n+            \"(derives from EasyBlock)\",\n+            '',\n+            \"Dummy support for building and installing applications with configure/make/make install.\",\n+            '',\n+            \"Commonly used easyconfig parameters with ``ConfigureMake`` easyblock\",\n+            \"--------------------------------------------------------------------\",\n+            \"====================   ================================================================\",\n+            \"easyconfig parameter   description                                                     \",\n+            \"====================   ================================================================\",\n+            \"configopts             Extra options passed to configure (default already has --prefix)\",\n+            \"buildopts              Extra options passed to make step (default already has -j X)    \",\n+            \"installopts            Extra options for installation                                  \",\n+            \"====================   ================================================================\",\n+        ])\n+\n+        self.assertTrue(check_configuremake in ebdoc)\n+\n+        for mod in modules:\n+            for name, obj in inspect.getmembers(mod, inspect.isclass):\n+                eb_class = getattr(mod, name)\n+                # skip imported classes that are not easyblocks\n+                if eb_class.__module__.startswith(module):\n+                    self.assertTrue(name in ebdoc)\n+\n+        patterns = [","path":"test/framework/docs.py","position":105,"original_position":105,"commit_id":"a75787b32dd6963518660a1411b6123670b27409","original_commit_id":"a75787b32dd6963518660a1411b6123670b27409","user":{"login":"boegel","id":620876,"avatar_url":"https://avatars.githubusercontent.com/u/620876?v=3","gravatar_id":"","url":"https://api.github.com/users/boegel","html_url":"https://github.com/boegel","followers_url":"https://api.github.com/users/boegel/followers","following_url":"https://api.github.com/users/boegel/following{/other_user}","gists_url":"https://api.github.com/users/boegel/gists{/gist_id}","starred_url":"https://api.github.com/users/boegel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/boegel/subscriptions","organizations_url":"https://api.github.com/users/boegel/orgs","repos_url":"https://api.github.com/users/boegel/repos","events_url":"https://api.github.com/users/boegel/events{/privacy}","received_events_url":"https://api.github.com/users/boegel/received_events","type":"User","site_admin":false},"body":"check for the full list of (test) easyblocks here:\r\n\r\n```\r\n... - :ref:`ConfigureMake` - :ref:`DummyExtension` - ...\r\n```","created_at":"2015-07-15T14:17:13Z","updated_at":"2015-07-15T14:17:13Z","html_url":"https://github.com/hpcugent/easybuild-framework/pull/1317#discussion_r34682341","pull_request_url":"https://api.github.com/repos/hpcugent/easybuild-framework/pulls/1317","_links":{"self":{"href":"https://api.github.com/repos/hpcugent/easybuild-framework/pulls/comments/34682341"},"html":{"href":"https://github.com/hpcugent/easybuild-framework/pull/1317#discussion_r34682341"},"pull_request":{"href":"https://api.github.com/repos/hpcugent/easybuild-framework/pulls/1317"}}},"pull_request":{"url":"https://api.github.com/repos/hpcugent/easybuild-framework/pulls/1317","id":39450751,"html_url":"https://github.com/hpcugent/easybuild-framework/pull/1317","diff_url":"https://github.com/hpcugent/easybuild-framework/pull/1317.diff","patch_url":"https://github.com/hpcugent/easybuild-framework/pull/1317.patch","issue_url":"https://api.github.com/repos/hpcugent/easybuild-framework/issues/1317","number":1317,"state":"open","locked":false,"title":"Generate docs for generic easyblocks (WIP)","user":{"login":"Caylo","id":3251843,"avatar_url":"https://avatars.githubusercontent.com/u/3251843?v=3","gravatar_id":"","url":"https://api.github.com/users/Caylo","html_url":"https://github.com/Caylo","followers_url":"https://api.github.com/users/Caylo/followers","following_url":"https://api.github.com/users/Caylo/following{/other_user}","gists_url":"https://api.github.com/users/Caylo/gists{/gist_id}","starred_url":"https://api.github.com/users/Caylo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Caylo/subscriptions","organizations_url":"https://api.github.com/users/Caylo/orgs","repos_url":"https://api.github.com/users/Caylo/repos","events_url":"https://api.github.com/users/Caylo/events{/privacy}","received_events_url":"https://api.github.com/users/Caylo/received_events","type":"User","site_admin":false},"body":"Fixes https://github.com/hpcugent/easybuild-easyblocks/issues/636","created_at":"2015-07-08T08:02:52Z","updated_at":"2015-07-15T14:17:13Z","closed_at":null,"merged_at":null,"merge_commit_sha":"672111c11131044a833fd2067a871048feb510fe","assignee":null,"milestone":{"url":"https://api.github.com/repos/hpcugent/easybuild-framework/milestones/30","html_url":"https://github.com/hpcugent/easybuild-framework/milestones/v2.3","labels_url":"https://api.github.com/repos/hpcugent/easybuild-framework/milestones/30/labels","id":1192252,"number":30,"title":"v2.3","description":"","creator":{"login":"boegel","id":620876,"avatar_url":"https://avatars.githubusercontent.com/u/620876?v=3","gravatar_id":"","url":"https://api.github.com/users/boegel","html_url":"https://github.com/boegel","followers_url":"https://api.github.com/users/boegel/followers","following_url":"https://api.github.com/users/boegel/following{/other_user}","gists_url":"https://api.github.com/users/boegel/gists{/gist_id}","starred_url":"https://api.github.com/users/boegel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/boegel/subscriptions","organizations_url":"https://api.github.com/users/boegel/orgs","repos_url":"https://api.github.com/users/boegel/repos","events_url":"https://api.github.com/users/boegel/events{/privacy}","received_events_url":"https://api.github.com/users/boegel/received_events","type":"User","site_admin":false},"open_issues":11,"closed_issues":0,"state":"open","created_at":"2015-07-03T10:24:57Z","updated_at":"2015-07-14T18:22:22Z","due_on":"2015-09-10T22:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/hpcugent/easybuild-framework/pulls/1317/commits","review_comments_url":"https://api.github.com/repos/hpcugent/easybuild-framework/pulls/1317/comments","review_comment_url":"https://api.github.com/repos/hpcugent/easybuild-framework/pulls/comments{/number}","comments_url":"https://api.github.com/repos/hpcugent/easybuild-framework/issues/1317/comments","statuses_url":"https://api.github.com/repos/hpcugent/easybuild-framework/statuses/a75787b32dd6963518660a1411b6123670b27409","head":{"label":"Caylo:generic-easyblock-docs-issue636","ref":"generic-easyblock-docs-issue636","sha":"a75787b32dd6963518660a1411b6123670b27409","user":{"login":"Caylo","id":3251843,"avatar_url":"https://avatars.githubusercontent.com/u/3251843?v=3","gravatar_id":"","url":"https://api.github.com/users/Caylo","html_url":"https://github.com/Caylo","followers_url":"https://api.github.com/users/Caylo/followers","following_url":"https://api.github.com/users/Caylo/following{/other_user}","gists_url":"https://api.github.com/users/Caylo/gists{/gist_id}","starred_url":"https://api.github.com/users/Caylo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Caylo/subscriptions","organizations_url":"https://api.github.com/users/Caylo/orgs","repos_url":"https://api.github.com/users/Caylo/repos","events_url":"https://api.github.com/users/Caylo/events{/privacy}","received_events_url":"https://api.github.com/users/Caylo/received_events","type":"User","site_admin":false},"repo":{"id":38231913,"name":"easybuild-framework","full_name":"Caylo/easybuild-framework","owner":{"login":"Caylo","id":3251843,"avatar_url":"https://avatars.githubusercontent.com/u/3251843?v=3","gravatar_id":"","url":"https://api.github.com/users/Caylo","html_url":"https://github.com/Caylo","followers_url":"https://api.github.com/users/Caylo/followers","following_url":"https://api.github.com/users/Caylo/following{/other_user}","gists_url":"https://api.github.com/users/Caylo/gists{/gist_id}","starred_url":"https://api.github.com/users/Caylo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Caylo/subscriptions","organizations_url":"https://api.github.com/users/Caylo/orgs","repos_url":"https://api.github.com/users/Caylo/repos","events_url":"https://api.github.com/users/Caylo/events{/privacy}","received_events_url":"https://api.github.com/users/Caylo/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Caylo/easybuild-framework","description":"EasyBuild is a software installation framework in Python that allows you to install software in a structured and robust way. ","fork":true,"url":"https://api.github.com/repos/Caylo/easybuild-framework","forks_url":"https://api.github.com/repos/Caylo/easybuild-framework/forks","keys_url":"https://api.github.com/repos/Caylo/easybuild-framework/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Caylo/easybuild-framework/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Caylo/easybuild-framework/teams","hooks_url":"https://api.github.com/repos/Caylo/easybuild-framework/hooks","issue_events_url":"https://api.github.com/repos/Caylo/easybuild-framework/issues/events{/number}","events_url":"https://api.github.com/repos/Caylo/easybuild-framework/events","assignees_url":"https://api.github.com/repos/Caylo/easybuild-framework/assignees{/user}","branches_url":"https://api.github.com/repos/Caylo/easybuild-framework/branches{/branch}","tags_url":"https://api.github.com/repos/Caylo/easybuild-framework/tags","blobs_url":"https://api.github.com/repos/Caylo/easybuild-framework/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Caylo/easybuild-framework/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Caylo/easybuild-framework/git/refs{/sha}","trees_url":"https://api.github.com/repos/Caylo/easybuild-framework/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Caylo/easybuild-framework/statuses/{sha}","languages_url":"https://api.github.com/repos/Caylo/easybuild-framework/languages","stargazers_url":"https://api.github.com/repos/Caylo/easybuild-framework/stargazers","contributors_url":"https://api.github.com/repos/Caylo/easybuild-framework/contributors","subscribers_url":"https://api.github.com/repos/Caylo/easybuild-framework/subscribers","subscription_url":"https://api.github.com/repos/Caylo/easybuild-framework/subscription","commits_url":"https://api.github.com/repos/Caylo/easybuild-framework/commits{/sha}","git_commits_url":"https://api.github.com/repos/Caylo/easybuild-framework/git/commits{/sha}","comments_url":"https://api.github.com/repos/Caylo/easybuild-framework/comments{/number}","issue_comment_url":"https://api.github.com/repos/Caylo/easybuild-framework/issues/comments{/number}","contents_url":"https://api.github.com/repos/Caylo/easybuild-framework/contents/{+path}","compare_url":"https://api.github.com/repos/Caylo/easybuild-framework/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Caylo/easybuild-framework/merges","archive_url":"https://api.github.com/repos/Caylo/easybuild-framework/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Caylo/easybuild-framework/downloads","issues_url":"https://api.github.com/repos/Caylo/easybuild-framework/issues{/number}","pulls_url":"https://api.github.com/repos/Caylo/easybuild-framework/pulls{/number}","milestones_url":"https://api.github.com/repos/Caylo/easybuild-framework/milestones{/number}","notifications_url":"https://api.github.com/repos/Caylo/easybuild-framework/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Caylo/easybuild-framework/labels{/name}","releases_url":"https://api.github.com/repos/Caylo/easybuild-framework/releases{/id}","created_at":"2015-06-29T06:43:22Z","updated_at":"2015-06-29T06:43:23Z","pushed_at":"2015-07-15T13:36:46Z","git_url":"git://github.com/Caylo/easybuild-framework.git","ssh_url":"git@github.com:Caylo/easybuild-framework.git","clone_url":"https://github.com/Caylo/easybuild-framework.git","svn_url":"https://github.com/Caylo/easybuild-framework","homepage":"http://hpcugent.github.com/easybuild/","size":10806,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"hpcugent:develop","ref":"develop","sha":"6b06866d7562663f0fcef2913a395883b6167e0e","user":{"login":"hpcugent","id":1515263,"avatar_url":"https://avatars.githubusercontent.com/u/1515263?v=3","gravatar_id":"","url":"https://api.github.com/users/hpcugent","html_url":"https://github.com/hpcugent","followers_url":"https://api.github.com/users/hpcugent/followers","following_url":"https://api.github.com/users/hpcugent/following{/other_user}","gists_url":"https://api.github.com/users/hpcugent/gists{/gist_id}","starred_url":"https://api.github.com/users/hpcugent/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hpcugent/subscriptions","organizations_url":"https://api.github.com/users/hpcugent/orgs","repos_url":"https://api.github.com/users/hpcugent/repos","events_url":"https://api.github.com/users/hpcugent/events{/privacy}","received_events_url":"https://api.github.com/users/hpcugent/received_events","type":"Organization","site_admin":false},"repo":{"id":3662176,"name":"easybuild-framework","full_name":"hpcugent/easybuild-framework","owner":{"login":"hpcugent","id":1515263,"avatar_url":"https://avatars.githubusercontent.com/u/1515263?v=3","gravatar_id":"","url":"https://api.github.com/users/hpcugent","html_url":"https://github.com/hpcugent","followers_url":"https://api.github.com/users/hpcugent/followers","following_url":"https://api.github.com/users/hpcugent/following{/other_user}","gists_url":"https://api.github.com/users/hpcugent/gists{/gist_id}","starred_url":"https://api.github.com/users/hpcugent/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hpcugent/subscriptions","organizations_url":"https://api.github.com/users/hpcugent/orgs","repos_url":"https://api.github.com/users/hpcugent/repos","events_url":"https://api.github.com/users/hpcugent/events{/privacy}","received_events_url":"https://api.github.com/users/hpcugent/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/hpcugent/easybuild-framework","description":"EasyBuild is a software installation framework in Python that allows you to install software in a structured and robust way. ","fork":false,"url":"https://api.github.com/repos/hpcugent/easybuild-framework","forks_url":"https://api.github.com/repos/hpcugent/easybuild-framework/forks","keys_url":"https://api.github.com/repos/hpcugent/easybuild-framework/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hpcugent/easybuild-framework/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hpcugent/easybuild-framework/teams","hooks_url":"https://api.github.com/repos/hpcugent/easybuild-framework/hooks","issue_events_url":"https://api.github.com/repos/hpcugent/easybuild-framework/issues/events{/number}","events_url":"https://api.github.com/repos/hpcugent/easybuild-framework/events","assignees_url":"https://api.github.com/repos/hpcugent/easybuild-framework/assignees{/user}","branches_url":"https://api.github.com/repos/hpcugent/easybuild-framework/branches{/branch}","tags_url":"https://api.github.com/repos/hpcugent/easybuild-framework/tags","blobs_url":"https://api.github.com/repos/hpcugent/easybuild-framework/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hpcugent/easybuild-framework/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hpcugent/easybuild-framework/git/refs{/sha}","trees_url":"https://api.github.com/repos/hpcugent/easybuild-framework/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hpcugent/easybuild-framework/statuses/{sha}","languages_url":"https://api.github.com/repos/hpcugent/easybuild-framework/languages","stargazers_url":"https://api.github.com/repos/hpcugent/easybuild-framework/stargazers","contributors_url":"https://api.github.com/repos/hpcugent/easybuild-framework/contributors","subscribers_url":"https://api.github.com/repos/hpcugent/easybuild-framework/subscribers","subscription_url":"https://api.github.com/repos/hpcugent/easybuild-framework/subscription","commits_url":"https://api.github.com/repos/hpcugent/easybuild-framework/commits{/sha}","git_commits_url":"https://api.github.com/repos/hpcugent/easybuild-framework/git/commits{/sha}","comments_url":"https://api.github.com/repos/hpcugent/easybuild-framework/comments{/number}","issue_comment_url":"https://api.github.com/repos/hpcugent/easybuild-framework/issues/comments{/number}","contents_url":"https://api.github.com/repos/hpcugent/easybuild-framework/contents/{+path}","compare_url":"https://api.github.com/repos/hpcugent/easybuild-framework/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hpcugent/easybuild-framework/merges","archive_url":"https://api.github.com/repos/hpcugent/easybuild-framework/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hpcugent/easybuild-framework/downloads","issues_url":"https://api.github.com/repos/hpcugent/easybuild-framework/issues{/number}","pulls_url":"https://api.github.com/repos/hpcugent/easybuild-framework/pulls{/number}","milestones_url":"https://api.github.com/repos/hpcugent/easybuild-framework/milestones{/number}","notifications_url":"https://api.github.com/repos/hpcugent/easybuild-framework/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hpcugent/easybuild-framework/labels{/name}","releases_url":"https://api.github.com/repos/hpcugent/easybuild-framework/releases{/id}","created_at":"2012-03-08T17:07:43Z","updated_at":"2015-07-07T13:06:42Z","pushed_at":"2015-07-15T13:36:47Z","git_url":"git://github.com/hpcugent/easybuild-framework.git","ssh_url":"git@github.com:hpcugent/easybuild-framework.git","clone_url":"https://github.com/hpcugent/easybuild-framework.git","svn_url":"https://github.com/hpcugent/easybuild-framework","homepage":"http://hpcugent.github.com/easybuild/","size":16425,"stargazers_count":47,"watchers_count":47,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":63,"mirror_url":null,"open_issues_count":234,"forks":63,"open_issues":234,"watchers":47,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/hpcugent/easybuild-framework/pulls/1317"},"html":{"href":"https://github.com/hpcugent/easybuild-framework/pull/1317"},"issue":{"href":"https://api.github.com/repos/hpcugent/easybuild-framework/issues/1317"},"comments":{"href":"https://api.github.com/repos/hpcugent/easybuild-framework/issues/1317/comments"},"review_comments":{"href":"https://api.github.com/repos/hpcugent/easybuild-framework/pulls/1317/comments"},"review_comment":{"href":"https://api.github.com/repos/hpcugent/easybuild-framework/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/hpcugent/easybuild-framework/pulls/1317/commits"},"statuses":{"href":"https://api.github.com/repos/hpcugent/easybuild-framework/statuses/a75787b32dd6963518660a1411b6123670b27409"}}}}