home / github

Menu
  • Search all tables
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

24 rows where "created_at" is on date 2023-05-21 and user = 9599 sorted by updated_at descending

✖
✖
✖

✎ View and edit SQL

This data as json, CSV (advanced)

Suggested facets: issue_url, reactions, updated_at (date)

issue 10

  • Try out Trogon for a tui interface 6
  • Make as many examples in the CLI docs as possible copy-and-pastable 6
  • AttributeError: 'EntryPoints' object has no attribute 'get' for flake8 on Python 3.7 3
  • New options for analyze-tables --common-limit --no-most and --no-least 2
  • TUI powered by Trogon 2
  • Analyze tables options: --common-limit, --no-most, --no-least 1
  • No need to show common values if everything is null 1
  • analyze-tables should validate provide --column names 1
  • Document how to setup shell auto-completion 1
  • Reformatted CLI examples in docs 1

user 1

  • simonw · 24 ✖

author_association 1

  • OWNER 24
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions issue performed_via_github_app
1556292204 https://github.com/simonw/sqlite-utils/issues/552#issuecomment-1556292204 https://api.github.com/repos/simonw/sqlite-utils/issues/552 IC_kwDOCGYnMM5cwyJs simonw 9599 2023-05-21T21:05:15Z 2023-05-21T21:05:15Z OWNER

Now live at https://sqlite-utils.datasette.io/en/latest/installation.html#setting-up-shell-completion

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Document how to setup shell auto-completion 1718612569  
1556291915 https://github.com/simonw/sqlite-utils/issues/551#issuecomment-1556291915 https://api.github.com/repos/simonw/sqlite-utils/issues/551 IC_kwDOCGYnMM5cwyFL simonw 9599 2023-05-21T21:04:03Z 2023-05-21T21:04:03Z OWNER

Now live at https://sqlite-utils.datasette.io/en/latest/cli.html

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Make as many examples in the CLI docs as possible copy-and-pastable 1718607907  
1556288300 https://github.com/simonw/sqlite-utils/pull/553#issuecomment-1556288300 https://api.github.com/repos/simonw/sqlite-utils/issues/553 IC_kwDOCGYnMM5cwxMs simonw 9599 2023-05-21T20:48:01Z 2023-05-21T20:48:01Z OWNER

If https://sqlite-utils--553.org.readthedocs.build/en/553/cli.html#running-sql-queries looks good I can merge this.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Reformatted CLI examples in docs 1718635018  
1556288270 https://github.com/simonw/sqlite-utils/issues/551#issuecomment-1556288270 https://api.github.com/repos/simonw/sqlite-utils/issues/551 IC_kwDOCGYnMM5cwxMO simonw 9599 2023-05-21T20:47:51Z 2023-05-21T20:47:51Z OWNER

This page has all of the changes: https://sqlite-utils--553.org.readthedocs.build/en/553/cli.html#running-sql-queries

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Make as many examples in the CLI docs as possible copy-and-pastable 1718607907  
1556287599 https://github.com/simonw/sqlite-utils/issues/551#issuecomment-1556287599 https://api.github.com/repos/simonw/sqlite-utils/issues/551 IC_kwDOCGYnMM5cwxBv simonw 9599 2023-05-21T20:44:55Z 2023-05-21T20:44:55Z OWNER

Put this in a PR so I can preview it: - #553

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Make as many examples in the CLI docs as possible copy-and-pastable 1718607907  
1556269616 https://github.com/simonw/sqlite-utils/issues/545#issuecomment-1556269616 https://api.github.com/repos/simonw/sqlite-utils/issues/545 IC_kwDOCGYnMM5cwsow simonw 9599 2023-05-21T19:33:13Z 2023-05-21T19:33:13Z OWNER

Now released: https://sqlite-utils.datasette.io/en/stable/changelog.html#v3-32

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Try out Trogon for a tui interface 1718517882  
1556265772 https://github.com/simonw/sqlite-utils/issues/551#issuecomment-1556265772 https://api.github.com/repos/simonw/sqlite-utils/issues/551 IC_kwDOCGYnMM5cwrss simonw 9599 2023-05-21T19:16:15Z 2023-05-21T19:16:15Z OWNER

Another option:

That's using this markup:

``` Newline-delimited JSON ~~~~~~~~~~~~~~~~~~~~~~

Use --nl to get back newline-delimited JSON objects:

.. code-block:: bash

sqlite-utils dogs.db "select * from dogs" --nl

.. code-block:: output

{"id": 1, "age": 4, "name": "Cleo"}
{"id": 2, "age": 2, "name": "Pancakes"}

``` And this extra CSS:

css .highlight-output .highlight { border-left: 9px solid #30c94f; }

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Make as many examples in the CLI docs as possible copy-and-pastable 1718607907  
1556263182 https://github.com/simonw/sqlite-utils/issues/551#issuecomment-1556263182 https://api.github.com/repos/simonw/sqlite-utils/issues/551 IC_kwDOCGYnMM5cwrEO simonw 9599 2023-05-21T19:06:48Z 2023-05-21T19:06:48Z OWNER

I could split them up into two blocks like this:

I do miss the visual indication that one of these is the command and one is the output though.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Make as many examples in the CLI docs as possible copy-and-pastable 1718607907  
1556262574 https://github.com/simonw/sqlite-utils/issues/551#issuecomment-1556262574 https://api.github.com/repos/simonw/sqlite-utils/issues/551 IC_kwDOCGYnMM5cwq6u simonw 9599 2023-05-21T19:04:59Z 2023-05-21T19:04:59Z OWNER

I wrote the docs like this because early examples include both the command and its output:

https://sqlite-utils.datasette.io/en/stable/cli.html#returning-json

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Make as many examples in the CLI docs as possible copy-and-pastable 1718607907  
1556255309 https://github.com/simonw/sqlite-utils/issues/550#issuecomment-1556255309 https://api.github.com/repos/simonw/sqlite-utils/issues/550 IC_kwDOCGYnMM5cwpJN simonw 9599 2023-05-21T18:42:25Z 2023-05-21T18:42:25Z OWNER

Tests passed here: https://github.com/simonw/sqlite-utils/actions/runs/5039119716

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
AttributeError: 'EntryPoints' object has no attribute 'get' for flake8 on Python 3.7 1718595700  
1556250236 https://github.com/simonw/sqlite-utils/issues/550#issuecomment-1556250236 https://api.github.com/repos/simonw/sqlite-utils/issues/550 IC_kwDOCGYnMM5cwn58 simonw 9599 2023-05-21T18:25:26Z 2023-05-21T18:25:26Z OWNER

Relevant issues: - https://github.com/python/importlib_metadata/issues/406 - https://github.com/PyCQA/flake8/issues/1701

It looks to me like this is only a problem for flake8 on Python 3.7 - 3.8 and higher work OK.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
AttributeError: 'EntryPoints' object has no attribute 'get' for flake8 on Python 3.7 1718595700  
1556249984 https://github.com/simonw/sqlite-utils/issues/550#issuecomment-1556249984 https://api.github.com/repos/simonw/sqlite-utils/issues/550 IC_kwDOCGYnMM5cwn2A simonw 9599 2023-05-21T18:24:48Z 2023-05-21T18:24:48Z OWNER

This is blocking: - #549

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
AttributeError: 'EntryPoints' object has no attribute 'get' for flake8 on Python 3.7 1718595700  
1556247818 https://github.com/simonw/sqlite-utils/issues/545#issuecomment-1556247818 https://api.github.com/repos/simonw/sqlite-utils/issues/545 IC_kwDOCGYnMM5cwnUK simonw 9599 2023-05-21T18:17:46Z 2023-05-21T18:17:46Z OWNER

Draft documentation: https://sqlite-utils--549.org.readthedocs.build/en/549/cli.html#cli-tui

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Try out Trogon for a tui interface 1718517882  
1556242262 https://github.com/simonw/sqlite-utils/pull/549#issuecomment-1556242262 https://api.github.com/repos/simonw/sqlite-utils/issues/549 IC_kwDOCGYnMM5cwl9W simonw 9599 2023-05-21T18:00:05Z 2023-05-21T18:00:05Z OWNER

Failing mypy test: https://github.com/simonw/sqlite-utils/actions/runs/5038983349/jobs/9036828465 sqlite_utils/cli.py:37: error: Skipping analyzing "trogon": module is installed, but missing library stubs or py.typed marker [import] sqlite_utils/cli.py:37: note: See https://mypy.readthedocs.io/en/stable/running_mypy.html#missing-imports Found 1 error in 1 file (checked 52 source files)

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
TUI powered by Trogon 1718586377  
1556241812 https://github.com/simonw/sqlite-utils/pull/549#issuecomment-1556241812 https://api.github.com/repos/simonw/sqlite-utils/issues/549 IC_kwDOCGYnMM5cwl2U simonw 9599 2023-05-21T17:58:25Z 2023-05-21T17:58:25Z OWNER

Documentation: https://sqlite-utils--549.org.readthedocs.build/en/549/cli.html#cli-tui

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
TUI powered by Trogon 1718586377  
1556231832 https://github.com/simonw/sqlite-utils/issues/548#issuecomment-1556231832 https://api.github.com/repos/simonw/sqlite-utils/issues/548 IC_kwDOCGYnMM5cwjaY simonw 9599 2023-05-21T17:24:13Z 2023-05-21T17:24:13Z OWNER

Oh, I see why that is now:

https://github.com/simonw/sqlite-utils/blob/6027f3ea6939a399aeef2578fca17efec0e539df/sqlite_utils/cli.py#L2670-L2679

This is because of the following command:

sqlite-utils analyze-tables table1 table2 --column x

Since you can pass multiple tables AND multiple columns, the tool currently assumes that the column(s) you specify may be available on a subset of the provided tables.

I'm going to change this so if the column is not on ANY of those tables you get an error.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
analyze-tables should validate provide --column names 1718576761  
1556228395 https://github.com/simonw/sqlite-utils/issues/547#issuecomment-1556228395 https://api.github.com/repos/simonw/sqlite-utils/issues/547 IC_kwDOCGYnMM5cwikr simonw 9599 2023-05-21T17:11:15Z 2023-05-21T17:11:15Z OWNER

This will be a cosmetic change to the CLI output only - the options to save data to the database and the Python API function will continue to return [(None, 158)].

I can add an optimization though to avoid running the SQL count query if we know that it's all null.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
No need to show common values if everything is null 1718572201  
1556225788 https://github.com/simonw/sqlite-utils/issues/544#issuecomment-1556225788 https://api.github.com/repos/simonw/sqlite-utils/issues/544 IC_kwDOCGYnMM5cwh78 simonw 9599 2023-05-21T17:02:05Z 2023-05-21T17:02:05Z OWNER

New docs:

  • https://sqlite-utils.datasette.io/en/latest/cli.html#cli-analyze-tables
  • https://sqlite-utils.datasette.io/en/latest/cli-reference.html#analyze-tables
  • https://sqlite-utils.datasette.io/en/latest/python-api.html#analyzing-a-column
  • https://sqlite-utils.datasette.io/en/latest/reference.html#sqlite_utils.db.Table.analyze_column

New help output:

``` % sqlite-utils analyze-tables --help Usage: sqlite-utils analyze-tables [OPTIONS] PATH [TABLES]...

Analyze the columns in one or more tables

Example:

  sqlite-utils analyze-tables data.db trees

Options: -c, --column TEXT Specific columns to analyze --save Save results to _analyze_tables table --common-limit INTEGER How many common values --no-most Skip most common values --no-least Skip least common values --load-extension TEXT Path to SQLite extension, with optional :entrypoint -h, --help Show this message and exit. ```

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
New options for analyze-tables --common-limit --no-most and --no-least 1718515590  
1556213396 https://github.com/simonw/sqlite-utils/pull/546#issuecomment-1556213396 https://api.github.com/repos/simonw/sqlite-utils/issues/546 IC_kwDOCGYnMM5cwe6U simonw 9599 2023-05-21T15:58:12Z 2023-05-21T16:18:46Z OWNER

Documentation preview: - https://sqlite-utils--546.org.readthedocs.build/en/546/cli.html#cli-analyze-tables - https://sqlite-utils--546.org.readthedocs.build/en/546/cli-reference.html#analyze-tables - https://sqlite-utils--546.org.readthedocs.build/en/546/python-api.html#analyzing-a-column - https://sqlite-utils--546.org.readthedocs.build/en/546/reference.html#sqlite_utils.db.Table.analyze_column

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Analyze tables options: --common-limit, --no-most, --no-least 1718550688  
1556211643 https://github.com/simonw/sqlite-utils/issues/544#issuecomment-1556211643 https://api.github.com/repos/simonw/sqlite-utils/issues/544 IC_kwDOCGYnMM5cwee7 simonw 9599 2023-05-21T15:48:17Z 2023-05-21T15:48:17Z OWNER

I generated the commit message in https://github.com/simonw/sqlite-utils/commit/1c1991b447a1ddd3d61d9d4a8a1d6a9da47ced20 using git diff | llm --system 'describe this change'.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
New options for analyze-tables --common-limit --no-most and --no-least 1718515590  
1556210844 https://github.com/simonw/sqlite-utils/issues/545#issuecomment-1556210844 https://api.github.com/repos/simonw/sqlite-utils/issues/545 IC_kwDOCGYnMM5cweSc simonw 9599 2023-05-21T15:44:10Z 2023-05-21T15:44:10Z OWNER

It looks like nargs=-1 on a positional argument isn't yet supported - opened an issue here: - https://github.com/Textualize/trogon/issues/4

{
    "total_count": 1,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 1,
    "rocket": 0,
    "eyes": 0
}
Try out Trogon for a tui interface 1718517882  
1556191894 https://github.com/simonw/sqlite-utils/issues/545#issuecomment-1556191894 https://api.github.com/repos/simonw/sqlite-utils/issues/545 IC_kwDOCGYnMM5cwZqW simonw 9599 2023-05-21T14:20:14Z 2023-05-21T14:20:14Z OWNER

Opened a feature request for customizing the help and command name:

  • https://github.com/Textualize/trogon/issues/2
{
    "total_count": 2,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 1,
    "rocket": 0,
    "eyes": 0
}
Try out Trogon for a tui interface 1718517882  
1556190531 https://github.com/simonw/sqlite-utils/issues/545#issuecomment-1556190531 https://api.github.com/repos/simonw/sqlite-utils/issues/545 IC_kwDOCGYnMM5cwZVD simonw 9599 2023-05-21T14:13:43Z 2023-05-21T14:13:43Z OWNER

OK, this works!

To try it out, install that branch from GitHub:

pip install https://github.com/simonw/sqlite-utils/archive/refs/heads/trogon.zip

Then run this:

sqlite-utils install trogon

And this:

sqlite-utils tui
{
    "total_count": 5,
    "+1": 2,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 3,
    "eyes": 0
}
Try out Trogon for a tui interface 1718517882  
1556189823 https://github.com/simonw/sqlite-utils/issues/545#issuecomment-1556189823 https://api.github.com/repos/simonw/sqlite-utils/issues/545 IC_kwDOCGYnMM5cwZJ_ simonw 9599 2023-05-21T14:09:59Z 2023-05-21T14:09:59Z OWNER

I don't want to add trogon as a default dependency because it's a little heavy - it pulls in all of Rich and Textual as well. People who use sqlite-utils just for its Python API won't benefit from this - it's a CLI feature only.

But I have a sqlite-utils install ... command for helping people to install packages into the same virtual environment as sqlite-utils no matter how they installed that tool: https://sqlite-utils.datasette.io/en/stable/cli.html#cli-install

So I can treat Trogon as an optional dependency and add the sqlite-utils tui command only if that package is also installed.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Try out Trogon for a tui interface 1718517882  

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 1858.094ms · About: github-to-sqlite
  • Sort ascending
  • Sort descending
  • Facet by this
  • Hide this column
  • Show all columns
  • Show not-blank rows