{"id": 505769462, "node_id": "MDExOlB1bGxSZXF1ZXN0NTA1NzY5NDYy", "number": 1031, "state": "closed", "locked": 0, "title": "Fallback to databases in inspect-data.json when no -i options are passed", "user": {"value": 299380, "label": "frankier"}, "body": "Currenlty `Datasette.__init__` checks immutables against None to decide whether to fallback to inspect-data.json. This patch modifies the serve command to pass None when no -i options are passed so this fallback works correctly.", "created_at": "2020-10-19T07:51:06Z", "updated_at": "2021-03-29T01:46:45Z", "closed_at": "2021-03-29T00:23:41Z", "merged_at": null, "merge_commit_sha": "3ee6b39e96ef684e1ac393bb269d804e957fee1d", "assignee": null, "milestone": null, "draft": 0, "head": "7e7eaa4e712b01de0b5a8a1b90145bdc1c3cd731", "base": "c37a0a93ecb847e66cfe7b6f9452ba210fcae91b", "author_association": "FIRST_TIME_CONTRIBUTOR", "repo": {"value": 107914493, "label": "datasette"}, "url": "https://github.com/simonw/datasette/pull/1031", "merged_by": null, "auto_merge": null} {"id": 575187457, "node_id": "MDExOlB1bGxSZXF1ZXN0NTc1MTg3NDU3", "number": 1229, "state": "closed", "locked": 0, "title": "ensure immutable databses when starting in configuration directory mode with", "user": {"value": 295329, "label": "camallen"}, "body": "fixes #1224 \r\n\r\nThis PR ensures all databases found in a configuration directory that match the files in `inspect-data.json` will be set to `immutable` as outlined in https://docs.datasette.io/en/latest/settings.html#configuration-directory-mode\r\n\r\nspecifically on building the `datasette` instance it checks:\r\n- if `immutables` is an empty tuple - as passed by the cli code\r\n- if `immutables` is the default function value `None` - when it's not explicitly set\r\n\r\nAnd correctly builds the immutable database list from the `inspect-data[file]` keys.\r\n\r\nNote for this to work the `inspect-data.json` file must contain `file` paths which are relative to the configuration directory otherwise the file paths won't match and the dbs won't be set to immutable. \r\n\r\nI couldn't find an easy way to test this due to the way `make_app_client` works, happy to take directions on adding a test for this. \r\n\r\nI've updated the relevant docs as well, i.e. use the `inspect` cli cmd from the config directory path to create the relevant file\r\n```\r\ncd $config_dir\r\ndatasette inspect *.db --inspect-file=inspect-data.json\r\n```\r\nhttps://docs.datasette.io/en/latest/performance.html#using-datasette-inspect", "created_at": "2021-02-17T20:18:26Z", "updated_at": "2022-04-22T13:16:36Z", "closed_at": "2021-03-29T00:17:32Z", "merged_at": "2021-03-29T00:17:31Z", "merge_commit_sha": "f92d823766872a6fd7e76c5249a6b2de1ab0f447", "assignee": null, "milestone": null, "draft": 0, "head": "a095248ad18c9c5272dbd52f4c97ea8a36cf91f3", "base": "8e18c7943181f228ce5ebcea48deb59ce50bee1f", "author_association": "CONTRIBUTOR", "repo": {"value": 107914493, "label": "datasette"}, "url": "https://github.com/simonw/datasette/pull/1229", "merged_by": null, "auto_merge": null} {"id": 587332473, "node_id": "MDExOlB1bGxSZXF1ZXN0NTg3MzMyNDcz", "number": 1252, "state": "closed", "locked": 0, "title": "Add back styling to lists within table cells (fixes #1141)", "user": {"value": 7476523, "label": "bobwhitelock"}, "body": "This overrides the Datasette reset - see https://github.com/simonw/datasette/blob/d0fd833b8cdd97e1b91d0f97a69b494895d82bee/datasette/static/app.css#L35-L38 - to add back the default styling of list items displayed within Datasette table cells.\r\n\r\nFollowing this change, the same content as in the original issue looks like this:\r\n\r\n![2021-03-09_02:57:32](https://user-images.githubusercontent.com/7476523/110411982-63e5ae80-8083-11eb-9b5c-e5dc825073e2.png)\r\n", "created_at": "2021-03-09T03:00:57Z", "updated_at": "2021-03-29T00:14:04Z", "closed_at": "2021-03-29T00:14:04Z", "merged_at": "2021-03-29T00:14:04Z", "merge_commit_sha": "e72397d65b06b019521b6411243687464ac8d8ca", "assignee": null, "milestone": null, "draft": 0, "head": "d22aa32cd9c0f798bcab917cc2024a371b4c0069", "base": "d0fd833b8cdd97e1b91d0f97a69b494895d82bee", "author_association": "CONTRIBUTOR", "repo": {"value": 107914493, "label": "datasette"}, "url": "https://github.com/simonw/datasette/pull/1252", "merged_by": null, "auto_merge": null} {"id": 592548103, "node_id": "MDExOlB1bGxSZXF1ZXN0NTkyNTQ4MTAz", "number": 1260, "state": "closed", "locked": 0, "title": "Fix: code quality issues", "user": {"value": 25361949, "label": "withshubh"}, "body": "### Description\r\nHi :wave: I work at [DeepSource](https://deepsource.io), I ran DeepSource analysis on the forked copy of this repo and found some interesting [code quality issues](https://deepsource.io/gh/withshubh/datasette/issues/?category=recommended) in the codebase, opening this PR so you can assess if our platform is right and helpful for you.\r\n\r\n### Summary of changes\r\n\r\n- Replaced ternary syntax with if expression\r\n- Removed redundant `None` default\r\n- Used `is` to compare type of objects\r\n- Iterated dictionary directly\r\n- Removed unnecessary lambda expression\r\n- Refactored unnecessary `else` / `elif` when `if` block has a `return` statement\r\n- Refactored unnecessary `else` / `elif` when `if` block has a `raise` statement\r\n- Added .deepsource.toml to continuously analyze and detect code quality issues", "created_at": "2021-03-14T13:56:10Z", "updated_at": "2021-03-29T00:22:41Z", "closed_at": "2021-03-29T00:22:41Z", "merged_at": null, "merge_commit_sha": "bc868ae8c8152a25bcab7adb490c5b89411bdf3a", "assignee": null, "milestone": null, "draft": 0, "head": "90f5fb6d2fb36ddffc49acee924d042f2d5d1d58", "base": "8e18c7943181f228ce5ebcea48deb59ce50bee1f", "author_association": "NONE", "repo": {"value": 107914493, "label": "datasette"}, "url": "https://github.com/simonw/datasette/pull/1260", "merged_by": null, "auto_merge": null} {"id": 602107935, "node_id": "MDExOlB1bGxSZXF1ZXN0NjAyMTA3OTM1", "number": 1279, "state": "closed", "locked": 0, "title": "Minor Docs Update. Added `--app` to fly install command.", "user": {"value": 1019791, "label": "koaning"}, "body": "Without this flag, there's an error locally. \r\n\r\n```\r\n> datasette publish fly bigmac.db\r\n\r\nUsage: datasette publish fly [OPTIONS] [FILES]...\r\nTry 'datasette publish fly --help' for help.\r\n\r\nError: Missing option '-a' / '--app'.\r\n```\r\n\r\nI also got an error message which later turned out to be because I hadn't added my credit card information yet to `fly`. I wasn't sure if I should add that mention to the docs here, or to submit a bug-report over at https://github.com/simonw/datasette-publish-fly. ", "created_at": "2021-03-27T16:58:08Z", "updated_at": "2021-03-29T00:11:55Z", "closed_at": "2021-03-29T00:11:55Z", "merged_at": "2021-03-29T00:11:55Z", "merge_commit_sha": "c96a3826cf50cb347f6a415b56d8105ba6d8dcb0", "assignee": null, "milestone": null, "draft": 0, "head": "14d8977e158d1d3193c6afb50aae482547ec9d8d", "base": "3fcfc8513465339ac5f055296cbb67f5262af02b", "author_association": "CONTRIBUTOR", "repo": {"value": 107914493, "label": "datasette"}, "url": "https://github.com/simonw/datasette/pull/1279", "merged_by": null, "auto_merge": null} {"id": 603082280, "node_id": "MDExOlB1bGxSZXF1ZXN0NjAzMDgyMjgw", "number": 1282, "state": "closed", "locked": 0, "title": "Fix little typo", "user": {"value": 192568, "label": "mroswell"}, "body": "", "created_at": "2021-03-29T19:45:28Z", "updated_at": "2021-03-29T19:57:34Z", "closed_at": "2021-03-29T19:57:34Z", "merged_at": "2021-03-29T19:57:34Z", "merge_commit_sha": "7b1a9a1999eb9326ce8ec830d75ac200e5279c46", "assignee": null, "milestone": null, "draft": 0, "head": "08f7427afcff69fa93ebaf5916588b5ad8bd4e0f", "base": "0486303b60ce2784fd2e2ecdbecf304b7d6e6659", "author_association": "CONTRIBUTOR", "repo": {"value": 107914493, "label": "datasette"}, "url": "https://github.com/simonw/datasette/pull/1282", "merged_by": null, "auto_merge": null}