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 2019-06-22 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)

user 3

  • simonw 11
  • russss 4
  • chrismp 2

issue 3

  • Documentation with recommendations on running Datasette in production without using Docker 13
  • Enforce import sort order with isort 3
  • Port Datasette to ASGI 1

author_association 3

  • OWNER 11
  • CONTRIBUTOR 4
  • NONE 2
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions issue performed_via_github_app
504697742 https://github.com/simonw/datasette/issues/272#issuecomment-504697742 https://api.github.com/repos/simonw/datasette/issues/272 MDEyOklzc3VlQ29tbWVudDUwNDY5Nzc0Mg== simonw 9599 2019-06-22T20:55:59Z 2019-06-22T20:56:22Z OWNER

Getting this to work with both Sanic AND ASGI at the same time (via the classes described previously with an --asgi command-line option) is proving way trickier than I expected, mainly because of the complexity of the current Datasette.app() method.

I'm going to drop the compatibility path for a bit and see if I can make progress on a pure-ASGI port.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Port Datasette to ASGI 324188953  
504697187 https://github.com/simonw/datasette/issues/516#issuecomment-504697187 https://api.github.com/repos/simonw/datasette/issues/516 MDEyOklzc3VlQ29tbWVudDUwNDY5NzE4Nw== simonw 9599 2019-06-22T20:46:35Z 2019-06-22T20:46:35Z OWNER

I'm going to resist the temptation to do this until I've merged the asgi branch from #272

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Enforce import sort order with isort 459509126  
504696638 https://github.com/simonw/datasette/issues/516#issuecomment-504696638 https://api.github.com/repos/simonw/datasette/issues/516 MDEyOklzc3VlQ29tbWVudDUwNDY5NjYzOA== simonw 9599 2019-06-22T20:37:25Z 2019-06-22T20:38:42Z OWNER

This test added do test_black.py seems to do the trick: python @pytest.mark.parametrize("path", code_root.glob("**/*.py")) def test_isort(path): # Have to capture stdout because isort uses print() directly stdout = sys.stdout sys.stdout = io.StringIO() result = isort.SortImports(path, check=True) assert ( not result.incorrectly_sorted ), "{} has incorrectly sorted imports, fix with 'isort -rc . && black .'" sys.stdout = stdout I'll rename test_black.py to test_lint.py to reflect that it now covers more forms of linting.

Also needed: add move_to_front(items, "test_isort") to conftest.py. And add isort to extras_require in setup.py.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Enforce import sort order with isort 459509126  
504696610 https://github.com/simonw/datasette/issues/516#issuecomment-504696610 https://api.github.com/repos/simonw/datasette/issues/516 MDEyOklzc3VlQ29tbWVudDUwNDY5NjYxMA== simonw 9599 2019-06-22T20:36:57Z 2019-06-22T20:36:57Z OWNER

According to the black documentation the following config file is necessary to avoid isort and black getting into an edit war with each other: [settings] multi_line_output=3 include_trailing_comma=True force_grid_wrap=0 use_parentheses=True line_length=88

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Enforce import sort order with isort 459509126  
504690927 https://github.com/simonw/datasette/issues/514#issuecomment-504690927 https://api.github.com/repos/simonw/datasette/issues/514 MDEyOklzc3VlQ29tbWVudDUwNDY5MDkyNw== russss 45057 2019-06-22T19:06:07Z 2019-06-22T19:06:07Z CONTRIBUTOR

I'd rather not turn this into a systemd support thread, but you're trying to execute the package directory there. Your datasette executable is probably at /home/chris/Env/datasette/bin/datasette.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Documentation with recommendations on running Datasette in production without using Docker 459397625  
504685187 https://github.com/simonw/datasette/issues/514#issuecomment-504685187 https://api.github.com/repos/simonw/datasette/issues/514 MDEyOklzc3VlQ29tbWVudDUwNDY4NTE4Nw== chrismp 7936571 2019-06-22T17:43:24Z 2019-06-22T17:43:24Z NONE

WorkingDirectory=/path/to/data

@russss, Which directory does this represent?

It's the working directory (cwd) of the spawned process. In this case if you set it to the directory your data is in, you can use relative paths to the db (and metadata/templates/etc) in the ExecStart command.

In my case, on a remote server, I set up a virtual environment in /home/chris/Env/datasette, and when I activated that environment I ran pip install datasette.

My datasette project is in /home/chris/datatsette-project, so I guess I'd use that directory in the WorkingDirectory parameter?

And the ExecStart parameter would be /home/chris/Env/datasette/lib/python3.7/site-packages/datasette serve -h 0.0.0.0 my.db I'm guessing?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Documentation with recommendations on running Datasette in production without using Docker 459397625  
504684831 https://github.com/simonw/datasette/issues/514#issuecomment-504684831 https://api.github.com/repos/simonw/datasette/issues/514 MDEyOklzc3VlQ29tbWVudDUwNDY4NDgzMQ== russss 45057 2019-06-22T17:38:23Z 2019-06-22T17:38:23Z CONTRIBUTOR

WorkingDirectory=/path/to/data

@russss, Which directory does this represent?

It's the working directory (cwd) of the spawned process. In this case if you set it to the directory your data is in, you can use relative paths to the db (and metadata/templates/etc) in the ExecStart command.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Documentation with recommendations on running Datasette in production without using Docker 459397625  
504684709 https://github.com/simonw/datasette/issues/514#issuecomment-504684709 https://api.github.com/repos/simonw/datasette/issues/514 MDEyOklzc3VlQ29tbWVudDUwNDY4NDcwOQ== chrismp 7936571 2019-06-22T17:36:25Z 2019-06-22T17:36:25Z NONE

WorkingDirectory=/path/to/data

@russss, Which directory does this represent?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Documentation with recommendations on running Datasette in production without using Docker 459397625  
504663766 https://github.com/simonw/datasette/issues/514#issuecomment-504663766 https://api.github.com/repos/simonw/datasette/issues/514 MDEyOklzc3VlQ29tbWVudDUwNDY2Mzc2Ng== russss 45057 2019-06-22T12:57:59Z 2019-06-22T12:57:59Z CONTRIBUTOR

This example is useful to - I like how it has a Makefile that knows how to set up systemd: https://github.com/pikesley/Queube

I wasn't even aware it was possible to add a systemd service at an arbitrary path, but it seems a little messy to me.

Maybe worth noting that systemd does support per-user services which don't require root access. Cool but probably overkill for most people (especially when you're going to need root to listen on port 80 anyway, directly or via a reverse proxy).

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Documentation with recommendations on running Datasette in production without using Docker 459397625  
504663390 https://github.com/simonw/datasette/issues/514#issuecomment-504663390 https://api.github.com/repos/simonw/datasette/issues/514 MDEyOklzc3VlQ29tbWVudDUwNDY2MzM5MA== simonw 9599 2019-06-22T12:52:27Z 2019-06-22T12:52:27Z OWNER

This example is useful to - I like how it has a Makefile that knows how to set up systemd: https://github.com/pikesley/Queube

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Documentation with recommendations on running Datasette in production without using Docker 459397625  
504663201 https://github.com/simonw/datasette/issues/514#issuecomment-504663201 https://api.github.com/repos/simonw/datasette/issues/514 MDEyOklzc3VlQ29tbWVudDUwNDY2MzIwMQ== simonw 9599 2019-06-22T12:49:56Z 2019-06-22T12:49:56Z OWNER

Here are some partial notes I have saved from an nginx configuration I've used in the past: ``` cat /etc/nginx/sites-available/default server { listen 80 default_server; listen [::]:80 default_server;

    location / {
            proxy_pass http://127.0.0.1:8001/;
    proxy_set_header Host $host;
    }

... ```

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Documentation with recommendations on running Datasette in production without using Docker 459397625  
504662987 https://github.com/simonw/datasette/issues/514#issuecomment-504662987 https://api.github.com/repos/simonw/datasette/issues/514 MDEyOklzc3VlQ29tbWVudDUwNDY2Mjk4Nw== simonw 9599 2019-06-22T12:46:39Z 2019-06-22T12:46:39Z OWNER

... and @russss also suggested systemd 21 seconds before I posted that!

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Documentation with recommendations on running Datasette in production without using Docker 459397625  
504662931 https://github.com/simonw/datasette/issues/514#issuecomment-504662931 https://api.github.com/repos/simonw/datasette/issues/514 MDEyOklzc3VlQ29tbWVudDUwNDY2MjkzMQ== simonw 9599 2019-06-22T12:45:47Z 2019-06-22T12:45:47Z OWNER

I asked about this on Twitter and got a solid recommendation for systemd and this tutorial: https://www.digitalocean.com/community/tutorials/how-to-use-systemctl-to-manage-systemd-services-and-units - via https://twitter.com/sil/status/1142412145990221825

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Documentation with recommendations on running Datasette in production without using Docker 459397625  
504662904 https://github.com/simonw/datasette/issues/514#issuecomment-504662904 https://api.github.com/repos/simonw/datasette/issues/514 MDEyOklzc3VlQ29tbWVudDUwNDY2MjkwNA== russss 45057 2019-06-22T12:45:21Z 2019-06-22T12:45:39Z CONTRIBUTOR

On most modern Linux distros, systemd is the easiest answer.

Example systemd unit file (save to /etc/systemd/system/datasette.service): ``` [Unit] Description=Datasette After=network.target

[Service] Type=simple User=<username> WorkingDirectory=/path/to/data ExecStart=/path/to/datasette serve -h 0.0.0.0 ./my.db Restart=on-failure

[Install] WantedBy=multi-user.target ```

Activate it with: bash $ sudo systemctl daemon-reload $ sudo systemctl enable datasette $ sudo systemctl start datasette

Logs are best viewed using journalctl -u datasette -f.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Documentation with recommendations on running Datasette in production without using Docker 459397625  
504662063 https://github.com/simonw/datasette/issues/514#issuecomment-504662063 https://api.github.com/repos/simonw/datasette/issues/514 MDEyOklzc3VlQ29tbWVudDUwNDY2MjA2Mw== simonw 9599 2019-06-22T12:31:58Z 2019-06-22T12:31:58Z OWNER

This is also relevant to Datasette Library #417

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Documentation with recommendations on running Datasette in production without using Docker 459397625  
504661990 https://github.com/simonw/datasette/issues/514#issuecomment-504661990 https://api.github.com/repos/simonw/datasette/issues/514 MDEyOklzc3VlQ29tbWVudDUwNDY2MTk5MA== simonw 9599 2019-06-22T12:30:47Z 2019-06-22T12:30:47Z OWNER

A section in the Datasette docs that acts as recommendations plus a tutorial for running Datasette on a VPS without using a Docker would be excellent.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Documentation with recommendations on running Datasette in production without using Docker 459397625  
504661909 https://github.com/simonw/datasette/issues/514#issuecomment-504661909 https://api.github.com/repos/simonw/datasette/issues/514 MDEyOklzc3VlQ29tbWVudDUwNDY2MTkwOQ== simonw 9599 2019-06-22T12:29:46Z 2019-06-22T12:29:46Z OWNER

I'm still trying to figure this out myself.

I'm confident that running nginx on port 80 and using it to proxy traffic to Datasette is a sensible way to solve the port problem.

As for running Datasette itself: the two options that seem best to me are some kind of Init.d service or running it under supervisord. I have to admit I haven't worked out the necessary incantation for either of those yet: the solitary instance I have that's not running as a Docker container is sitting in a "screen" instance for the moment!

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Documentation with recommendations on running Datasette in production without using Docker 459397625  

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