{"html_url": "https://github.com/dogsheep/dogsheep-photos/issues/25#issuecomment-631127454", "issue_url": "https://api.github.com/repos/dogsheep/dogsheep-photos/issues/25", "id": 631127454, "node_id": "MDEyOklzc3VlQ29tbWVudDYzMTEyNzQ1NA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-05-19T22:48:00Z", "updated_at": "2020-05-21T15:58:32Z", "author_association": "MEMBER", "body": "I built #23 to help with this.\r\n\r\n $ dogsheep-photos create-subset photos.db public.db \\\r\n \"select sha256 from apple_photos where albums like '%Public%'\"\r\n\r\nAnd publish with Vercel:\r\n\r\n $ datasette publish now public.db --project dogsheep-photos \\\r\n --about=dogsheep/dogsheep-photos \\\r\n --about_url=\"https://github.com/dogsheep/dogsheep-photos\" \\\r\n --install=datasette-json-html \\\r\n --install=datasette-cluster-map", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 621332242, "label": "Create a public demo"}, "performed_via_github_app": null} {"html_url": "https://github.com/dogsheep/dogsheep-photos/issues/25#issuecomment-631251707", "issue_url": "https://api.github.com/repos/dogsheep/dogsheep-photos/issues/25", "id": 631251707, "node_id": "MDEyOklzc3VlQ29tbWVudDYzMTI1MTcwNw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-05-20T05:49:27Z", "updated_at": "2020-05-21T15:58:42Z", "author_association": "MEMBER", "body": "Renaming this demo to `dogsheep-photos.dogsheep.net`", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 621332242, "label": "Create a public demo"}, "performed_via_github_app": null} {"html_url": "https://github.com/dogsheep/dogsheep-photos/issues/25#issuecomment-631253852", "issue_url": "https://api.github.com/repos/dogsheep/dogsheep-photos/issues/25", "id": 631253852, "node_id": "MDEyOklzc3VlQ29tbWVudDYzMTI1Mzg1Mg==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-05-20T05:56:17Z", "updated_at": "2020-05-21T22:26:16Z", "author_association": "MEMBER", "body": "I have a `deploy-demo.sh` script now:\r\n```bash\r\n#!/bin/bash\r\nif [ -f public.db ]; then\r\n rm public.db\r\nfi\r\npipenv run dogsheep-photos create-subset photos.db public.db \\\r\n \"select sha256 from apple_photos where albums like '%Public%'\"\r\npipenv run sqlite-utils create-view public.db photos_on_a_map \\\r\n \"select\r\n date,\r\n latitude,\r\n longitude,\r\n apple_photos.sha256,\r\n uploads.ext,\r\n json_object(\r\n 'title',\r\n 'Taken on ' || date,\r\n 'image',\r\n 'https://photos.simonwillison.net/i/' || uploads.sha256 || '.' || uploads.ext || '?w=400',\r\n 'link',\r\n 'https://photos.simonwillison.net/i/' || uploads.sha256 || '.' || uploads.ext || '?w=1200'\r\n ) as popup\r\n from\r\n apple_photos\r\n join uploads on apple_photos.sha256 = uploads.sha256\r\n where\r\n latitude is not null\r\n order by\r\n date desc\" \\\r\n --replace\r\npipenv run datasette publish now public.db --project dogsheep-photos \\\r\n --about=dogsheep/dogsheep-photos \\\r\n --about_url=\"https://github.com/dogsheep/dogsheep-photos\" \\\r\n --install=datasette-json-html \\\r\n --install=datasette-pretty-json \\\r\n --install=datasette-cluster-map>=0.10 \\\r\n --title \"Dogsheep Photos demo\"\r\n```", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 621332242, "label": "Create a public demo"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/744#issuecomment-632233393", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/744", "id": 632233393, "node_id": "MDEyOklzc3VlQ29tbWVudDYzMjIzMzM5Mw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-05-21T17:16:15Z", "updated_at": "2020-05-21T17:17:43Z", "author_association": "OWNER", "body": "I just hit this bug myself, or at least a variant of it!\r\n\r\nhttps://github.com/simonw/museums/runs/697063068?check_suite_focus=true\r\n\r\n```\r\n2020-05-21T17:14:02.2596471Z Traceback (most recent call last):\r\n2020-05-21T17:14:02.2599146Z File \"/opt/hostedtoolcache/Python/3.8.3/x64/lib/python3.8/site-packages/datasette/utils/__init__.py\", line 605, in link_or_copy_directory\r\n2020-05-21T17:14:02.2599861Z shutil.copytree(src, dst, copy_function=os.link)\r\n2020-05-21T17:14:02.2600377Z File \"/opt/hostedtoolcache/Python/3.8.3/x64/lib/python3.8/shutil.py\", line 554, in copytree\r\n2020-05-21T17:14:02.2600786Z return _copytree(entries=entries, src=src, dst=dst, symlinks=symlinks,\r\n2020-05-21T17:14:02.2601196Z File \"/opt/hostedtoolcache/Python/3.8.3/x64/lib/python3.8/shutil.py\", line 510, in _copytree\r\n2020-05-21T17:14:02.2601580Z raise Error(errors)\r\n2020-05-21T17:14:02.2604565Z shutil.Error: [('/home/runner/work/museums/museums/templates/row-browse-museums.html', '/tmp/tmpq47xi96y/datasette/templates/row-browse-museums.html',\r\n\"[Errno 18] Invalid cross-device link: '/home/runner/work/museums/museums/templates/row-browse-museums.html' -> '/tmp/tmpq47xi96y/datasette/templates/row-browse-museums.html'\"), ('/home/runner/work/museums/museums/templates/index.html', '/tmp/tmpq47xi96y/datasette/templates/index.html',\r\n\"[Errno 18] Invalid cross-device link: '/home/runner/work/museums/museums/templates/index.html' -> '/tmp/tmpq47xi96y/datasette/templates/index.html'\"), ('/home/runner/work/museums/museums/templates/query-browse-search.html', '/tmp/tmpq47xi96y/datasette/templates/query-browse-search.html',\r\n\"[Errno 18] Invalid cross-device link: '/home/runner/work/museums/museums/templates/query-browse-search.html' -> '/tmp/tmpq47xi96y/datasette/templates/query-browse-search.html'\"), ('/home/runner/work/museums/museums/templates/_analytics.html', '/tmp/tmpq47xi96y/datasette/templates/_analytics.html', \"[Errno 18] Invalid cross-device link: '/home/runner/work/museums/museums/templates/_analytics.html' -> '/tmp/tmpq47xi96y/datasette/templates/_analytics.html'\"), ('/home/runner/work/museums/museums/templates/_museum_card.html', '/tmp/tmpq47xi96y/datasette/templates/_museum_card.html', \"[Errno 18] Invalid cross-device link: '/home/runner/work/museums/museums/templates/_museum_card.html' -> '/tmp/tmpq47xi96y/datasette/templates/_museum_card.html'\"), ('/home/runner/work/museums/museums/templates/pages/about.html', '/tmp/tmpq47xi96y/datasette/templates/pages/about.html', \"[Errno 18] Invalid cross-device link: '/home/runner/work/museums/museums/templates/pages/about.html' -> '/tmp/tmpq47xi96y/datasette/templates/pages/about.html'\"), ('/home/runner/work/museums/museums/templates/pages/map.html', '/tmp/tmpq47xi96y/datasette/templates/pages/map.html', \"[Errno 18] Invalid cross-device link: '/home/runner/work/museums/museums/templates/pages/map.html' -> '/tmp/tmpq47xi96y/datasette/templates/pages/map.html'\")]\r\n2020-05-21T17:14:02.2605437Z \r\n2020-05-21T17:14:02.2605797Z During handling of the above exception, another exception occurred:\r\n2020-05-21T17:14:02.2606102Z \r\n2020-05-21T17:14:02.2606423Z Traceback (most recent call last):\r\n2020-05-21T17:14:02.2606817Z File \"/opt/hostedtoolcache/Python/3.8.3/x64/bin/datasette\", line 8, in \r\n2020-05-21T17:14:02.2607189Z sys.exit(cli())\r\n2020-05-21T17:14:02.2607907Z File \"/opt/hostedtoolcache/Python/3.8.3/x64/lib/python3.8/site-packages/click/core.py\", line 829, in __call__\r\n2020-05-21T17:14:02.2608347Z return self.main(*args, **kwargs)\r\n2020-05-21T17:14:02.2609024Z File \"/opt/hostedtoolcache/Python/3.8.3/x64/lib/python3.8/site-packages/click/core.py\", line 782, in main\r\n2020-05-21T17:14:02.2609451Z rv = self.invoke(ctx)\r\n2020-05-21T17:14:02.2610116Z File \"/opt/hostedtoolcache/Python/3.8.3/x64/lib/python3.8/site-packages/click/core.py\", line 1259, in invoke\r\n2020-05-21T17:14:02.2610550Z return _process_result(sub_ctx.command.invoke(sub_ctx))\r\n2020-05-21T17:14:02.2611451Z File \"/opt/hostedtoolcache/Python/3.8.3/x64/lib/python3.8/site-packages/click/core.py\", line 1259, in invoke\r\n2020-05-21T17:14:02.2611989Z return _process_result(sub_ctx.command.invoke(sub_ctx))\r\n2020-05-21T17:14:02.2612682Z File \"/opt/hostedtoolcache/Python/3.8.3/x64/lib/python3.8/site-packages/click/core.py\", line 1066, in invoke\r\n2020-05-21T17:14:02.2613117Z return ctx.invoke(self.callback, **ctx.params)\r\n2020-05-21T17:14:02.2613801Z File \"/opt/hostedtoolcache/Python/3.8.3/x64/lib/python3.8/site-packages/click/core.py\", line 610, in invoke\r\n2020-05-21T17:14:02.2614235Z return callback(*args, **kwargs)\r\n2020-05-21T17:14:02.2614946Z File \"/opt/hostedtoolcache/Python/3.8.3/x64/lib/python3.8/site-packages/datasette/publish/cloudrun.py\", line 111, in cloudrun\r\n2020-05-21T17:14:02.2615371Z with temporary_docker_directory(\r\n2020-05-21T17:14:02.2615769Z File \"/opt/hostedtoolcache/Python/3.8.3/x64/lib/python3.8/contextlib.py\", line 113, in __enter__\r\n2020-05-21T17:14:02.2616135Z return next(self.gen)\r\n2020-05-21T17:14:02.2616957Z File \"/opt/hostedtoolcache/Python/3.8.3/x64/lib/python3.8/site-packages/datasette/utils/__init__.py\", line 392, in temporary_docker_directory\r\n2020-05-21T17:14:02.2617403Z link_or_copy_directory(\r\n2020-05-21T17:14:02.2618298Z File \"/opt/hostedtoolcache/Python/3.8.3/x64/lib/python3.8/site-packages/datasette/utils/__init__.py\", line 607, in link_or_copy_directory\r\n2020-05-21T17:14:02.2619270Z shutil.copytree(src, dst)\r\n2020-05-21T17:14:02.2619872Z File \"/opt/hostedtoolcache/Python/3.8.3/x64/lib/python3.8/shutil.py\", line 554, in copytree\r\n2020-05-21T17:14:02.2622179Z return _copytree(entries=entries, src=src, dst=dst, symlinks=symlinks,\r\n2020-05-21T17:14:02.2622609Z File \"/opt/hostedtoolcache/Python/3.8.3/x64/lib/python3.8/shutil.py\", line 455, in _copytree\r\n2020-05-21T17:14:02.2622878Z os.makedirs(dst, exist_ok=dirs_exist_ok)\r\n2020-05-21T17:14:02.2623157Z File \"/opt/hostedtoolcache/Python/3.8.3/x64/lib/python3.8/os.py\", line 223, in makedirs\r\n2020-05-21T17:14:02.2623405Z mkdir(name, mode)\r\n2020-05-21T17:14:02.2623978Z FileExistsError: [Errno 17] File exists: '/tmp/tmpq47xi96y/datasette/templates'\r\n```", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 608058890, "label": "link_or_copy_directory() error - Invalid cross-device link"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/744#issuecomment-632237195", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/744", "id": 632237195, "node_id": "MDEyOklzc3VlQ29tbWVudDYzMjIzNzE5NQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-05-21T17:23:39Z", "updated_at": "2020-05-21T17:23:48Z", "author_association": "OWNER", "body": "Actually maybe the answer here is to use `dirs_exist_ok=True` when calling `shutil.copytree`.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 608058890, "label": "link_or_copy_directory() error - Invalid cross-device link"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/744#issuecomment-632249565", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/744", "id": 632249565, "node_id": "MDEyOklzc3VlQ29tbWVudDYzMjI0OTU2NQ==", "user": {"value": 30607, "label": "aborruso"}, "created_at": "2020-05-21T17:47:40Z", "updated_at": "2020-05-21T17:47:40Z", "author_association": "NONE", "body": "@simonw can I test it know? What I must do to update it?\r\n\r\nThank you", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 608058890, "label": "link_or_copy_directory() error - Invalid cross-device link"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/744#issuecomment-632253073", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/744", "id": 632253073, "node_id": "MDEyOklzc3VlQ29tbWVudDYzMjI1MzA3Mw==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-05-21T17:54:55Z", "updated_at": "2020-05-21T17:54:55Z", "author_association": "OWNER", "body": "I think this is the fix! I just landed it in master.\r\n\r\n@aborruso you can install Datasette master to test it out like this:\r\n\r\n pip install https://github.com/simonw/datasette/archive/cee671a58f417f827d1735b1abaa40716534ea67.zip", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 608058890, "label": "link_or_copy_directory() error - Invalid cross-device link"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/744#issuecomment-632255088", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/744", "id": 632255088, "node_id": "MDEyOklzc3VlQ29tbWVudDYzMjI1NTA4OA==", "user": {"value": 30607, "label": "aborruso"}, "created_at": "2020-05-21T17:58:51Z", "updated_at": "2020-05-21T17:58:51Z", "author_association": "NONE", "body": "Thank you very much!!\r\n\r\nI will try and I write you here", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 608058890, "label": "link_or_copy_directory() error - Invalid cross-device link"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/744#issuecomment-632305868", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/744", "id": 632305868, "node_id": "MDEyOklzc3VlQ29tbWVudDYzMjMwNTg2OA==", "user": {"value": 30607, "label": "aborruso"}, "created_at": "2020-05-21T19:43:23Z", "updated_at": "2020-05-21T19:43:23Z", "author_association": "NONE", "body": "@simonw now I have\r\n\r\n```\r\nTraceback (most recent call last):\r\n File \"/home/aborruso/.local/bin/datasette\", line 8, in \r\n sys.exit(cli())\r\n File \"/home/aborruso/.local/lib/python3.7/site-packages/click/core.py\", line 829, in __call__\r\n return self.main(*args, **kwargs)\r\n File \"/home/aborruso/.local/lib/python3.7/site-packages/click/core.py\", line 782, in main\r\n rv = self.invoke(ctx)\r\n File \"/home/aborruso/.local/lib/python3.7/site-packages/click/core.py\", line 1259, in invoke\r\n return _process_result(sub_ctx.command.invoke(sub_ctx))\r\n File \"/home/aborruso/.local/lib/python3.7/site-packages/click/core.py\", line 1259, in invoke\r\n return _process_result(sub_ctx.command.invoke(sub_ctx))\r\n File \"/home/aborruso/.local/lib/python3.7/site-packages/click/core.py\", line 1066, in invoke\r\n return ctx.invoke(self.callback, **ctx.params)\r\n File \"/home/aborruso/.local/lib/python3.7/site-packages/click/core.py\", line 610, in invoke\r\n return callback(*args, **kwargs)\r\n File \"/home/aborruso/.local/lib/python3.7/site-packages/datasette/publish/heroku.py\", line 103, in heroku\r\n extra_metadata,\r\n File \"/usr/lib/python3.7/contextlib.py\", line 112, in __enter__\r\n return next(self.gen)\r\n File \"/home/aborruso/.local/lib/python3.7/site-packages/datasette/publish/heroku.py\", line 191, in temporary_heroku_directory\r\n os.path.join(tmp.name, \"templates\"),\r\n File \"/home/aborruso/.local/lib/python3.7/site-packages/datasette/utils/__init__.py\", line 605, in link_or_copy_directory\r\n shutil.copytree(src, dst, copy_function=os.link, dirs_exist_ok=True)\r\nTypeError: copytree() got an unexpected keyword argument 'dirs_exist_ok'\r\n```\r\n\r\nDo I must open a new issue?\r\n\r\nThank you", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 608058890, "label": "link_or_copy_directory() error - Invalid cross-device link"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/767#issuecomment-632398475", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/767", "id": 632398475, "node_id": "MDEyOklzc3VlQ29tbWVudDYzMjM5ODQ3NQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-05-21T23:36:00Z", "updated_at": "2020-05-21T23:36:00Z", "author_association": "OWNER", "body": "Interesting. So this would take effect exclusively on pages that link to the queries, which I think just means this page: https://latest.datasette.io/fixtures\r\n\r\nHow about this for the design: there's a new optional key in the metadata configuration for a query called `\"fragment\"` - used like this:\r\n\r\n```json\r\n{\r\n \"databases\": {\r\n \"fixtures\": {\r\n \"queries\": {\r\n \"neighborhood_search\": {\r\n \"sql\": \"\\nselect neighborhood, facet_cities.name, state\\nfrom facetable\\n join facet_cities\\n on facetable.city_id = facet_cities.id\\nwhere neighborhood like '%' || :text || '%'\\norder by neighborhood;\\n\",\r\n \"title\": \"Search neighborhoods\",\r\n \"description_html\": \"Demonstrating simple like search\",\r\n \"name\": \"neighborhood_search\",\r\n \"fragment\": \"sql-format\"\r\n }\r\n }\r\n }\r\n }\r\n}\r\n```\r\nBecause of the `\"fragment\": \"sql-format\"` bit there the link to that query from https://latest.datasette.io/fixtures would be to `https://latest.datasette.io/fixtures/neighborhood_search#sql-format`.\r\n\r\nDoes that cover what you need here? Have I missed anything?", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 620969465, "label": "Allow to specify a URL fragment for canned queries"}, "performed_via_github_app": null}