home / github

Menu
  • Search all tables
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

20 rows where "updated_at" is on date 2022-09-06 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 11

  • 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
  • Handle really wide tables better 1
  • 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
  • Workaround for test failure: RuntimeError: There is no current event loop 1
  • Add organization support to repos command 1
  • Expose convert recipes to `sqlite-utils --functions` 1

user 4

  • simonw 17
  • CharlesNepote 1
  • OverkillGuy 1
  • codecov[bot] 1

author_association 2

  • OWNER 17
  • NONE 3
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  
1238383171 https://github.com/simonw/datasette/issues/596#issuecomment-1238383171 https://api.github.com/repos/simonw/datasette/issues/596 IC_kwDOBm6k_c5J0DpD CharlesNepote 562352 2022-09-06T16:27:25Z 2022-09-06T16:27:25Z NONE

Perhaps some ways to address this.

  1. Add a horizontal scrollbar at the top of the table. There are some solutions here: https://stackoverflow.com/questions/3934271/horizontal-scrollbar-on-top-and-bottom-of-table
  2. Use a fixed table header. It would be useful when you're lost in the middle of a very big table. Pure CSS solutions seem to exist: https://stackoverflow.com/questions/21168521/table-fixed-header-and-scrollable-body
  3. Maybe a possibility to resize columns. Not sure about that because it would more work not to lose it after each reload.
  4. A way to keep favorite views for each user. The process would be: I select the column I want or not (with existing "settings" icon of each column); then I select a "favoritize view" option somewhere; then I can recall all my favorite views from a menu. These data could be hosted on the browser.
{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Handle really wide tables better 507454958  
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  
1238190601 https://github.com/dogsheep/github-to-sqlite/pull/76#issuecomment-1238190601 https://api.github.com/repos/dogsheep/github-to-sqlite/issues/76 IC_kwDODFdgUs5JzUoJ OverkillGuy 2757699 2022-09-06T13:58:20Z 2022-09-06T13:59:08Z NONE

Tested PR just now in private org, fetched >2k repos infos flawlessly!

poetry run github-to-sqlite repos --organization github.db MYORG
{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Add organization support to repos command 1363280254  
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  
1237548400 https://github.com/simonw/datasette/pull/1803#issuecomment-1237548400 https://api.github.com/repos/simonw/datasette/issues/1803 IC_kwDOBm6k_c5Jw31w codecov[bot] 22429695 2022-09-06T00:38:18Z 2022-09-06T00:38:18Z NONE

Codecov Report

Base: 91.66% // Head: 91.67% // Increases project coverage by +0.01% :tada:

Coverage data is based on head (2db6f9c) compared to base (51030df). Patch coverage: 100.00% of modified lines in pull request are covered.

:exclamation: Current head 2db6f9c differs from pull request most recent head 7b6a2b4. Consider uploading reports for the commit 7b6a2b4 to get more accurate results

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #1803 +/- ## ========================================== + Coverage 91.66% 91.67% +0.01% ========================================== Files 38 38 Lines 4705 4711 +6 ========================================== + Hits 4313 4319 +6 Misses 392 392 ``` | [Impacted Files](https://codecov.io/gh/simonw/datasette/pull/1803?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison) | Coverage Δ | | |---|---|---| | [datasette/app.py](https://codecov.io/gh/simonw/datasette/pull/1803/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison#diff-ZGF0YXNldHRlL2FwcC5weQ==) | `94.23% <100.00%> (+0.04%)` | :arrow_up: | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Simon+Willison)

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Workaround for test failure: RuntimeError: There is no current event loop 1362567197  
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 620.759ms · About: github-to-sqlite