{"id": 1066288689, "node_id": "I_kwDOBm6k_c4_jkYx", "number": 1538, "title": "Research pattern for re-registering existing Click tools with register_commands", "user": {"value": 9599, "label": "simonw"}, "state": "closed", "locked": 0, "assignee": null, "milestone": null, "comments": 3, "created_at": "2021-11-29T17:09:47Z", "updated_at": "2021-11-29T17:32:44Z", "closed_at": "2021-11-29T17:27:16Z", "author_association": "OWNER", "pull_request": null, "body": "Building a Datasette plugin that imports an existing Click CLI tool and re-registers it is proving hard - Click doesn't really want you to do that. I tried this:\r\n```python\r\nfrom datasette import hookimpl\r\nfrom git_history.cli import file as git_history_file\r\n\r\n\r\n@hookimpl\r\ndef register_commands(cli):\r\n cli.command(name=\"git-history\")(git_history_file.callback)\r\n```\r\nBut when I run this:\r\n```\r\n % datasette git-history --help \r\nUsage: datasette git-history [OPTIONS]\r\n\r\n Analyze the history of a specific file and write it to SQLite\r\n\r\nOptions:\r\n --help Show this message and exit.\r\n```\r\nThe options are all missing - which means that the command doesn't actually work. Will need to research this pattern separately.\r\n\r\n_Originally posted by @simonw in https://github.com/simonw/git-history/issues/21#issuecomment-981835305_", "repo": {"value": 107914493, "label": "datasette"}, "type": "issue", "active_lock_reason": null, "performed_via_github_app": null, "reactions": "{\"url\": \"https://api.github.com/repos/simonw/datasette/issues/1538/reactions\", \"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "draft": null, "state_reason": "completed"} {"id": 1066501534, "node_id": "I_kwDOCGYnMM4_kYWe", "number": 345, "title": "`table.strict` introspection boolean for identifying STRICT mode tables", "user": {"value": 9599, "label": "simonw"}, "state": "closed", "locked": 0, "assignee": null, "milestone": null, "comments": 2, "created_at": "2021-11-29T21:05:10Z", "updated_at": "2021-11-29T22:45:26Z", "closed_at": "2021-11-29T22:44:36Z", "author_association": "OWNER", "pull_request": null, "body": "> From the STRICT docs:\r\n\r\n>> The SQLite parser accepts a comma-separated list of table options after the final close parenthesis in a CREATE TABLE statement. As of this writing (2021-08-23) only two options are recognized:\r\n>> \r\n>> - STRICT\r\n>> - [WITHOUT ROWID](https://www.sqlite.org/withoutrowid.html)\r\n> \r\n> So I think I need to read the `CREATE TABLE` statement from the `sqlite_master` table, split on the last `)`, split those tokens on `,` and see if `create` is in there (case insensitive).\r\n\r\n_Originally posted by @simonw in https://github.com/simonw/sqlite-utils/issues/344#issuecomment-982020757_", "repo": {"value": 140912432, "label": "sqlite-utils"}, "type": "issue", "active_lock_reason": null, "performed_via_github_app": null, "reactions": "{\"url\": \"https://api.github.com/repos/simonw/sqlite-utils/issues/345/reactions\", \"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "draft": null, "state_reason": "completed"}