{"action":"created","issue":{"url":"https://api.github.com/repos/pandas-dev/pandas/issues/21879","repository_url":"https://api.github.com/repos/pandas-dev/pandas","labels_url":"https://api.github.com/repos/pandas-dev/pandas/issues/21879/labels{/name}","comments_url":"https://api.github.com/repos/pandas-dev/pandas/issues/21879/comments","events_url":"https://api.github.com/repos/pandas-dev/pandas/issues/21879/events","html_url":"https://github.com/pandas-dev/pandas/pull/21879","id":340743612,"node_id":"MDExOlB1bGxSZXF1ZXN0MjAxMDgzMDYy","number":21879,"title":"[BLD] enable cython coverage, use cythonize","user":{"login":"jbrockmendel","id":8078968,"node_id":"MDQ6VXNlcjgwNzg5Njg=","avatar_url":"https://avatars1.githubusercontent.com/u/8078968?v=4","gravatar_id":"","url":"https://api.github.com/users/jbrockmendel","html_url":"https://github.com/jbrockmendel","followers_url":"https://api.github.com/users/jbrockmendel/followers","following_url":"https://api.github.com/users/jbrockmendel/following{/other_user}","gists_url":"https://api.github.com/users/jbrockmendel/gists{/gist_id}","starred_url":"https://api.github.com/users/jbrockmendel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jbrockmendel/subscriptions","organizations_url":"https://api.github.com/users/jbrockmendel/orgs","repos_url":"https://api.github.com/users/jbrockmendel/repos","events_url":"https://api.github.com/users/jbrockmendel/events{/privacy}","received_events_url":"https://api.github.com/users/jbrockmendel/received_events","type":"User","site_admin":false},"labels":[{"id":129350,"node_id":"MDU6TGFiZWwxMjkzNTA=","url":"https://api.github.com/repos/pandas-dev/pandas/labels/Build","name":"Build","color":"75507B","default":false},{"id":49094459,"node_id":"MDU6TGFiZWw0OTA5NDQ1OQ==","url":"https://api.github.com/repos/pandas-dev/pandas/labels/Internals","name":"Internals","color":"fbca04","default":false},{"id":127685,"node_id":"MDU6TGFiZWwxMjc2ODU=","url":"https://api.github.com/repos/pandas-dev/pandas/labels/Testing","name":"Testing","color":"C4A000","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/pandas-dev/pandas/milestones/55","html_url":"https://github.com/pandas-dev/pandas/milestone/55","labels_url":"https://api.github.com/repos/pandas-dev/pandas/milestones/55/labels","id":3228419,"node_id":"MDk6TWlsZXN0b25lMzIyODQxOQ==","number":55,"title":"0.24.0","description":"","creator":{"login":"jorisvandenbossche","id":1020496,"node_id":"MDQ6VXNlcjEwMjA0OTY=","avatar_url":"https://avatars2.githubusercontent.com/u/1020496?v=4","gravatar_id":"","url":"https://api.github.com/users/jorisvandenbossche","html_url":"https://github.com/jorisvandenbossche","followers_url":"https://api.github.com/users/jorisvandenbossche/followers","following_url":"https://api.github.com/users/jorisvandenbossche/following{/other_user}","gists_url":"https://api.github.com/users/jorisvandenbossche/gists{/gist_id}","starred_url":"https://api.github.com/users/jorisvandenbossche/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jorisvandenbossche/subscriptions","organizations_url":"https://api.github.com/users/jorisvandenbossche/orgs","repos_url":"https://api.github.com/users/jorisvandenbossche/repos","events_url":"https://api.github.com/users/jorisvandenbossche/events{/privacy}","received_events_url":"https://api.github.com/users/jorisvandenbossche/received_events","type":"User","site_admin":false},"open_issues":96,"closed_issues":322,"state":"open","created_at":"2018-03-29T12:00:12Z","updated_at":"2018-07-22T12:38:01Z","due_on":"2018-08-31T07:00:00Z","closed_at":null},"comments":20,"created_at":"2018-07-12T18:11:58Z","updated_at":"2018-07-22T14:41:16Z","closed_at":"2018-07-20T20:28:43Z","author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/pandas-dev/pandas/pulls/21879","html_url":"https://github.com/pandas-dev/pandas/pull/21879","diff_url":"https://github.com/pandas-dev/pandas/pull/21879.diff","patch_url":"https://github.com/pandas-dev/pandas/pull/21879.patch"},"body":"- [x] closes #18089\r\n\r\nDoesn't close #12624, but merits a mention.\r\n\r\nUsage:\r\n```\r\n$ export PANDAS_CYTHON_COVERAGE=TRUE\r\n$ python setup.py build_ext --inplace\r\n$ coverage erase\r\n$ pytest pandas/tests/scalar --cov=pandas/_libs\r\n[...]\r\nName                                      Stmts   Miss  Cover   Missing\r\n-----------------------------------------------------------------------\r\npandas/_libs/__init__.py                      1      0   100%\r\npandas/_libs/algos.pyx                      162    116    28%   43, 45-47, 58, 66, 82-107, 132-145, 149-153, 160-181, 183, 198-206, 209, 212-244, 263-275, 278-284, 288-289, 292-299, 302-310\r\npandas/_libs/algos_common_helper.pxi       1884   1851     2%   25-1203, 1214-1942, 1958-1962, 1964, 1967, 1974-1976, 1981-1987, 1989-1991, 1999-3171, 3177-3227, 3232-3243\r\npandas/_libs/groupby.pyx                    168    148    12%   29-94, 113-134, 143-163, 165-171, 190-207, 210-213, 224-257, 260-265, 293-303, 306-314, 317-323, 354-380\r\npandas/_libs/hashing.pyx                     97     94     3%   48-190\r\npandas/_libs/hashtable.pyx                   83     75    10%   59-142, 154-177\r\npandas/_libs/hashtable_class_helper.pxi     846    828     2%   19-805, 810, 813, 818-829, 837-864, 878-1423\r\npandas/_libs/index.pyx                      384    300    22%   34, 36-39, 46, 49-71, 81-89, 95-100, 110, 114, 126, 130, 135-143, 147, 153-202, 204, 211-214, 221, 223, 227, 233-236, 245-258, 261, 277, 280, 289, 293-314, 318-403, 406, 409, 411, 415-429, 433-434, 440-525, 536-542, 546, 549-694\r\npandas/_libs/index_class_helper.pxi          95     90     5%   14-115, 117, 120, 122-123, 126-165\r\n[...]\r\n```\r\n\r\n(I'll post results from a full test run in a bit)\r\n\r\nApparently there is an issue with the Cython.Coverage plugin that causes cdef function/class definition lines to not get covered.  Not sure if that's going to be fixed or if we need to find a workaround.\r\n\r\nTo make `cythonize` work I had to move `util.pxd` to `tslibs`, then cimport everything into a _libs.util pxd namespace.  There may be a way around this that I haven't found.  If not, there are parts of `tslibs.util` that are not used in `tslibs`, can be moved to `_libs.util`.\r\n\r\nWe _could_ remove a whole bunch more from the `ext_data` dictionary, but I'm saving that until after the first pass of the review process.  (I think doing so will lighten the build, not sure)\r\n\r\nThis will have a merge conflict with #21878, but it'll be easy to resolve when the time comes.\r\n"},"comment":{"url":"https://api.github.com/repos/pandas-dev/pandas/issues/comments/406871558","html_url":"https://github.com/pandas-dev/pandas/pull/21879#issuecomment-406871558","issue_url":"https://api.github.com/repos/pandas-dev/pandas/issues/21879","id":406871558,"node_id":"MDEyOklzc3VlQ29tbWVudDQwNjg3MTU1OA==","user":{"login":"jbrockmendel","id":8078968,"node_id":"MDQ6VXNlcjgwNzg5Njg=","avatar_url":"https://avatars1.githubusercontent.com/u/8078968?v=4","gravatar_id":"","url":"https://api.github.com/users/jbrockmendel","html_url":"https://github.com/jbrockmendel","followers_url":"https://api.github.com/users/jbrockmendel/followers","following_url":"https://api.github.com/users/jbrockmendel/following{/other_user}","gists_url":"https://api.github.com/users/jbrockmendel/gists{/gist_id}","starred_url":"https://api.github.com/users/jbrockmendel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jbrockmendel/subscriptions","organizations_url":"https://api.github.com/users/jbrockmendel/orgs","repos_url":"https://api.github.com/users/jbrockmendel/repos","events_url":"https://api.github.com/users/jbrockmendel/events{/privacy}","received_events_url":"https://api.github.com/users/jbrockmendel/received_events","type":"User","site_admin":false},"created_at":"2018-07-22T14:41:16Z","updated_at":"2018-07-22T14:41:16Z","author_association":"CONTRIBUTOR","body":"No idea why this would cause numpy deprecation warnings."}}
{"actor":{"display_login":"jbrockmendel"}}