home / github

Menu
  • Search all tables
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

7 rows where "created_at" is on date 2021-09-21 and "updated_at" is on date 2021-09-21 sorted by updated_at descending

✎ View and edit SQL

This data as json, CSV (advanced)

Suggested facets: issue_url, updated_at (date)

issue 3

  • Add “updated” to metadata 5
  • Fix for since_id bug, closes #58 1
  • Update pytest-xdist requirement from <2.4,>=2.2.1 to >=2.2.1,<2.5 1

author_association 3

  • OWNER 5
  • MEMBER 1
  • NONE 1

user 2

  • simonw 6
  • codecov[bot] 1
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions issue performed_via_github_app
924437942 https://github.com/simonw/datasette/issues/111#issuecomment-924437942 https://api.github.com/repos/simonw/datasette/issues/111 IC_kwDOBm6k_c43Gc22 simonw 9599 2021-09-21T22:32:59Z 2021-09-21T22:47:07Z OWNER

Side-note: Django 4.0 will switch from using pytz to using the standard library zoneinfo module introduced in Python 3.9, which has a backport that works as far back as 3.6: https://github.com/pganssle/zoneinfo (https://pypi.org/project/backports.zoneinfo/)

If I need to handle timezones I'll use that, but I think I can get away without it?

Django does this: https://github.com/django/django/blob/b0ed619303d2fb723330ca9efa3acf23d49f1d19/setup.cfg#L39-L43

install_requires = asgiref >= 3.3.2 backports.zoneinfo; python_version<"3.9" sqlparse >= 0.2.2 tzdata; sys_platform == 'win32'

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Add “updated” to metadata 274615452  
924443089 https://github.com/simonw/datasette/issues/111#issuecomment-924443089 https://api.github.com/repos/simonw/datasette/issues/111 IC_kwDOBm6k_c43GeHR simonw 9599 2021-09-21T22:45:14Z 2021-09-21T22:45:26Z OWNER

The audiences I care about here are:

  • Producers of this timestamp - generally that will be users who are using datasette publish to share their data
  • Human consumers of this timestamp - end users who look at a Datasette site and want to know how recent the data is
  • Machine consumers of this timestamp - API integrations that might want to check if a Datasette instance has been updated before downloading new data

For producers I think there are going to be two categories. The first is users who run "publish" and want the site to reflect when they did so (probably using --updated=now when they publish). The second are users who are willing to spend more time thinking about this - for example my various git scraping projects where I want to use a date derived from the git history.

For humans... I'd like to be able to calculate a relative time (3 hours ago) in addition to showing the display time, because that helps avoid confusion over timezones.

For machine consumers, it might be nice to offer the option of a calculated Unix timestamp-since-1970, since those can be easier to work with in some languages than running a full ISO date parser.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Add “updated” to metadata 274615452  
924438481 https://github.com/simonw/datasette/issues/111#issuecomment-924438481 https://api.github.com/repos/simonw/datasette/issues/111 IC_kwDOBm6k_c43Gc_R simonw 9599 2021-09-21T22:34:03Z 2021-09-21T22:34:21Z OWNER

The simplest possible version of this: it's always represented as a UTC ISO datetime, like this:

"updated": "2020-10-31T12:00:00+00:00"

Later versions of Datasette could extend this to handle other timezones or support just the date (though that's a backwards incompatible change so probably better to decide on the date thing right now).

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Add “updated” to metadata 274615452  
924435971 https://github.com/simonw/datasette/issues/111#issuecomment-924435971 https://api.github.com/repos/simonw/datasette/issues/111 IC_kwDOBm6k_c43GcYD simonw 9599 2021-09-21T22:29:15Z 2021-09-21T22:29:49Z OWNER

So this is a metadata key called updated which can be applied at the table, database or instance level. It is represented as a .isoformat() timestamp.

Question: should I support just the date - yyyy-mm-dd - in addition to the datetime?

I think so. I can easily imagine situations where the exact time of day that a change was made hasn't been recorded, but the overall date is known.

But in that case, should the updated key sometimes be yyyy-mm-dd and sometimes be the full isoformat datetime? Or should there be an updated_date key that's used for just the date?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Add “updated” to metadata 274615452  
924432643 https://github.com/simonw/datasette/issues/111#issuecomment-924432643 https://api.github.com/repos/simonw/datasette/issues/111 IC_kwDOBm6k_c43GbkD simonw 9599 2021-09-21T22:23:23Z 2021-09-21T22:23:23Z OWNER

I'm going to use https://github.com/dateutil/dateutil for this - it's been maintained constantly (by an evolving team of contributors) since 2003 and is a very trustworthy dependency.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Add “updated” to metadata 274615452  
924209583 https://github.com/dogsheep/twitter-to-sqlite/pull/59#issuecomment-924209583 https://api.github.com/repos/dogsheep/twitter-to-sqlite/issues/59 IC_kwDODEm0Qs43FlGv simonw 9599 2021-09-21T17:37:34Z 2021-09-21T17:37:34Z MEMBER

Thanks for this!

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Fix for since_id bug, closes #58 984942782  
923979964 https://github.com/simonw/datasette/pull/1476#issuecomment-923979964 https://api.github.com/repos/simonw/datasette/issues/1476 IC_kwDOBm6k_c43EtC8 codecov[bot] 22429695 2021-09-21T13:18:22Z 2021-09-21T13:18:22Z NONE

Codecov Report

Merging #1476 (2eb01ff) into main (b28b6cd) will not change coverage. The diff coverage is n/a.

```diff @@ Coverage Diff @@

main #1476 +/-

======================================= Coverage 91.83% 91.83%
======================================= Files 34 34
Lines 4421 4421
======================================= Hits 4060 4060
Misses 361 361
```


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 b28b6cd...2eb01ff. 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-xdist requirement from <2.4,>=2.2.1 to >=2.2.1,<2.5 1002459220  

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