{"html_url": "https://github.com/simonw/datasette/issues/335#issuecomment-671733187", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/335", "id": 671733187, "node_id": "MDEyOklzc3VlQ29tbWVudDY3MTczMzE4Nw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-08-11T05:25:23Z", "updated_at": "2020-08-11T05:25:23Z", "author_association": "OWNER", "body": "I got this almost working in `simonw/homebrew-datasette` - see https://github.com/simonw/homebrew-datasette/issues/2 for the last missing detail.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 339505204, "label": "Package datasette for installation using homebrew"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/335#issuecomment-672088880", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/335", "id": 672088880, "node_id": "MDEyOklzc3VlQ29tbWVudDY3MjA4ODg4MA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-08-11T16:54:06Z", "updated_at": "2020-08-11T16:54:06Z", "author_association": "OWNER", "body": "It works!\r\n```\r\n$ brew tap simonw/datasette\r\n$ brew install simonw/datasette/datasette\r\n$ datasette --version\r\ndatasette, version 0.46\r\n```", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 339505204, "label": "Package datasette for installation using homebrew"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/923#issuecomment-672089281", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/923", "id": 672089281, "node_id": "MDEyOklzc3VlQ29tbWVudDY3MjA4OTI4MQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-08-11T16:54:50Z", "updated_at": "2020-08-11T16:54:50Z", "author_association": "OWNER", "body": "Also need to talk about how you install plugins.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 677037043, "label": "Add homebrew installation to documentation"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/923#issuecomment-672287754", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/923", "id": 672287754, "node_id": "MDEyOklzc3VlQ29tbWVudDY3MjI4Nzc1NA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-08-11T21:25:33Z", "updated_at": "2020-08-11T21:25:33Z", "author_association": "OWNER", "body": ".. and confirm if `brew tap ...` is even needed if you run `brew install simonw/datasette/datasette`", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 677037043, "label": "Add homebrew installation to documentation"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/923#issuecomment-672288845", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/923", "id": 672288845, "node_id": "MDEyOklzc3VlQ29tbWVudDY3MjI4ODg0NQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-08-11T21:28:17Z", "updated_at": "2020-08-11T21:28:17Z", "author_association": "OWNER", "body": "Here's a pattern for installing plugins:\r\n```\r\n$ datasette plugins\r\n[]\r\n$ /usr/local/opt/datasette/libexec/bin/pip install datasette-vega\r\nCollecting datasette-vega\r\n Using cached datasette_vega-0.6.2-py3-none-any.whl (1.8 MB)\r\nRequirement already satisfied: datasette in /usr/local/Cellar/datasette/0.46/libexec/lib/python3.8/site-packages (from datasette-vega) (0.46)\r\nRequirement already satisfied: click~=7.1.1 in /usr/local/Cellar/datasette/0.46/libexec/lib/python3.8/site-packages (from datasette->datasette-vega) (7.1.2)\r\nRequirement already satisfied: click-default-group~=1.2.2 in /usr/local/Cellar/datasette/0.46/libexec/lib/python3.8/site-packages (from datasette->datasette-vega) (1.2.2)\r\nRequirement already satisfied: Jinja2<2.12.0,>=2.10.3 in /usr/local/Cellar/datasette/0.46/libexec/lib/python3.8/site-packages (from datasette->datasette-vega) (2.11.2)\r\nRequirement already satisfied: hupper~=1.9 in /usr/local/Cellar/datasette/0.46/libexec/lib/python3.8/site-packages (from datasette->datasette-vega) (1.10.2)\r\nRequirement already satisfied: pint~=0.9 in /usr/local/Cellar/datasette/0.46/libexec/lib/python3.8/site-packages (from datasette->datasette-vega) (0.14)\r\nRequirement already satisfied: pluggy~=0.13.0 in /usr/local/Cellar/datasette/0.46/libexec/lib/python3.8/site-packages (from datasette->datasette-vega) (0.13.1)\r\nRequirement already satisfied: uvicorn~=0.11 in /usr/local/Cellar/datasette/0.46/libexec/lib/python3.8/site-packages (from datasette->datasette-vega) (0.11.8)\r\nRequirement already satisfied: aiofiles<0.6,>=0.4 in /usr/local/Cellar/datasette/0.46/libexec/lib/python3.8/site-packages (from datasette->datasette-vega) (0.5.0)\r\nRequirement already satisfied: janus<0.6,>=0.4 in /usr/local/Cellar/datasette/0.46/libexec/lib/python3.8/site-packages (from datasette->datasette-vega) (0.5.0)\r\nRequirement already satisfied: asgi-csrf>=0.6 in /usr/local/Cellar/datasette/0.46/libexec/lib/python3.8/site-packages (from datasette->datasette-vega) (0.6.1)\r\nRequirement already satisfied: PyYAML~=5.3 in /usr/local/Cellar/datasette/0.46/libexec/lib/python3.8/site-packages (from datasette->datasette-vega) (5.3.1)\r\nRequirement already satisfied: mergedeep<1.4.0,>=1.1.1 in /usr/local/Cellar/datasette/0.46/libexec/lib/python3.8/site-packages (from datasette->datasette-vega) (1.3.0)\r\nRequirement already satisfied: itsdangerous~=1.1 in /usr/local/Cellar/datasette/0.46/libexec/lib/python3.8/site-packages (from datasette->datasette-vega) (1.1.0)\r\nRequirement already satisfied: python-baseconv==1.2.2 in /usr/local/Cellar/datasette/0.46/libexec/lib/python3.8/site-packages (from datasette->datasette-vega) (1.2.2)\r\nRequirement already satisfied: MarkupSafe>=0.23 in /usr/local/Cellar/datasette/0.46/libexec/lib/python3.8/site-packages (from Jinja2<2.12.0,>=2.10.3->datasette->datasette-vega) (1.1.1)\r\nRequirement already satisfied: setuptools in /usr/local/Cellar/datasette/0.46/libexec/lib/python3.8/site-packages (from pint~=0.9->datasette->datasette-vega) (49.3.1)\r\nRequirement already satisfied: packaging in /usr/local/Cellar/datasette/0.46/libexec/lib/python3.8/site-packages (from pint~=0.9->datasette->datasette-vega) (20.4)\r\nRequirement already satisfied: h11<0.10,>=0.8 in /usr/local/Cellar/datasette/0.46/libexec/lib/python3.8/site-packages (from uvicorn~=0.11->datasette->datasette-vega) (0.9.0)\r\nRequirement already satisfied: websockets==8.* in /usr/local/Cellar/datasette/0.46/libexec/lib/python3.8/site-packages (from uvicorn~=0.11->datasette->datasette-vega) (8.1)\r\nRequirement already satisfied: httptools==0.1.* in /usr/local/Cellar/datasette/0.46/libexec/lib/python3.8/site-packages (from uvicorn~=0.11->datasette->datasette-vega) (0.1.1)\r\nRequirement already satisfied: uvloop>=0.14.0 in /usr/local/Cellar/datasette/0.46/libexec/lib/python3.8/site-packages (from uvicorn~=0.11->datasette->datasette-vega) (0.14.0)\r\nRequirement already satisfied: pyparsing>=2.0.2 in /usr/local/Cellar/datasette/0.46/libexec/lib/python3.8/site-packages (from packaging->pint~=0.9->datasette->datasette-vega) (2.4.7)\r\nRequirement already satisfied: six in /usr/local/Cellar/datasette/0.46/libexec/lib/python3.8/site-packages (from packaging->pint~=0.9->datasette->datasette-vega) (1.15.0)\r\nInstalling collected packages: datasette-vega\r\nSuccessfully installed datasette-vega-0.6.2\r\n$ datasette plugins \r\n[\r\n {\r\n \"name\": \"datasette-vega\",\r\n \"static\": true,\r\n \"templates\": false,\r\n \"version\": \"0.6.2\",\r\n \"hooks\": [\r\n \"extra_css_urls\",\r\n \"extra_js_urls\"\r\n ]\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": 677037043, "label": "Add homebrew installation to documentation"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/925#issuecomment-672304650", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/925", "id": 672304650, "node_id": "MDEyOklzc3VlQ29tbWVudDY3MjMwNDY1MA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-08-11T22:04:48Z", "updated_at": "2020-08-11T22:04:48Z", "author_association": "OWNER", "body": "Prototyped in this thread: https://github.com/simonw/datasette/issues/335#issuecomment-671005731", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 677227912, "label": "\"datasette install\" and \"datasette uninstall\" commands"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/925#issuecomment-672328436", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/925", "id": 672328436, "node_id": "MDEyOklzc3VlQ29tbWVudDY3MjMyODQzNg==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-08-11T22:33:32Z", "updated_at": "2020-08-11T22:33:42Z", "author_association": "OWNER", "body": "```\r\n$ datasette install --help\r\nUsage: datasette install [OPTIONS] PACKAGES...\r\n\r\n Install Python packages - e.g. Datasette plugins - into the same\r\n environment as Datasette\r\n\r\nOptions:\r\n --help Show this message and exit.\r\n$ datasette uninstall --help\r\nUsage: datasette uninstall [OPTIONS] PACKAGES...\r\n\r\n Uninstall Python packages (e.g. plugins) from the Datasette environment\r\n\r\nOptions:\r\n -y, --yes Don't ask for confirmation\r\n --help Show this message and exit.\r\n```", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 677227912, "label": "\"datasette install\" and \"datasette uninstall\" commands"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/925#issuecomment-672328807", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/925", "id": 672328807, "node_id": "MDEyOklzc3VlQ29tbWVudDY3MjMyODgwNw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-08-11T22:34:37Z", "updated_at": "2020-08-11T22:34:37Z", "author_association": "OWNER", "body": "This will simplify the instructions for installing plugins with Datasette install via homebrew, refs #923", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 677227912, "label": "\"datasette install\" and \"datasette uninstall\" commands"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/923#issuecomment-672329101", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/923", "id": 672329101, "node_id": "MDEyOklzc3VlQ29tbWVudDY3MjMyOTEwMQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-08-11T22:35:13Z", "updated_at": "2020-08-11T22:35:13Z", "author_association": "OWNER", "body": "I added the `datasette install name-of-plugin` command in #925 mainly to simplify the process of installing plugins if Datasette itself was installed using homebrew.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 677037043, "label": "Add homebrew installation to documentation"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/923#issuecomment-672336720", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/923", "id": 672336720, "node_id": "MDEyOklzc3VlQ29tbWVudDY3MjMzNjcyMA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-08-11T22:53:07Z", "updated_at": "2020-08-11T22:53:07Z", "author_association": "OWNER", "body": "https://github.com/simonw/datasette/blob/5126ecb1267ed3850bf3b0ab270accd031a02e79/docs/installation.rst#using-homebrew", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 677037043, "label": "Add homebrew installation to documentation"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/926#issuecomment-672338113", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/926", "id": 672338113, "node_id": "MDEyOklzc3VlQ29tbWVudDY3MjMzODExMw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-08-11T22:57:28Z", "updated_at": "2020-08-11T22:57:28Z", "author_association": "OWNER", "body": "I partly want this so I can easily implement a better `test` method for the Homebrew package. The test I have right now looks like this:\r\n\r\nhttps://github.com/simonw/homebrew-datasette/blob/8aa30aa183158051a987a7e3f50e7e3ee05d8ee9/Formula/datasette.rb#L125-L127\r\n\r\n```\r\n test do\r\n system bin/\"datasette\", \"--help\"\r\n end\r\n```\r\nThe Homebrew docs at https://docs.brew.sh/Formula-Cookbook#add-a-test-to-the-formula say:\r\n\r\n> We want tests that don't require any user input and test the basic functionality of the application. For example `foo build-foo input.foo` is a good test and (despite their widespread use) `foo --version` and `foo --help` are bad tests. However, a bad test is better than no test at all.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 677250834, "label": "datasette fixtures.db --get \"/fixtures.json\""}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/pull/927#issuecomment-672357176", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/927", "id": 672357176, "node_id": "MDEyOklzc3VlQ29tbWVudDY3MjM1NzE3Ng==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-08-11T23:32:08Z", "updated_at": "2020-08-11T23:33:09Z", "author_association": "OWNER", "body": "Needs documentation and tests.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 677265716, "label": "'datasette --get' option, refs #926"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/pull/927#issuecomment-672357902", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/927", "id": 672357902, "node_id": "MDEyOklzc3VlQ29tbWVudDY3MjM1NzkwMg==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-08-11T23:32:39Z", "updated_at": "2020-08-11T23:32:39Z", "author_association": "OWNER", "body": "It works:\r\n```\r\n$ datasette --get '/:memory:.json?sql=select * from sqlite_master' | jq . \r\n{\r\n \"database\": \":memory:\",\r\n \"query_name\": null,\r\n \"rows\": [],\r\n \"truncated\": false,\r\n \"columns\": [\r\n \"type\",\r\n \"name\",\r\n \"tbl_name\",\r\n \"rootpage\",\r\n \"sql\"\r\n ],\r\n \"query\": {\r\n \"sql\": \"select * from sqlite_master\",\r\n \"params\": {}\r\n },\r\n \"private\": false,\r\n \"allow_execute_sql\": true,\r\n \"query_ms\": 0.8032321929931641\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": 677265716, "label": "'datasette --get' option, refs #926"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/928#issuecomment-672372197", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/928", "id": 672372197, "node_id": "MDEyOklzc3VlQ29tbWVudDY3MjM3MjE5Nw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-08-11T23:53:38Z", "updated_at": "2020-08-11T23:53:38Z", "author_association": "OWNER", "body": "Caused by the tests for #925", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 677272618, "label": "Test failures caused by failed attempts to mock pip"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/928#issuecomment-672372465", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/928", "id": 672372465, "node_id": "MDEyOklzc3VlQ29tbWVudDY3MjM3MjQ2NQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-08-11T23:54:28Z", "updated_at": "2020-08-11T23:54:28Z", "author_association": "OWNER", "body": "While debugging this I found a useful clue in https://github.com/pypa/pip/blob/e060970d51c5946beac8447eb95585d83019582d/src/pip/_internal/cli/main.py#L23-L47\r\n\r\n```\r\n# Do not import and use main() directly! Using it directly is actively\r\n# discouraged by pip's maintainers. The name, location and behavior of\r\n# this function is subject to change, so calling it directly is not\r\n# portable across different pip versions.\r\n\r\n# In addition, running pip in-process is unsupported and unsafe. This is\r\n# elaborated in detail at\r\n# https://pip.pypa.io/en/stable/user_guide/#using-pip-from-your-program.\r\n# That document also provides suggestions that should work for nearly\r\n# all users that are considering importing and using main() directly.\r\n\r\n# However, we know that certain users will still want to invoke pip\r\n# in-process. If you understand and accept the implications of using pip\r\n# in an unsupported manner, the best approach is to use runpy to avoid\r\n# depending on the exact location of this entry point.\r\n\r\n# The following example shows how to use runpy to invoke pip in that\r\n# case:\r\n#\r\n# sys.argv = [\"pip\", your, args, here]\r\n# runpy.run_module(\"pip\", run_name=\"__main__\")\r\n#\r\n# Note that this will exit the process after running, unlike a direct\r\n# call to main. As it is not safe to do any processing after calling\r\n# main, this should not be an issue in practice.\r\n```", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 677272618, "label": "Test failures caused by failed attempts to mock pip"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/928#issuecomment-672373061", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/928", "id": 672373061, "node_id": "MDEyOklzc3VlQ29tbWVudDY3MjM3MzA2MQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-08-11T23:56:19Z", "updated_at": "2020-08-11T23:56:19Z", "author_association": "OWNER", "body": "New implementation of the `install` command:\r\nhttps://github.com/simonw/datasette/blob/afdeda8216d4d3027f87583ccdbef17ad85022ef/datasette/cli.py#L235-L240", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 677272618, "label": "Test failures caused by failed attempts to mock pip"}, "performed_via_github_app": null}