{"html_url": "https://github.com/simonw/sqlite-utils/pull/531#issuecomment-1465038901", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/531", "id": 1465038901, "node_id": "IC_kwDOCGYnMM5XUrg1", "user": {"value": 22429695, "label": "codecov[bot]"}, "created_at": "2023-03-11T22:29:19Z", "updated_at": "2023-04-07T18:19:49Z", "author_association": "NONE", "body": "## [Codecov](https://codecov.io/gh/simonw/sqlite-utils/pull/531?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison) Report\nPatch coverage: **`100.00`**% and project coverage change: **`+0.03`** :tada:\n> Comparison is base [(`c0251cc`)](https://codecov.io/gh/simonw/sqlite-utils/commit/c0251cc9271260de73b4227859a51fab9b4cb745?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison) 96.25% compared to head [(`afdf618`)](https://codecov.io/gh/simonw/sqlite-utils/pull/531?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison) 96.29%.\n\n
Additional details and impacted files\n\n\n```diff\n@@ Coverage Diff @@\n## main #531 +/- ##\n==========================================\n+ Coverage 96.25% 96.29% +0.03% \n==========================================\n Files 6 6 \n Lines 2671 2671 \n==========================================\n+ Hits 2571 2572 +1 \n+ Misses 100 99 -1 \n```\n\n\n| [Impacted Files](https://codecov.io/gh/simonw/sqlite-utils/pull/531?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| [sqlite\\_utils/utils.py](https://codecov.io/gh/simonw/sqlite-utils/pull/531?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison#diff-c3FsaXRlX3V0aWxzL3V0aWxzLnB5) | `95.13% <\u00f8> (\u00f8)` | |\n| [sqlite\\_utils/cli.py](https://codecov.io/gh/simonw/sqlite-utils/pull/531?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison#diff-c3FsaXRlX3V0aWxzL2NsaS5weQ==) | `95.26% <100.00%> (+0.09%)` | :arrow_up: |\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 in Codecov by Sentry](https://codecov.io/gh/simonw/sqlite-utils/pull/531?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": 1620164673, "label": "Add paths for homebrew on Apple silicon"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/sqlite-utils/pull/531#issuecomment-1465302343", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/531", "id": 1465302343, "node_id": "IC_kwDOCGYnMM5XVr1H", "user": {"value": 9599, "label": "simonw"}, "created_at": "2023-03-12T21:19:13Z", "updated_at": "2023-03-12T21:19:13Z", "author_association": "OWNER", "body": "Aah, I think I see why you wrote it like that.\r\n\r\nThe problem is that `init_spatialite()` does other stuff too:\r\n\r\nhttps://github.com/simonw/sqlite-utils/blob/fc221f9b62ed8624b1d2098e564f525c84497969/sqlite_utils/db.py#L1161-L1171\r\n\r\nSo it needs to be able to load the SpatiaLite extension from the correct place, and THEN run `select InitSpatialMetadata()` to configure the database, if needed.\r\n\r\nSo the problem you're trying to solve here is to let people optionally pass in the path to SpatiaLite if it's not one of the ones that are searched by default.\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": 1620164673, "label": "Add paths for homebrew on Apple silicon"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/sqlite-utils/pull/531#issuecomment-1465315726", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/531", "id": 1465315726, "node_id": "IC_kwDOCGYnMM5XVvGO", "user": {"value": 25778, "label": "eyeseast"}, "created_at": "2023-03-12T22:21:56Z", "updated_at": "2023-03-12T22:21:56Z", "author_association": "CONTRIBUTOR", "body": "Exactly, that's what I was running into. On my M2 MacBook, SpatiaLite ends up in what is -- for the moment -- a non-standard location, so even when I passed in the location with `--load-extension`, I still hit an error on `create-spatial-index`.\r\n\r\nWhat I learned doing this originally is that SQLite needs to load the extension for each connection, even if all the SpatiaLite stuff is already in the database. So that's why `init_spatialite()` gets called again.\r\n\r\nHere's the code where I hit the error: https://github.com/eyeseast/boston-parcels/blob/main/Makefile#L30 It works using this branch.\r\n\r\nI'm not attached to this solution if you can think of something better. And I'm not sure, TBH, my test would actually catch what I'm after here.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1620164673, "label": "Add paths for homebrew on Apple silicon"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/sqlite-utils/pull/531#issuecomment-1501017004", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/531", "id": 1501017004, "node_id": "IC_kwDOCGYnMM5Zd7Os", "user": {"value": 25778, "label": "eyeseast"}, "created_at": "2023-04-09T01:49:43Z", "updated_at": "2023-04-09T01:49:43Z", "author_association": "CONTRIBUTOR", "body": "I'm going to close this in favor of #536. Will try a cleaner approach to custom paths once that one is merge.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 1620164673, "label": "Add paths for homebrew on Apple silicon"}, "performed_via_github_app": null}