home / github

Menu
  • Search all tables
  • GraphQL API

issue_comments

Table actions
  • GraphQL API for issue_comments

12 rows where "created_at" is on date 2020-12-14 sorted by updated_at descending

✖
✖

✎ View and edit SQL

This data as json, CSV (advanced)

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

user 6

  • simonw 7
  • yurivish 1
  • robintw 1
  • MarkusH 1
  • nitinpaultifr 1
  • codecov[bot] 1

issue 6

  • "Stream all rows" is not at all obvious 4
  • More flexible CORS support in core, to encourage good security practices 4
  • Handle spatialite geometry columns better 1
  • Replace "datasette publish --extra-options" with "--setting" 1
  • JavaScript to help plugins interact with the fragment part of the URL 1
  • Update pytest requirement from <6.2.0,>=5.2.2 to >=5.2.2,<6.3.0 1

author_association 2

  • OWNER 7
  • NONE 5
id html_url issue_url node_id user created_at updated_at ▲ author_association body reactions issue performed_via_github_app
744618787 https://github.com/simonw/datasette/issues/1143#issuecomment-744618787 https://api.github.com/repos/simonw/datasette/issues/1143 MDEyOklzc3VlQ29tbWVudDc0NDYxODc4Nw== yurivish 114388 2020-12-14T18:15:00Z 2020-12-15T02:21:53Z NONE

From a quick look at the README, it does seem to do everything I need, thanks!

I think the argument for inclusion in core is to lower the chances of unwanted data access. A local server can be accessed by anybody who can make an HTTP request to your computer regardless of CORS rules, but the default * rule additionally opens up access to the local instance to any website you visit while it is running.

That's probably not what people typically intend, particularly when the data is of a sensitive nature. A default of requiring the user to specify the origin (allowing * but encouraging a narrower scope) would solve this problem entirely, I think.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
More flexible CORS support in core, to encourage good security practices 764059235  
744757558 https://github.com/simonw/datasette/issues/1143#issuecomment-744757558 https://api.github.com/repos/simonw/datasette/issues/1143 MDEyOklzc3VlQ29tbWVudDc0NDc1NzU1OA== simonw 9599 2020-12-14T22:42:10Z 2020-12-14T22:42:10Z OWNER

This may involve a breaking change to the CLI settings interface, so I'm adding this to the 1.0 milestone.

{
    "total_count": 1,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 1,
    "rocket": 0,
    "eyes": 0
}
More flexible CORS support in core, to encourage good security practices 764059235  
744756861 https://github.com/simonw/datasette/issues/1143#issuecomment-744756861 https://api.github.com/repos/simonw/datasette/issues/1143 MDEyOklzc3VlQ29tbWVudDc0NDc1Njg2MQ== simonw 9599 2020-12-14T22:40:28Z 2020-12-14T22:40:28Z OWNER

That's a very convincing argument. I'm keen on making sure Datasette is "secure by default" so you're right, encouraging finely grains CORS rules in core rather than leaving that to a plugin sounds like the right call.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
More flexible CORS support in core, to encourage good security practices 764059235  
744576894 https://github.com/simonw/datasette/issues/1142#issuecomment-744576894 https://api.github.com/repos/simonw/datasette/issues/1142 MDEyOklzc3VlQ29tbWVudDc0NDU3Njg5NA== simonw 9599 2020-12-14T17:03:13Z 2020-12-14T17:03:13Z OWNER

I'm not sure about the radio boxes for JSON, just because you can't right-click on a radio box and copy it to your clipboard like you can with links. Worth trying it out though.

The radio boxes for that CSV option are definitely the right way to go.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
"Stream all rows" is not at all obvious 763361458  
744563209 https://github.com/simonw/datasette/issues/1142#issuecomment-744563209 https://api.github.com/repos/simonw/datasette/issues/1142 MDEyOklzc3VlQ29tbWVudDc0NDU2MzIwOQ== simonw 9599 2020-12-14T16:41:11Z 2020-12-14T16:41:11Z OWNER

To check out and start the server:

/tmp % git clone git@github.com:nitinpaul/datasette
Cloning into 'datasette'...
remote: Enumerating objects: 124, done.
# ...
datasette % python3 -m venv venv
datasette % source venv/bin/activate
(venv) datasette % pip install -e '.[test]'
Obtaining file:///private/tmp/datasette
Collecting asgiref<3.4.0,>=3.2.10
Using cached asgiref-3.3.1-py3-none-any.whl (19 kB)
# ...
(venv) datasette % datasette
INFO:     Started server process [24002]
INFO:     Waiting for application startup.
INFO:     Application startup complete.
INFO:     Uvicorn running on http://127.0.0.1:8001 (Press CTRL+C to quit)

And to run the tests:

(venv) datasette % pytest
======================================================================== test session starts ========================================================================
platform darwin -- Python 3.9.1, pytest-6.1.2, py-1.10.0, pluggy-0.13.1
SQLite: 3.34.0
rootdir: /private/tmp/datasette, configfile: pytest.ini
plugins: asyncio-0.14.0, timeout-1.4.2
collected 841 items

tests/test_package.py ..                                                                                                                                      [  0%]
{
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
"Stream all rows" is not at all obvious 763361458  
744522099 https://github.com/simonw/datasette/issues/1142#issuecomment-744522099 https://api.github.com/repos/simonw/datasette/issues/1142 MDEyOklzc3VlQ29tbWVudDc0NDUyMjA5OQ== nitinpaultifr 6622733 2020-12-14T15:37:47Z 2020-12-14T15:37:47Z NONE

Alright I could give it a try! This might be a stupid question, can you tell me how to run the server from my fork? So that I can test the changes?

{
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
"Stream all rows" is not at all obvious 763361458  
744489028 https://github.com/simonw/datasette/issues/1144#issuecomment-744489028 https://api.github.com/repos/simonw/datasette/issues/1144 MDEyOklzc3VlQ29tbWVudDc0NDQ4OTAyOA== MarkusH 475613 2020-12-14T14:47:11Z 2020-12-14T14:47:11Z NONE

Thanks for opening the issue, @simonw. Let me elaborate on my Tweets.

datasette-chartjs provides drop down lists to pick the chart visualization (e.g. bar, line, doughnut, pie, ...) as well as the column used for the "x axis" (e.g. time).

A user can change the values on-demand. The chart will be redrawn w/o querying the database again.

However, if a user wants to change the underlying query, they will use the SQL field provided by datasette or any of the other datasette built-in features to amend a query. In order to maintain a user's selections for the plugin, datasette-chartjs copies some parts of datasette-vega which persist the chosen visualization and column in the hash part of a URL (the stuff behind the #). The plugin load the config from the hash upon initialization on the next page and use it accordingly.

Additionally, datasette-vega and datasette-chartjs need to make sure to include the hash in all links and forms that cause a reload of the page. This is, such that the config persists between clicks.

This ticket is about moving thes parts into datasette that provide the functionality to do so. This includes:

  1. a way to load config options with a given prefix from the current URL hash
  2. a way to update the current URL hash with a new config value or a bunch of config options
  3. updating all necessary links and forms on the current page to include the URL hash whenever its updated
  4. to prevent leaking config options to external pages, only "internal" links should be updated

There's another, optional, feature that we might want to think about during the design phase: the scope of the config. Links within a datasette instance have 1 of 3 scopes:

  1. global, for the whole datasette project
  2. database, for all tables in a database
  3. table, only for a table within a database

When updating the links and forms as pointed out in 3. above, it might be worth considering which links need to be updated. I could imagine a plugin that wants to persist some setting across all tables within a database but another setting only within a table.

{
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
JavaScript to help plugins interact with the fragment part of the URL 765637324  
744475543 https://github.com/simonw/datasette/pull/1145#issuecomment-744475543 https://api.github.com/repos/simonw/datasette/issues/1145 MDEyOklzc3VlQ29tbWVudDc0NDQ3NTU0Mw== codecov[bot] 22429695 2020-12-14T14:26:25Z 2020-12-14T14:26:25Z NONE

Codecov Report

Merging #1145 (a8588f9) into main (0c616f7) will not change coverage. The diff coverage is n/a.

```diff @@ Coverage Diff @@

main #1145 +/-

======================================= Coverage 91.41% 91.41%
======================================= Files 31 31
Lines 3881 3881
======================================= Hits 3548 3548
Misses 333 333
```


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 0c616f7...a8588f9. 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 requirement from <6.2.0,>=5.2.2 to >=5.2.2,<6.3.0 766494367  
744461856 https://github.com/simonw/datasette/issues/276#issuecomment-744461856 https://api.github.com/repos/simonw/datasette/issues/276 MDEyOklzc3VlQ29tbWVudDc0NDQ2MTg1Ng== robintw 296686 2020-12-14T14:04:57Z 2020-12-14T14:04:57Z NONE

I'm looking into using datasette with a database with spatialite geometry columns, and came across this issue. Has there been any progress on this since 2018?

In one of my tables I'm just storing lat/lon points in a spatialite point geometry, and I've managed to make datasette-cluster-map display the points by extracting the lat and lon in SQL - using something like select ... ST_X(location) as longitude, ST_Y(location) as latitude from Blah. Something more 'built-in' would be great though - particularly for the tables I have that store more complex geometries.

{
    "total_count": 1,
    "+1": 1,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Handle spatialite geometry columns better 324835838  
744251252 https://github.com/simonw/datasette/issues/1142#issuecomment-744251252 https://api.github.com/repos/simonw/datasette/issues/1142 MDEyOklzc3VlQ29tbWVudDc0NDI1MTI1Mg== simonw 9599 2020-12-14T07:56:38Z 2020-12-14T07:56:38Z OWNER

That's a really solid design for this! I'd be very happy to review a pull request - you should be able to implement this with just template edits and some CSS changes I think.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
"Stream all rows" is not at all obvious 763361458  
744249157 https://github.com/simonw/datasette/issues/1143#issuecomment-744249157 https://api.github.com/repos/simonw/datasette/issues/1143 MDEyOklzc3VlQ29tbWVudDc0NDI0OTE1Nw== simonw 9599 2020-12-14T07:53:15Z 2020-12-14T07:53:15Z OWNER

Does this plugin do everything you need? https://github.com/simonw/datasette-cors

I'm open to arguments as to why this should be in core rather than in a plugin - I'm on the fence about that at the moment.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
More flexible CORS support in core, to encourage good security practices 764059235  
744142692 https://github.com/simonw/datasette/issues/741#issuecomment-744142692 https://api.github.com/repos/simonw/datasette/issues/741 MDEyOklzc3VlQ29tbWVudDc0NDE0MjY5Mg== simonw 9599 2020-12-14T03:28:56Z 2020-12-14T03:28:56Z OWNER

I'm going to try this out on datasette-publish-vercel first.

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
Replace "datasette publish --extra-options" with "--setting" 607223136  

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