{"id": 349827640, "node_id": "MDU6SXNzdWUzNDk4Mjc2NDA=", "number": 359, "title": "Faceted browse against a JSON list of tags", "user": {"value": 9599, "label": "simonw"}, "state": "closed", "locked": 0, "assignee": null, "milestone": null, "comments": 6, "created_at": "2018-08-12T17:01:14Z", "updated_at": "2019-05-29T21:39:12Z", "closed_at": "2019-05-03T00:21:44Z", "author_association": "OWNER", "pull_request": null, "body": "If a table has a `[\"foo\", \"bar\", \"baz\"]` JSON column allow that to be faceted against.\r\n\r\n- [x] Support `?column__arraycontains=x` filter queries\r\n- [x] Support `?_facet_array=column` faceting", "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/359/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": 431800286, "node_id": "MDU6SXNzdWU0MzE4MDAyODY=", "number": 427, "title": "New design for facet abstraction, including querystring and metadata.json", "user": {"value": 9599, "label": "simonw"}, "state": "closed", "locked": 0, "assignee": null, "milestone": null, "comments": 10, "created_at": "2019-04-11T02:24:15Z", "updated_at": "2019-05-29T21:39:12Z", "closed_at": "2019-05-03T00:11:29Z", "author_association": "OWNER", "pull_request": null, "body": "I need a better design for query strings for facets (and for how facets are enabled in `metadata.json`).\r\n\r\nThink of all of the potential kinds of facets:\r\n\r\n* `?_facet_array=tags` where tags is a JSON array of values\r\n* `_facet_date=datetimecol` - faceted by date part of a datetime\r\n* `_facet_bins=numeric_column` - can I do some kind of fancy binning here? Might need to take an argument\r\n* `?_facet_bins=numeric_column:5` - could be a way to take an argument. We\u2019ll ignore columns with a : in their name.\r\n* `?_facet_json=jsoncol:jsonpath` - could use a JSON path to extract out something to facet on?\r\n* `?_facet_percentile=numericcolumn` - could this work?\r\n* `?_facet_function=column:sqlfunctionname` - maybe this could be interesting? Would allow for e.g. facet by soundex\r\n* `?_facet_prefix=column:prefix` - facet by terms but only if they start with a specific prefix\r\n* `?_facet_substring=column:3,6` - facet by a substr(column, 3, 6)\r\n\r\nMaybe bundling JSON in querystrings is a way to do options?\r\n\r\n`?_facet_distance={\"latitude_column\":\"x\",...}`\r\n\r\nCould detect values starting with `{` - and if for some weird reason you have a column starting with that character you can pass this instead: `?_facet_percentile={\"column\": \"{value}\"}`\r\n\r\nThis could even be the mechanism that allows us to extend regular facets to support additional options like adding a sum or max to each one.\r\n\r\nProblem: it\u2019s not obvious what the name associated with these facets should be. What if one column is faceted multiple times using multiple facet variants?\r\n\r\nMaybe just number them? name1=\u2026 name2=\u2026 etc?\r\n\r\nOther option is to use Solr style querystring syntax for notation. Solr does this: `?f.price.facet.range.gap=100&f.age.facet.range.gap=10`\r\n\r\nSo how about this:\r\n\r\n`?_facet_range=age&_facet_range.span=5`\r\n\r\nRelated: #359", "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/427/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": 439487648, "node_id": "MDExOlB1bGxSZXF1ZXN0Mjc1MjgxMzA3", "number": 444, "title": "Add a max-line-length setting for flake8", "user": {"value": 45057, "label": "russss"}, "state": "closed", "locked": 0, "assignee": null, "milestone": null, "comments": 0, "created_at": "2019-05-02T08:58:57Z", "updated_at": "2019-05-04T09:44:48Z", "closed_at": "2019-05-03T13:11:28Z", "author_association": "CONTRIBUTOR", "pull_request": "simonw/datasette/pulls/444", "body": "This stops my automatic editor linting from flagging lines which are too\r\nlong. It's been lingering in my checkout for ages.\r\n\r\n160 is an arbitrary large number - we could alter it if we have any\r\nopinions (but I find the line length limit to be my least favourite part\r\nof PEP8).", "repo": {"value": 107914493, "label": "datasette"}, "type": "pull", "active_lock_reason": null, "performed_via_github_app": null, "reactions": "{\"url\": \"https://api.github.com/repos/simonw/datasette/issues/444/reactions\", \"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "draft": 0, "state_reason": null} {"id": 434321685, "node_id": "MDExOlB1bGxSZXF1ZXN0MjcxMzM4NDA1", "number": 434, "title": "\"datasette publish cloudrun\" command to publish to Google Cloud Run", "user": {"value": 10352819, "label": "rprimet"}, "state": "closed", "locked": 0, "assignee": null, "milestone": null, "comments": 8, "created_at": "2019-04-17T14:41:18Z", "updated_at": "2019-05-03T21:50:44Z", "closed_at": "2019-05-03T13:59:02Z", "author_association": "CONTRIBUTOR", "pull_request": "simonw/datasette/pulls/434", "body": "This is a very rough draft to start a discussion on a possible datasette cloud run publish plugin (see issue #400).\r\n\r\nThe main change was to dynamically set the listening port in `make_dockerfile` to satisfy cloud run's [requirements](https://cloud.google.com/run/docs/reference/container-contract).\r\n\r\nThis was done by running `datasette` through `sh` to get environment variable substitution. Not sure if that's the right approach?\r\n", "repo": {"value": 107914493, "label": "datasette"}, "type": "pull", "active_lock_reason": null, "performed_via_github_app": null, "reactions": "{\"url\": \"https://api.github.com/repos/simonw/datasette/issues/434/reactions\", \"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "draft": 0, "state_reason": null} {"id": 374675798, "node_id": "MDExOlB1bGxSZXF1ZXN0MjI2MzE0ODYy", "number": 367, "title": "Mark codemirror files as vendored", "user": {"value": 48517, "label": "jaap3"}, "state": "closed", "locked": 0, "assignee": null, "milestone": null, "comments": 2, "created_at": "2018-10-27T18:41:25Z", "updated_at": "2019-05-03T21:12:09Z", "closed_at": "2019-05-03T21:11:20Z", "author_association": "CONTRIBUTOR", "pull_request": "simonw/datasette/pulls/367", "body": "GitHub lists datasette as a Javascript project, primarily because of the vendored codemirror files. This is somewhat confusing when you're looking for datasette, knowing it's written in Python.\r\n\r\nLuckily it's possible exclude certain files from GitHub's code statistics: https://github.com/github/linguist#using-gitattributes", "repo": {"value": 107914493, "label": "datasette"}, "type": "pull", "active_lock_reason": null, "performed_via_github_app": null, "reactions": "{\"url\": \"https://api.github.com/repos/simonw/datasette/issues/367/reactions\", \"total_count\": 1, \"+1\": 1, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "draft": 0, "state_reason": null} {"id": 438450757, "node_id": "MDExOlB1bGxSZXF1ZXN0Mjc0NDc4NzYx", "number": 442, "title": "Suppress rendering of binary data", "user": {"value": 45057, "label": "russss"}, "state": "closed", "locked": 0, "assignee": null, "milestone": null, "comments": 2, "created_at": "2019-04-29T18:36:41Z", "updated_at": "2019-05-03T18:26:48Z", "closed_at": "2019-05-03T16:44:49Z", "author_association": "CONTRIBUTOR", "pull_request": "simonw/datasette/pulls/442", "body": "Binary columns (including spatialite geographies) get shown as ugly\r\nbinary strings in the HTML by default. Nobody wants to see that mess.\r\n\r\nShow the size of the column in bytes instead. If you want to decode\r\nthe binary data, you can use a plugin to do it.", "repo": {"value": 107914493, "label": "datasette"}, "type": "pull", "active_lock_reason": null, "performed_via_github_app": null, "reactions": "{\"url\": \"https://api.github.com/repos/simonw/datasette/issues/442/reactions\", \"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "draft": 0, "state_reason": null} {"id": 374676773, "node_id": "MDExOlB1bGxSZXF1ZXN0MjI2MzE1NTEz", "number": 368, "title": "Update installation instructions", "user": {"value": 48517, "label": "jaap3"}, "state": "closed", "locked": 0, "assignee": null, "milestone": null, "comments": 0, "created_at": "2018-10-27T18:52:31Z", "updated_at": "2019-05-03T18:18:43Z", "closed_at": "2019-05-03T18:18:42Z", "author_association": "CONTRIBUTOR", "pull_request": "simonw/datasette/pulls/368", "body": "I was writing this as a response to your tweet, but decided I might just make it a pull request.\r\n\r\nI feel like it might be confusing to those unfamiliar with Python's `-m` flag and the built-in `venv` module to omit the space between the flag and its argument. By adding a space and prefixing the second occurrence of `venv` with a `./` it's maybe a bit clearer what the arguments are and what they do.\r\n\r\nBy also using `python3 -m pip` it becomes even clearer that `-m` is a special flag that makes the python executable do neat things.", "repo": {"value": 107914493, "label": "datasette"}, "type": "pull", "active_lock_reason": null, "performed_via_github_app": null, "reactions": "{\"url\": \"https://api.github.com/repos/simonw/datasette/issues/368/reactions\", \"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "draft": 0, "state_reason": null} {"id": 439836586, "node_id": "MDExOlB1bGxSZXF1ZXN0Mjc1NTU4NjEy", "number": 445, "title": "Extract facet code out into a new plugin hook, closes #427", "user": {"value": 9599, "label": "simonw"}, "state": "closed", "locked": 0, "assignee": null, "milestone": null, "comments": 0, "created_at": "2019-05-03T00:02:41Z", "updated_at": "2019-05-03T18:17:18Z", "closed_at": "2019-05-03T00:11:27Z", "author_association": "OWNER", "pull_request": "simonw/datasette/pulls/445", "body": "Datasette previously only supported one type of faceting: exact column value counting.\r\n\r\nWith this change, faceting logic is extracted out into one or more separate classes which can implement other patterns of faceting - this is discussed in #427, but potential upcoming facet types include facet-by-date, facet-by-JSON-array, facet-by-many-2-many and more.\r\n\r\nA new plugin hook, register_facet_classes, can be used by plugins to add in additional facet classes.\r\n\r\nEach class must implement two methods: suggest(), which scans columns in the table to decide if they might be worth suggesting for faceting, and facet_results(), which executes the facet operation and returns results ready to be displayed in the UI.", "repo": {"value": 107914493, "label": "datasette"}, "type": "pull", "active_lock_reason": null, "performed_via_github_app": null, "reactions": "{\"url\": \"https://api.github.com/repos/simonw/datasette/issues/445/reactions\", \"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "draft": 0, "state_reason": null} {"id": 440159137, "node_id": "MDExOlB1bGxSZXF1ZXN0Mjc1ODAxNDYz", "number": 447, "title": "Use dist: xenial and python: 3.7 on Travis", "user": {"value": 9599, "label": "simonw"}, "state": "closed", "locked": 0, "assignee": null, "milestone": null, "comments": 1, "created_at": "2019-05-03T18:07:07Z", "updated_at": "2019-05-03T18:17:05Z", "closed_at": "2019-05-03T18:16:53Z", "author_association": "OWNER", "pull_request": "simonw/datasette/pulls/447", "body": "", "repo": {"value": 107914493, "label": "datasette"}, "type": "pull", "active_lock_reason": null, "performed_via_github_app": null, "reactions": "{\"url\": \"https://api.github.com/repos/simonw/datasette/issues/447/reactions\", \"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "draft": 0, "state_reason": null} {"id": 398559195, "node_id": "MDU6SXNzdWUzOTg1NTkxOTU=", "number": 400, "title": "datasette publish cloudrun plugin", "user": {"value": 10352819, "label": "rprimet"}, "state": "closed", "locked": 0, "assignee": null, "milestone": null, "comments": 1, "created_at": "2019-01-12T14:35:11Z", "updated_at": "2019-05-03T16:57:35Z", "closed_at": "2019-05-03T16:57:35Z", "author_association": "CONTRIBUTOR", "pull_request": null, "body": "Google announced that they may launch a simple service for running Docker containers (previously serverless containers, now called \"cloud run\" -- link to alpha [here](https://services.google.com/fb/forms/serverlesscontainers/)). If/when this happens, it might be a good fit for publishing datasettes? (at least using the current version, manually publishing a datasette seems relatively painless).", "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/400/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": 439480260, "node_id": "MDExOlB1bGxSZXF1ZXN0Mjc1Mjc1NjEw", "number": 443, "title": "Pass view_name to extra_body_script hook", "user": {"value": 45057, "label": "russss"}, "state": "closed", "locked": 0, "assignee": null, "milestone": null, "comments": 0, "created_at": "2019-05-02T08:38:36Z", "updated_at": "2019-05-03T13:12:20Z", "closed_at": "2019-05-03T13:12:20Z", "author_association": "CONTRIBUTOR", "pull_request": "simonw/datasette/pulls/443", "body": "At the moment it's not easy to tell whether the hook is being called\r\nin (for example) the row or table view, as in both cases the\r\n`database` and `table` parameters are provided.\r\n\r\nThis passes the `view_name` added in #441 to the `extra_body_script`\r\nhook.", "repo": {"value": 107914493, "label": "datasette"}, "type": "pull", "active_lock_reason": null, "performed_via_github_app": null, "reactions": "{\"url\": \"https://api.github.com/repos/simonw/datasette/issues/443/reactions\", \"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "draft": 0, "state_reason": null} {"id": 432893491, "node_id": "MDExOlB1bGxSZXF1ZXN0MjcwMjUxMDIx", "number": 432, "title": "Refactor facets to a class and new plugin, refs #427", "user": {"value": 9599, "label": "simonw"}, "state": "closed", "locked": 0, "assignee": null, "milestone": null, "comments": 4, "created_at": "2019-04-13T20:04:45Z", "updated_at": "2019-05-03T00:04:24Z", "closed_at": "2019-05-03T00:04:24Z", "author_association": "OWNER", "pull_request": "simonw/datasette/pulls/432", "body": "WIP for #427", "repo": {"value": 107914493, "label": "datasette"}, "type": "pull", "active_lock_reason": null, "performed_via_github_app": null, "reactions": "{\"url\": \"https://api.github.com/repos/simonw/datasette/issues/432/reactions\", \"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "draft": 0, "state_reason": null}