home / github

Menu
  • Search all tables
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

26 rows where "updated_at" is on date 2022-03-15 sorted by updated_at descending

✎ View and edit SQL

This data as json, CSV (advanced)

Suggested facets: issue_url, updated_at (date)

issue 15

  • Tilde encoding: use ~ instead of - for dash-encoding 7
  • Refactor and simplify Datasette routing and views 3
  • Move hashed URL mode out to a plugin 2
  • Datasette 1.0 JSON API (and documentation) 2
  • Remove Hashed URL mode 2
  • Comprehensive documentation for variables made available to templates 1
  • Refactor default views to use register_routes 1
  • sqlite-utils insert: options for column types 1
  • Refactor .csv to be an output renderer - and teach register_output_renderer to stream all rows 1
  • Rethink how .ext formats (v.s. ?_format=) works before 1.0 1
  • Datasette 1.0 documented template context (maybe via API docs) 1
  • Get rid of the no-longer necessary ?_format=json hack for tables called x.json 1
  • Update pytest requirement from <7.1.0,>=5.2.2 to >=5.2.2,<7.2.0 1
  • Revert main to version that passes tests 1
  • Tilde encoding 1

user 3

  • simonw 23
  • codecov[bot] 2
  • eyeseast 1

author_association 3

  • OWNER 23
  • NONE 2
  • CONTRIBUTOR 1
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions issue performed_via_github_app
1068554827 https://github.com/simonw/datasette/issues/1661#issuecomment-1068554827 https://api.github.com/repos/simonw/datasette/issues/1661 IC_kwDOBm6k_c4_sNpL simonw 9599 2022-03-15T23:16:58Z 2022-03-15T23:18:58Z OWNER

If you attempt to use the old setting:

datasette mydatabase.db --setting hash_urls 1

It should error with a message saying that the feature has been moved to a plugin.

I'll do this with a deprecated_settings mechanism so the error can be detected even though datasette --help-settings will no longer return the setting.

https://github.com/simonw/datasette/blob/77a904fea14f743560af9cc668146339bdbbd0a9/datasette/cli.py#L479-L489

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Remove Hashed URL mode 1170355774  
1068553454 https://github.com/simonw/datasette/issues/1661#issuecomment-1068553454 https://api.github.com/repos/simonw/datasette/issues/1661 IC_kwDOBm6k_c4_sNTu simonw 9599 2022-03-15T23:14:37Z 2022-03-15T23:14:37Z OWNER

This is going to simplify the code in the various view classes substantially: - #1660

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Remove Hashed URL mode 1170355774  
1068552696 https://github.com/simonw/datasette/issues/647#issuecomment-1068552696 https://api.github.com/repos/simonw/datasette/issues/647 IC_kwDOBm6k_c4_sNH4 simonw 9599 2022-03-15T23:13:06Z 2022-03-15T23:13:06Z OWNER

The plugin works. I'm going to implement one last feature for it:

  • https://github.com/simonw/datasette-hashed-urls/issues/3

Then I can remove hashed URL mode in a separate issue.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Move hashed URL mode out to a plugin 531755959  
1068539404 https://github.com/simonw/datasette/issues/647#issuecomment-1068539404 https://api.github.com/repos/simonw/datasette/issues/647 IC_kwDOBm6k_c4_sJ4M simonw 9599 2022-03-15T22:49:01Z 2022-03-15T22:49:01Z OWNER

I shipped the first version of this: https://github.com/simonw/datasette-hashed-urls

Next step: test it with a live demo: - https://github.com/simonw/datasette-hashed-urls/issues/2

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Move hashed URL mode out to a plugin 531755959  
1068461449 https://github.com/simonw/datasette/issues/1439#issuecomment-1068461449 https://api.github.com/repos/simonw/datasette/issues/1439 IC_kwDOBm6k_c4_r22J simonw 9599 2022-03-15T20:51:26Z 2022-03-15T20:51:26Z OWNER

I'm happy with this now that I've landed Tilde encoding in #1657.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Rethink how .ext formats (v.s. ?_format=) works before 1.0 973139047  
1068450483 https://github.com/simonw/datasette/issues/857#issuecomment-1068450483 https://api.github.com/repos/simonw/datasette/issues/857 IC_kwDOBm6k_c4_r0Kz simonw 9599 2022-03-15T20:43:55Z 2022-03-15T20:43:55Z OWNER

Dupe of #1510.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Comprehensive documentation for variables made available to templates 642297505  
1068445412 https://github.com/simonw/datasette/issues/1509#issuecomment-1068445412 https://api.github.com/repos/simonw/datasette/issues/1509 IC_kwDOBm6k_c4_ry7k simonw 9599 2022-03-15T20:37:50Z 2022-03-15T20:38:56Z OWNER

... maybe Datasette itself should include interactive API documentation, in addition to documenting it in the manual?

/dbname/table/-/apidocs could return documentation about the specific table, taking into account columns and types.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Datasette 1.0 JSON API (and documentation) 1054243511  
1068444767 https://github.com/simonw/datasette/issues/1509#issuecomment-1068444767 https://api.github.com/repos/simonw/datasette/issues/1509 IC_kwDOBm6k_c4_ryxf simonw 9599 2022-03-15T20:37:03Z 2022-03-15T20:37:03Z OWNER

Idea: I could add Pydantic https://pydantic-docs.helpmanual.io/usage/schema/ as an optional test dependency and use it to generate JSON schemas and run validation against examples in the API documentation.

Maybe generate API documentation from it too?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Datasette 1.0 JSON API (and documentation) 1054243511  
1068443509 https://github.com/simonw/datasette/issues/1510#issuecomment-1068443509 https://api.github.com/repos/simonw/datasette/issues/1510 IC_kwDOBm6k_c4_ryd1 simonw 9599 2022-03-15T20:35:29Z 2022-03-15T20:35:29Z OWNER

If I set a rule that everything available in the template context MUST also be available via the JSON API (maybe through an extras mechanism) I can combine this with API documentation and solve both at once.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Datasette 1.0 documented template context (maybe via API docs) 1054244712  
650696054 https://github.com/simonw/datasette/issues/870#issuecomment-650696054 https://api.github.com/repos/simonw/datasette/issues/870 MDEyOklzc3VlQ29tbWVudDY1MDY5NjA1NA== simonw 9599 2020-06-28T04:52:41Z 2022-03-15T20:07:17Z OWNER

This would be a lot easier if I had extracted out the hash logic to a plugin, see: - #647

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Refactor default views to use register_routes 646737558  
1068418619 https://github.com/simonw/datasette/issues/1660#issuecomment-1068418619 https://api.github.com/repos/simonw/datasette/issues/1660 IC_kwDOBm6k_c4_rsY7 simonw 9599 2022-03-15T20:06:19Z 2022-03-15T20:06:19Z OWNER

Also related: - #878 - #1512 - #1518 - #870

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Refactor and simplify Datasette routing and views 1170144879  
1068417357 https://github.com/simonw/datasette/issues/1660#issuecomment-1068417357 https://api.github.com/repos/simonw/datasette/issues/1660 IC_kwDOBm6k_c4_rsFN simonw 9599 2022-03-15T20:05:08Z 2022-03-15T20:05:08Z OWNER

DataView is used as the base class for:

  • DatabaseView
  • DatabaseDownload (just so the permissions checks can be called)
  • QueryView - which isn't routed to directly, it's called from DatabaseView if ?sql= is available and TableView for canned queries
  • RowTableShared which is the base class for TableView and RowView
{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Refactor and simplify Datasette routing and views 1170144879  
1068415072 https://github.com/simonw/datasette/issues/1660#issuecomment-1068415072 https://api.github.com/repos/simonw/datasette/issues/1660 IC_kwDOBm6k_c4_rrhg simonw 9599 2022-03-15T20:02:36Z 2022-03-15T20:02:36Z OWNER

This is one of the worst bits - the get_format() method on the DataView base class actually modifies args, including removing keys! Really confusing: https://github.com/simonw/datasette/blob/77a904fea14f743560af9cc668146339bdbbd0a9/datasette/views/base.py#L454-L482

Then BaseView has some surprising responsibilities. It has a utility helper for checking multiple permissions at once:

https://github.com/simonw/datasette/blob/77a904fea14f743560af9cc668146339bdbbd0a9/datasette/views/base.py#L81-L105

And its own render method that adds extra stuff to the template context and handles the rel: alternate header:

https://github.com/simonw/datasette/blob/77a904fea14f743560af9cc668146339bdbbd0a9/datasette/views/base.py#L131-L157

Then DataView does all sorts of weird stuff - from handling database hashes (which I want to remove, see #647):

https://github.com/simonw/datasette/blob/77a904fea14f743560af9cc668146339bdbbd0a9/datasette/views/base.py#L206-L219

To streaming CSV responses: https://github.com/simonw/datasette/blob/77a904fea14f743560af9cc668146339bdbbd0a9/datasette/views/base.py#L286-L308

To handling SQLite exceptions: https://github.com/simonw/datasette/blob/77a904fea14f743560af9cc668146339bdbbd0a9/datasette/views/base.py#L514-L526

And a ton more. It' s a big mess.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Refactor and simplify Datasette routing and views 1170144879  
1068327874 https://github.com/simonw/datasette/issues/1062#issuecomment-1068327874 https://api.github.com/repos/simonw/datasette/issues/1062 IC_kwDOBm6k_c4_rWPC simonw 9599 2022-03-15T18:33:49Z 2022-03-15T18:33:49Z OWNER

I can get regular .json to stream too, using the pattern described in this TIL: https://til.simonwillison.net/python/output-json-array-streaming

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Refactor .csv to be an output renderer - and teach register_output_renderer to stream all rows 732674148  
1068319530 https://github.com/simonw/datasette/issues/1651#issuecomment-1068319530 https://api.github.com/repos/simonw/datasette/issues/1651 IC_kwDOBm6k_c4_rUMq simonw 9599 2022-03-15T18:25:42Z 2022-03-15T18:25:42Z OWNER

Done:

  • https://latest.datasette.io/fixtures/table~2Fwith~2Fslashes~2Ecsv
  • https://latest.datasette.io/fixtures/table~2Fwith~2Fslashes~2Ecsv.csv
  • https://latest.datasette.io/fixtures/table~2Fwith~2Fslashes~2Ecsv.json
{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Get rid of the no-longer necessary ?_format=json hack for tables called x.json 1161584460  
1068318454 https://github.com/simonw/datasette/issues/1657#issuecomment-1068318454 https://api.github.com/repos/simonw/datasette/issues/1657 IC_kwDOBm6k_c4_rT72 simonw 9599 2022-03-15T18:25:11Z 2022-03-15T18:25:11Z OWNER

Demo:

  • https://latest.datasette.io/fixtures/table~2Fwith~2Fslashes~2Ecsv
  • https://latest.datasette.io/fixtures/table~2Fwith~2Fslashes~2Ecsv.csv
  • https://latest.datasette.io/fixtures/table~2Fwith~2Fslashes~2Ecsv.json
{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Tilde encoding: use ~ instead of - for dash-encoding 1168995756  
1068306916 https://github.com/simonw/datasette/issues/1657#issuecomment-1068306916 https://api.github.com/repos/simonw/datasette/issues/1657 IC_kwDOBm6k_c4_rRHk simonw 9599 2022-03-15T18:15:11Z 2022-03-15T18:15:11Z OWNER

Now live here: https://fivethirtyeight.datasettes.com/fivethirtyeight/august-senate-polls~2Faugust_senate_polls

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Tilde encoding: use ~ instead of - for dash-encoding 1168995756  
1068296042 https://github.com/simonw/datasette/issues/1657#issuecomment-1068296042 https://api.github.com/repos/simonw/datasette/issues/1657 IC_kwDOBm6k_c4_rOdq simonw 9599 2022-03-15T18:05:54Z 2022-03-15T18:05:54Z OWNER

Documentation: https://docs.datasette.io/en/latest/internals.html#tilde-encoding

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Tilde encoding: use ~ instead of - for dash-encoding 1168995756  
1068193035 https://github.com/simonw/datasette/pull/1659#issuecomment-1068193035 https://api.github.com/repos/simonw/datasette/issues/1659 IC_kwDOBm6k_c4_q1UL codecov[bot] 22429695 2022-03-15T16:28:25Z 2022-03-15T17:56:09Z NONE

Codecov Report

Merging #1659 (85dde28) into main (c10cd48) will increase coverage by 0.03%. The diff coverage is 100.00%.

:exclamation: Current head 85dde28 differs from pull request most recent head 99b8263. Consider uploading reports for the commit 99b8263 to get more accurate results

```diff @@ Coverage Diff @@

main #1659 +/-

========================================== + Coverage 92.06% 92.10% +0.03%
========================================== Files 34 34
Lines 4576 4584 +8
========================================== + Hits 4213 4222 +9
+ Misses 363 362 -1
```

| Impacted Files | Coverage Δ | | |---|---|---| | datasette/app.py | 94.36% <100.00%> (ø) | | | datasette/url_builder.py | 100.00% <100.00%> (ø) | | | datasette/utils/__init__.py | 94.84% <100.00%> (-0.13%) | :arrow_down: | | datasette/views/base.py | 96.07% <100.00%> (+0.58%) | :arrow_up: | | datasette/views/table.py | 96.21% <100.00%> (+0.01%) | :arrow_up: |


Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update c10cd48...99b8263. Read the comment docs.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Tilde encoding 1169895600  
1068181623 https://github.com/simonw/datasette/issues/1657#issuecomment-1068181623 https://api.github.com/repos/simonw/datasette/issues/1657 IC_kwDOBm6k_c4_qyh3 simonw 9599 2022-03-15T16:18:23Z 2022-03-15T16:18:23Z OWNER

Moving this to a PR.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Tilde encoding: use ~ instead of - for dash-encoding 1168995756  
1068154183 https://github.com/simonw/datasette/pull/1656#issuecomment-1068154183 https://api.github.com/repos/simonw/datasette/issues/1656 IC_kwDOBm6k_c4_qr1H codecov[bot] 22429695 2022-03-15T15:55:34Z 2022-03-15T15:55:34Z NONE

Codecov Report

Merging #1656 (5d9883f) into main (c10cd48) will not change coverage. The diff coverage is n/a.

```diff @@ Coverage Diff @@

main #1656 +/-

======================================= Coverage 92.06% 92.06%
======================================= Files 34 34
Lines 4576 4576
======================================= Hits 4213 4213
Misses 363 363
```


Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update c10cd48...5d9883f. Read the comment docs.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Update pytest requirement from <7.1.0,>=5.2.2 to >=5.2.2,<7.2.0 1168357113  
1068148013 https://github.com/simonw/datasette/issues/1657#issuecomment-1068148013 https://api.github.com/repos/simonw/datasette/issues/1657 IC_kwDOBm6k_c4_qqUt simonw 9599 2022-03-15T15:50:15Z 2022-03-15T15:50:15Z OWNER

The thing that broke everything was this change:

I'm going to bring back the horrible get_format() method for the moment, with its weird mutations of the args object, then try and get rid of it again later.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Tilde encoding: use ~ instead of - for dash-encoding 1168995756  
1068138578 https://github.com/simonw/datasette/issues/1658#issuecomment-1068138578 https://api.github.com/repos/simonw/datasette/issues/1658 IC_kwDOBm6k_c4_qoBS simonw 9599 2022-03-15T15:42:49Z 2022-03-15T15:42:49Z OWNER

Easiest way to do this was with three reverts, then cherry-pick back the code of conduct.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Revert main to version that passes tests 1169840669  
1068126821 https://github.com/simonw/datasette/issues/1657#issuecomment-1068126821 https://api.github.com/repos/simonw/datasette/issues/1657 IC_kwDOBm6k_c4_qlJl simonw 9599 2022-03-15T15:31:54Z 2022-03-15T15:31:54Z OWNER

The state I had got to prior to that revert is in https://github.com/simonw/datasette/tree/issue-1657-wip

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Tilde encoding: use ~ instead of - for dash-encoding 1168995756  
1068125636 https://github.com/simonw/datasette/issues/1657#issuecomment-1068125636 https://api.github.com/repos/simonw/datasette/issues/1657 IC_kwDOBm6k_c4_qk3E simonw 9599 2022-03-15T15:30:54Z 2022-03-15T15:30:54Z OWNER

I've made a real mess of this. I'm going to revert Datasettemain back to the last commit that passed the tests and try this again in a branch.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Tilde encoding: use ~ instead of - for dash-encoding 1168995756  
1067981656 https://github.com/simonw/sqlite-utils/issues/131#issuecomment-1067981656 https://api.github.com/repos/simonw/sqlite-utils/issues/131 IC_kwDOCGYnMM4_qBtY eyeseast 25778 2022-03-15T13:21:42Z 2022-03-15T13:21:42Z CONTRIBUTOR

Just ran into this issue last night. I have a big table that's mostly numbers, but also a zip code column in a state where ZIP codes start with 0. Would be great to run something like this:

sh sqlite-utils insert data.db places file.csv --csv --detect-types --type zipcode text

Maybe I'll take a crack at this one.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
sqlite-utils insert: options for column types 675753042  

Advanced export

JSON shape: default, array, newline-delimited, object

CSV options:

CREATE TABLE [issue_comments] (
   [html_url] TEXT,
   [issue_url] TEXT,
   [id] INTEGER PRIMARY KEY,
   [node_id] TEXT,
   [user] INTEGER REFERENCES [users]([id]),
   [created_at] TEXT,
   [updated_at] TEXT,
   [author_association] TEXT,
   [body] TEXT,
   [reactions] TEXT,
   [issue] INTEGER REFERENCES [issues]([id])
, [performed_via_github_app] TEXT);
CREATE INDEX [idx_issue_comments_issue]
                ON [issue_comments] ([issue]);
CREATE INDEX [idx_issue_comments_user]
                ON [issue_comments] ([user]);
Powered by Datasette · Queries took 1103.25ms · About: github-to-sqlite