home / github

Menu
  • Search all tables
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

6 rows where author_association = "OWNER" and issue = 314471743 sorted by updated_at descending

✖
✖
✖

✎ View and edit SQL

This data as json, CSV (advanced)

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

user 1

  • simonw 6

issue 1

  • Load plugins from a `--plugins-dir=plugins/` directory · 6 ✖

author_association 1

  • OWNER · 6 ✖
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions issue performed_via_github_app
381482407 https://github.com/simonw/datasette/issues/211#issuecomment-381482407 https://api.github.com/repos/simonw/datasette/issues/211 MDEyOklzc3VlQ29tbWVudDM4MTQ4MjQwNw== simonw 9599 2018-04-16T05:18:29Z 2018-04-16T05:18:29Z OWNER

Here's the result of running this:

datasette publish heroku fivethirtyeight.db \
    --plugins-dir=plugins/ --title="FiveThirtyEight" --branch=plugins-dir

https://intense-river-24599.herokuapp.com/fivethirtyeight-2628db9?sql=select+convert_units%28100%2C+%27m%27%2C+%27ft%27%29

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Load plugins from a `--plugins-dir=plugins/` directory 314471743  
381481990 https://github.com/simonw/datasette/issues/211#issuecomment-381481990 https://api.github.com/repos/simonw/datasette/issues/211 MDEyOklzc3VlQ29tbWVudDM4MTQ4MTk5MA== simonw 9599 2018-04-16T05:14:57Z 2018-04-16T05:14:57Z OWNER

Added unit tests in 33c6bcadb962457be6b0c7f369826b404e2bcef5

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Load plugins from a `--plugins-dir=plugins/` directory 314471743  
381478253 https://github.com/simonw/datasette/issues/211#issuecomment-381478253 https://api.github.com/repos/simonw/datasette/issues/211 MDEyOklzc3VlQ29tbWVudDM4MTQ3ODI1Mw== simonw 9599 2018-04-16T04:42:02Z 2018-04-16T04:42:02Z OWNER

This worked as well:

datasette package fivethirtyeight.db \
    --plugins-dir=plugins/ --title="FiveThirtyEight" --branch=plugins-dir
{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Load plugins from a `--plugins-dir=plugins/` directory 314471743  
381478217 https://github.com/simonw/datasette/issues/211#issuecomment-381478217 https://api.github.com/repos/simonw/datasette/issues/211 MDEyOklzc3VlQ29tbWVudDM4MTQ3ODIxNw== simonw 9599 2018-04-16T04:41:38Z 2018-04-16T04:41:38Z OWNER

Here's the result of running:

datasette publish now fivethirtyeight.db \
    --plugins-dir=plugins/ --title="FiveThirtyEight" --branch=plugins-dir

https://datasette-phjtvzwwzl.now.sh/fivethirtyeight-2628db9?sql=select+convert_units%28100%2C+%27m%27%2C+%27ft%27%29

Where plugins/pint_plugin.py contains the following: ``` from datasette import hookimpl import pint

ureg = pint.UnitRegistry()

@hookimpl def prepare_connection(conn): def convert_units(amount, from_, to_): "select convert_units(100, 'm', 'ft');" return (amount * ureg(from_)).to(to_).to_tuple()[0] conn.create_function('convert_units', 3, convert_units) ```

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Load plugins from a `--plugins-dir=plugins/` directory 314471743  
381462005 https://github.com/simonw/datasette/issues/211#issuecomment-381462005 https://api.github.com/repos/simonw/datasette/issues/211 MDEyOklzc3VlQ29tbWVudDM4MTQ2MjAwNQ== simonw 9599 2018-04-16T02:23:07Z 2018-04-16T02:23:07Z OWNER

This needs unit tests. I also need to manually test the datasette package and datesette publish commands.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Load plugins from a `--plugins-dir=plugins/` directory 314471743  
381456434 https://github.com/simonw/datasette/issues/211#issuecomment-381456434 https://api.github.com/repos/simonw/datasette/issues/211 MDEyOklzc3VlQ29tbWVudDM4MTQ1NjQzNA== simonw 9599 2018-04-16T01:36:16Z 2018-04-16T01:37:44Z OWNER

The easiest way to implement this in Python 2 would be execfile(...) - but that was removed in Python 3. According to https://stackoverflow.com/a/437857/6083 2to3 replaces that with this, which ensures the filename is associated with the code for debugging purposes:

with open("somefile.py") as f: code = compile(f.read(), "somefile.py", 'exec') exec(code, global_vars, local_vars)

Implementing it this way would force this kind of plugin to be self-contained in a single file. I think that's OK: if you want a more complex plugin you can use the standard pluggy-powered setuptools mechanism to build it.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Load plugins from a `--plugins-dir=plugins/` directory 314471743  

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