-
-
Notifications
You must be signed in to change notification settings - Fork 655
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move permissions
, allow
blocks, canned queries and more out of metadata.yaml
and into datasette.yaml
#2191
Conversation
Codecov ReportAll modified lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2191 +/- ##
==========================================
- Coverage 92.69% 92.68% -0.02%
==========================================
Files 40 40
Lines 6039 6042 +3
==========================================
+ Hits 5598 5600 +2
- Misses 441 442 +1
☔ View full report in Codecov by Sentry. |
I tested this locally for permissions like this. databases:
content:
allow:
id: root Started Datasette like this: datasette --root content.db pottery2.db -c datasette.yml As root I could see this (note the padlock): ![]() http://127.0.0.1:8001/-/metadata returned |
This is one of the most interesting illustrative examples in the new code: Lines 301 to 349 in f7bdedf
Interesting to note that it now has canned queries in it, which include this bit: Lines 341 to 342 in f7bdedf
It looks like metadata, but in this case it's configuration. That blur between metadata and configuration at the canned query level still feels a little bit odd to me, but I still think we're going in the right direction with it. Also interesting, from that same file: Lines 351 to 399 in f7bdedf
There are a few things in that metadata block that are arguably configuration, not metadata - for example: Line 360 in f7bdedf
I think Lines 369 to 395 in f7bdedf
Most of that stuff is arguably configuration too, with the exception of the |
The |
permissions
and allow
blocks out of metadata.yaml
and into datasette.yaml
permissions
, allow
blocks, and canned queries out of metadata.yaml
and into datasette.yaml
permissions
, allow
blocks, and canned queries out of metadata.yaml
and into datasette.yaml
permissions
, allow
blocks, canned queries and more out of metadata.yaml
and into datasette.yaml
permissions
, allow
blocks, canned queries and more out of metadata.yaml
and into datasette.yaml
permissions
, allow
blocks, canned queries and more out of metadata.yaml
and into datasette.yaml
The PR moves the following fields from
metadata.yaml
todatasette.yaml
:This is a significant breaking change that users will need to upgrade their
metadata.yaml
files for. But the format/locations are similar to the previous version, so it shouldn't be too difficult to upgrade.One note: I'm still working on the Configuration docs, specifically the "reference" section. Though it's pretty small, the rest of read to review