home / github

Menu
  • Search all tables
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

17 rows where "updated_at" is on date 2022-09-06 and user = 9599 sorted by updated_at descending

✎ View and edit SQL

This data as json, CSV (advanced)

Suggested facets: issue_url, created_at (date), updated_at (date)

issue 8

  • Tests reliably failing on Python 3.7 5
  • Ability to set a custom facet_size per table 5
  • truncate_cells_html does not work for links? 2
  • feat: add a wildcard for _json columns 1
  • Added a useful resource 1
  • fix word break in facets by adding ul.tight-bullets li word-break: break-all 1
  • Conda Forge 1
  • Expose convert recipes to `sqlite-utils --functions` 1

user 1

  • simonw · 17 ✖

author_association 1

  • OWNER 17
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions issue performed_via_github_app
1238760255 https://github.com/simonw/datasette/issues/1805#issuecomment-1238760255 https://api.github.com/repos/simonw/datasette/issues/1805 IC_kwDOBm6k_c5J1fs_ simonw 9599 2022-09-06T23:55:37Z 2022-09-06T23:55:37Z OWNER

While working on this I noticed that the arbitrary query page doesn't currently obey truncation, when it should do.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
truncate_cells_html does not work for links? 1363552780  
1238608921 https://github.com/simonw/sqlite-utils/issues/477#issuecomment-1238608921 https://api.github.com/repos/simonw/sqlite-utils/issues/477 IC_kwDOCGYnMM5J06wZ simonw 9599 2022-09-06T20:18:12Z 2022-09-06T20:18:12Z OWNER

Hi @thewchan - thanks for that! Yes I'm interested, can you invite swillison @ Google's email provider please?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Conda Forge 1353441389  
1238607591 https://github.com/simonw/sqlite-utils/issues/484#issuecomment-1238607591 https://api.github.com/repos/simonw/sqlite-utils/issues/484 IC_kwDOCGYnMM5J06bn simonw 9599 2022-09-06T20:16:39Z 2022-09-06T20:16:39Z OWNER

Here's the implementation for recipes at the moment: https://github.com/simonw/sqlite-utils/blob/5b969273f1244b1bcf3e4dc071cdf17dab35d5f8/sqlite_utils/utils.py#L434-L441

And here's the --functions implementation that doesn't expose them: https://github.com/simonw/sqlite-utils/blob/5b969273f1244b1bcf3e4dc071cdf17dab35d5f8/sqlite_utils/cli.py#L3029-L3040

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Expose convert recipes to `sqlite-utils --functions` 1363766973  
1238491632 https://github.com/simonw/datasette/issues/1805#issuecomment-1238491632 https://api.github.com/repos/simonw/datasette/issues/1805 IC_kwDOBm6k_c5J0eHw simonw 9599 2022-09-06T18:10:14Z 2022-09-06T18:10:14Z OWNER

I like the idea of defaulting this to the truncate_cells_html setting. It could be alternatively customized using a custom Render Cell plugin, but having Datasette do this by default makes sense to me.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
truncate_cells_html does not work for links? 1363552780  
1238347451 https://github.com/simonw/datasette/issues/1804#issuecomment-1238347451 https://api.github.com/repos/simonw/datasette/issues/1804 IC_kwDOBm6k_c5Jz667 simonw 9599 2022-09-06T15:59:26Z 2022-09-06T15:59:26Z OWNER

Still needs documentation.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Ability to set a custom facet_size per table 1363440999  
1238313314 https://github.com/simonw/datasette/issues/1804#issuecomment-1238313314 https://api.github.com/repos/simonw/datasette/issues/1804 IC_kwDOBm6k_c5Jzyli simonw 9599 2022-09-06T15:31:36Z 2022-09-06T15:31:36Z OWNER

In that code self.table is the name of the current table, but can also be None if the faceting is being run against a custom SQL query instead (a future feature). self.database is the name of the current database.

So reading metadata via self.ds should work fine.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Ability to set a custom facet_size per table 1363440999  
1238311565 https://github.com/simonw/datasette/issues/1804#issuecomment-1238311565 https://api.github.com/repos/simonw/datasette/issues/1804 IC_kwDOBm6k_c5JzyKN simonw 9599 2022-09-06T15:30:19Z 2022-09-06T15:30:19Z OWNER

Relevant code: https://github.com/simonw/datasette/blob/c9d1943aede436fa3413fd49bc56335cbda4ad07/datasette/facets.py#L102-L110

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Ability to set a custom facet_size per table 1363440999  
1238309481 https://github.com/simonw/datasette/issues/1804#issuecomment-1238309481 https://api.github.com/repos/simonw/datasette/issues/1804 IC_kwDOBm6k_c5Jzxpp simonw 9599 2022-09-06T15:28:35Z 2022-09-06T15:28:35Z OWNER

I'm going to do this just at the table level - if you want it at the database level I would imagine usually you would be OK running --setting default_facet_size 10 instead, since most Datasette instances only expose a single database.

I may reconsider this in the future.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Ability to set a custom facet_size per table 1363440999  
1238308213 https://github.com/simonw/datasette/issues/1804#issuecomment-1238308213 https://api.github.com/repos/simonw/datasette/issues/1804 IC_kwDOBm6k_c5JzxV1 simonw 9599 2022-09-06T15:27:31Z 2022-09-06T15:27:31Z OWNER

Relevant example from https://docs.datasette.io/en/stable/metadata.html#per-database-and-per-table-metadata json { "databases": { "database1": { "tables": { "example_table": { "sortable_columns": [ "height", "weight" ] } } } } } I think this becomes "facet_size": "..." at the table level, to match the name of the ?_facet_size=100 querystring parameter.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Ability to set a custom facet_size per table 1363440999  
1237553237 https://github.com/simonw/datasette/pull/1757#issuecomment-1237553237 https://api.github.com/repos/simonw/datasette/issues/1757 IC_kwDOBm6k_c5Jw5BV simonw 9599 2022-09-06T00:51:21Z 2022-09-06T00:51:21Z OWNER

Interesting feature idea.

It's a weird edge-case, but it's the kind of thing I worry about: what if the user has a column called *? This is technically allowed in SQLite, even though it's vastly unlikely.

On that basis, I think ?_json_all=1 would be a better design here than ?_json=* - since it removes any possible ambiguity.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
feat: add a wildcard for _json columns 1268121674  
1237551309 https://github.com/simonw/datasette/pull/1794#issuecomment-1237551309 https://api.github.com/repos/simonw/datasette/issues/1794 IC_kwDOBm6k_c5Jw4jN simonw 9599 2022-09-06T00:45:26Z 2022-09-06T00:45:26Z OWNER

Thanks for this - I've seen this issue too. Good fix.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
fix word break in facets by adding ul.tight-bullets li word-break: break-all 1352931076  
1237549678 https://github.com/simonw/datasette/pull/1793#issuecomment-1237549678 https://api.github.com/repos/simonw/datasette/issues/1793 IC_kwDOBm6k_c5Jw4Ju simonw 9599 2022-09-06T00:41:24Z 2022-09-06T00:41:24Z OWNER

I don't agree with the pros and cons listed in that article.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Added a useful resource 1351949898  
1237545794 https://github.com/simonw/datasette/issues/1802#issuecomment-1237545794 https://api.github.com/repos/simonw/datasette/issues/1802 IC_kwDOBm6k_c5Jw3NC simonw 9599 2022-09-06T00:31:31Z 2022-09-06T00:31:31Z OWNER

Well I'm not proud of it, but that did seem to do the trick!

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Tests reliably failing on Python 3.7 1362402998  
1237542803 https://github.com/simonw/datasette/issues/1802#issuecomment-1237542803 https://api.github.com/repos/simonw/datasette/issues/1802 IC_kwDOBm6k_c5Jw2eT simonw 9599 2022-09-06T00:23:27Z 2022-09-06T00:23:27Z OWNER

Trying this fix: diff diff --git a/datasette/app.py b/datasette/app.py index f2a6763a5..b17888a07 100644 --- a/datasette/app.py +++ b/datasette/app.py @@ -231,7 +231,13 @@ def __init__( self.inspect_data = inspect_data self.immutables = set(immutables or []) self.databases = collections.OrderedDict() - self._refresh_schemas_lock = asyncio.Lock() + try: + self._refresh_schemas_lock = asyncio.Lock() + except RuntimeError as rex: + if "There is no current event loop in thread" in str(rex): + loop = asyncio.new_event_loop() + asyncio.set_event_loop(loop) + self._refresh_schemas_lock = asyncio.Lock() self.crossdb = crossdb self.nolock = nolock if memory or crossdb or not self.files: This is mainly superstition at this point! I found that recipe on https://techoverflow.net/2020/10/01/how-to-fix-python-asyncio-runtimeerror-there-is-no-current-event-loop-in-thread/

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Tests reliably failing on Python 3.7 1362402998  
1237542508 https://github.com/simonw/datasette/issues/1802#issuecomment-1237542508 https://api.github.com/repos/simonw/datasette/issues/1802 IC_kwDOBm6k_c5Jw2Zs simonw 9599 2022-09-06T00:22:37Z 2022-09-06T00:22:37Z OWNER

The code that I control that shows up in the trace is this:

https://github.com/simonw/datasette/blob/fd1086c6867f3e3582b1eca456e4ea95f6cecf8b/datasette/app.py#L234

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Tests reliably failing on Python 3.7 1362402998  
1237540231 https://github.com/simonw/datasette/issues/1802#issuecomment-1237540231 https://api.github.com/repos/simonw/datasette/issues/1802 IC_kwDOBm6k_c5Jw12H simonw 9599 2022-09-06T00:16:10Z 2022-09-06T00:16:10Z OWNER

Removing the ensure_eventloop() hack produced the exact same test failure: https://github.com/simonw/datasette/runs/8197570109?check_suite_focus=true

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Tests reliably failing on Python 3.7 1362402998  
1237537205 https://github.com/simonw/datasette/issues/1802#issuecomment-1237537205 https://api.github.com/repos/simonw/datasette/issues/1802 IC_kwDOBm6k_c5Jw1G1 simonw 9599 2022-09-06T00:08:03Z 2022-09-06T00:08:46Z OWNER

I'm suspicious that this hack here may be hurting me:

https://github.com/simonw/datasette/blob/b91e17280c05bbb9cf97432081bdcea8665879f9/tests/test_cli.py#L25-L29

I added that two years ago in https://github.com/simonw/datasette/commit/3159263f05ac4baf968929d59384d9223a539071

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Tests reliably failing on Python 3.7 1362402998  

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 570.463ms · About: github-to-sqlite