{"html_url": "https://github.com/simonw/sqlite-utils/pull/293#issuecomment-868125750", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/293", "id": 868125750, "node_id": "MDEyOklzc3VlQ29tbWVudDg2ODEyNTc1MA==", "user": {"value": 22429695, "label": "codecov[bot]"}, "created_at": "2021-06-25T01:42:43Z", "updated_at": "2021-06-25T01:42:43Z", "author_association": "NONE", "body": "# [Codecov](https://codecov.io/gh/simonw/sqlite-utils/pull/293?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison) Report\n> Merging [#293](https://codecov.io/gh/simonw/sqlite-utils/pull/293?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison) (ae0f46a) into [main](https://codecov.io/gh/simonw/sqlite-utils/commit/747be6057d09a4e5d9d726e29d5cf99b10c59dea?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison) (747be60) will **not change** coverage.\n> The diff coverage is `n/a`.\n\n[![Impacted file tree graph](https://codecov.io/gh/simonw/sqlite-utils/pull/293/graphs/tree.svg?width=650&height=150&src=pr&token=O0X3703L9P&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison)](https://codecov.io/gh/simonw/sqlite-utils/pull/293?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison)\n\n```diff\n@@ Coverage Diff @@\n## main #293 +/- ##\n=======================================\n Coverage 96.03% 96.03% \n=======================================\n Files 4 4 \n Lines 1994 1994 \n=======================================\n Hits 1915 1915 \n Misses 79 79 \n```\n\n\n\n------\n\n[Continue to review full report at Codecov](https://codecov.io/gh/simonw/sqlite-utils/pull/293?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison).\n> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison)\n> `\u0394 = absolute (impact)`, `\u00f8 = not affected`, `? = missing data`\n> Powered by [Codecov](https://codecov.io/gh/simonw/sqlite-utils/pull/293?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison). Last update [747be60...ae0f46a](https://codecov.io/gh/simonw/sqlite-utils/pull/293?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison).\n", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 929748885, "label": "Test against Python 3.10-dev"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/sqlite-utils/pull/293#issuecomment-868134040", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/293", "id": 868134040, "node_id": "MDEyOklzc3VlQ29tbWVudDg2ODEzNDA0MA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-06-25T01:49:44Z", "updated_at": "2021-06-25T01:50:33Z", "author_association": "OWNER", "body": "Test failed on 3.10 with `numpy` on macOS:\r\n```\r\nsqlite_utils/__init__.py:1: in \r\n11\r\n from .db import Database\r\n12\r\nsqlite_utils/db.py:48: in \r\n13\r\n import numpy as np # type: ignore\r\n14\r\n../../../hostedtoolcache/Python/3.10.0-beta.3/x64/lib/python3.10/site-packages/numpy/__init__.py:391: in \r\n15\r\n raise RuntimeError(msg)\r\n16\r\nE RuntimeError: Polyfit sanity test emitted a warning, most likely due to using a buggy Accelerate backend. If you compiled yourself, more information is available at https://numpy.org/doc/stable/user/building.html#accelerated-blas-lapack-libraries Otherwise report this to the vendor that provided NumPy.\r\n17\r\nE RankWarning: Polyfit may be poorly conditioned\r\n18\r\nError: Process completed with exit code 4.\r\n```", "reactions": "{\"total_count\": 1, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 1}", "issue": {"value": 929748885, "label": "Test against Python 3.10-dev"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/sqlite-utils/pull/293#issuecomment-868728092", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/293", "id": 868728092, "node_id": "MDEyOklzc3VlQ29tbWVudDg2ODcyODA5Mg==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-06-25T17:39:35Z", "updated_at": "2021-06-25T17:39:35Z", "author_association": "OWNER", "body": "Here's more about this problem: https://github.com/numpy/numpy/issues/15947", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 929748885, "label": "Test against Python 3.10-dev"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/sqlite-utils/issues/37#issuecomment-868881033", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/37", "id": 868881033, "node_id": "MDEyOklzc3VlQ29tbWVudDg2ODg4MTAzMw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-06-25T23:23:49Z", "updated_at": "2021-06-25T23:23:49Z", "author_association": "OWNER", "body": "Twitter conversation about how to add types to the `.create_table(columns=)` parameter: https://twitter.com/simonw/status/1408532867592818693\r\n\r\n> Anyone know how to write a mypy type definition for this?\r\n>\r\n> {\"id\": int, \"name\": str, \"image\": bytes, \"weight\": float}\r\n>\r\n> It's a dict where keys are strings and values are one of int/str/bytes/float (weird API design I know, but I designed this long before I was thinking about mypy)\r\n\r\nLooks like this could work:\r\n\r\n```python\r\n def create_table(\r\n self,\r\n name,\r\n columns: Dict[str, Union[Type[int], Type[bytes], Type[str], Type[float]]],\r\n pk=None,\r\n foreign_keys=None,\r\n column_order=None,\r\n not_null=None,\r\n defaults=None,\r\n hash_id=None,\r\n extracts=None,\r\n ):\r\n```\r\nExcept... that method can optionally also accept `numpy` types if `numpy` is installed. I don't know if it's possible to dynamically change a signature based on an import, since `mypy` is a static type analyzer and doesn't ever execute the code.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 465815372, "label": "Experiment with type hints"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/sqlite-utils/issues/37#issuecomment-868881190", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/37", "id": 868881190, "node_id": "MDEyOklzc3VlQ29tbWVudDg2ODg4MTE5MA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-06-25T23:24:28Z", "updated_at": "2021-06-25T23:24:28Z", "author_association": "OWNER", "body": "Maybe I could release a separate Python package `types-sqlite-utils-numpy` which adds an over-ridden type definition that includes the `numpy` types?", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 465815372, "label": "Experiment with type hints"}, "performed_via_github_app": null}