{"html_url": "https://github.com/simonw/datasette/issues/1832#issuecomment-1267918117", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1832", "id": 1267918117, "node_id": "IC_kwDOBm6k_c5LkuUl", "user": {"value": 9599, "label": "simonw"}, "created_at": "2022-10-05T04:19:52Z", "updated_at": "2022-10-05T04:19:52Z", "author_association": "OWNER", "body": "Code can go here:\r\n\r\nhttps://github.com/simonw/datasette/blob/b6ba117b7978b58b40e3c3c2b723b92c3010ed53/datasette/database.py#L511-L515\r\n\r\n", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1397193691, "label": "__bool__ method on Results"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1832#issuecomment-1267925830", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1832", "id": 1267925830, "node_id": "IC_kwDOBm6k_c5LkwNG", "user": {"value": 9599, "label": "simonw"}, "created_at": "2022-10-05T04:31:57Z", "updated_at": "2022-10-05T04:31:57Z", "author_association": "OWNER", "body": "Turns out this already works - `__bool__` falls back on `__len__`: https://docs.python.org/3/reference/datamodel.html#object.__bool__\r\n\r\n> When this method is not defined, [`__len__()`](https://docs.python.org/3/reference/datamodel.html#object.__len__ \"object.__len__\") is called, if it is defined, and the object is considered true if its result is nonzero.\r\n\r\nI'll add a test to demonstrate this.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1397193691, "label": "__bool__ method on Results"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1480#issuecomment-1268613335", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1480", "id": 1268613335, "node_id": "IC_kwDOBm6k_c5LnYDX", "user": {"value": 536941, "label": "fgregg"}, "created_at": "2022-10-05T15:45:49Z", "updated_at": "2022-10-05T15:45:49Z", "author_association": "CONTRIBUTOR", "body": "running into this as i continue to grow my labor data warehouse.\r\n\r\nHere a CloudRun PM says the container size should **not** count against memory: https://stackoverflow.com/a/56570717", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1015646369, "label": "Exceeding Cloud Run memory limits when deploying a 4.8G database"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1480#issuecomment-1268629159", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1480", "id": 1268629159, "node_id": "IC_kwDOBm6k_c5Lnb6n", "user": {"value": 536941, "label": "fgregg"}, "created_at": "2022-10-05T16:00:55Z", "updated_at": "2022-10-05T16:00:55Z", "author_association": "CONTRIBUTOR", "body": "as a next step, i'll fetch the docker image from the google registry, and see what memory and disk usage looks like when i run it locally.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1015646369, "label": "Exceeding Cloud Run memory limits when deploying a 4.8G database"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/1824#issuecomment-1268398461", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1824", "id": 1268398461, "node_id": "IC_kwDOBm6k_c5Lmjl9", "user": {"value": 562352, "label": "CharlesNepote"}, "created_at": "2022-10-05T12:55:05Z", "updated_at": "2022-10-05T12:55:05Z", "author_association": "NONE", "body": "Here is some working javascript code. There might be better solution, I'm not a JS expert.\r\n```javascript\r\n var show_hide = document.querySelector(\".show-hide-sql > a\");\r\n\r\n // Hide SQL query if the URL opened with #_hide_sql\r\n var hash = window.location.hash;\r\n if(hash === \"#_hide_sql\") {\r\n hide_sql();\r\n }\r\n show_hide.setAttribute(\"href\", \"#\");\r\n show_hide.addEventListener(\"click\", toggle_sql_display);\r\n\r\n function toggle_sql_display() {\r\n if (show_hide.innerText === \"hide\") {\r\n hide_sql();\r\n return;\r\n }\r\n if (show_hide.innerText === \"show\") {\r\n show_sql();\r\n return;\r\n }\r\n }\r\n\r\n function hide_sql() {\r\n sql_element.style.cssText=\"display:none\";\r\n show_hide.innerHTML = \"show\";\r\n show_hide.setAttribute(\"href\", \"#_hide_sql\");\r\n }\r\n\r\n function show_sql() {\r\n sql_element.style.cssText=\"display:block\";\r\n show_hide.innerHTML = \"hide\";\r\n show_hide.setAttribute(\"href\", \"#_show_sql\");\r\n }\r\n```\r\n", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1387712501, "label": "Convert &_hide_sql=1 to #_hide_sql"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/pull/1823#issuecomment-1258833358", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/1823", "id": 1258833358, "node_id": "IC_kwDOBm6k_c5LCEXO", "user": {"value": 22429695, "label": "codecov[bot]"}, "created_at": "2022-09-27T00:54:15Z", "updated_at": "2022-10-05T04:37:54Z", "author_association": "NONE", "body": "# [Codecov](https://codecov.io/gh/simonw/datasette/pull/1823?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison) Report\nBase: **91.58**% // Head: **92.50**% // Increases project coverage by **`+0.91%`** :tada:\n> Coverage data is based on head [(`b545b6a`)](https://codecov.io/gh/simonw/datasette/pull/1823?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison) compared to base [(`5f9f567`)](https://codecov.io/gh/simonw/datasette/commit/5f9f567acbc58c9fcd88af440e68034510fb5d2b?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison).\n> Patch coverage: 90.47% of modified lines in pull request are covered.\n\n
Additional details and impacted files\n\n\n```diff\n@@ Coverage Diff @@\n## main #1823 +/- ##\n==========================================\n+ Coverage 91.58% 92.50% +0.91% \n==========================================\n Files 36 35 -1 \n Lines 4444 4400 -44 \n==========================================\n Hits 4070 4070 \n+ Misses 374 330 -44 \n```\n\n\n| [Impacted Files](https://codecov.io/gh/simonw/datasette/pull/1823?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison) | Coverage \u0394 | |\n|---|---|---|\n| [datasette/utils/asgi.py](https://codecov.io/gh/simonw/datasette/pull/1823/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison#diff-ZGF0YXNldHRlL3V0aWxzL2FzZ2kucHk=) | `91.06% <88.23%> (\u00f8)` | |\n| [datasette/app.py](https://codecov.io/gh/simonw/datasette/pull/1823/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison#diff-ZGF0YXNldHRlL2FwcC5weQ==) | `94.11% <100.00%> (\u00f8)` | |\n| [datasette/utils/shutil\\_backport.py](https://codecov.io/gh/simonw/datasette/pull/1823/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison#diff-ZGF0YXNldHRlL3V0aWxzL3NodXRpbF9iYWNrcG9ydC5weQ==) | | |\n\nHelp us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison)\n\n
\n\n[:umbrella: View full report at Codecov](https://codecov.io/gh/simonw/datasette/pull/1823?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison). \n:loudspeaker: Do you have feedback about the report comment? [Let us know in this issue](https://about.codecov.io/codecov-pr-comment-feedback/?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": 1386917344, "label": "Keyword-only arguments for a bunch of internal methods"}, "performed_via_github_app": null}