With 1.0 growing ever closer, I'm running into some problems with plugins. datasette-secrets is currently only compatible with 1.0a+ because of the way it uses the new permissions infrastructure from 1.0. But I want a bunch of other plugins to make use of datasette-secrets:
And this means that those plugins will stop working with Datasette <1.0 due to that dependency.
I looked into changing datasette-secrets to be compatible with both versions and it's a tiny bit inconvenient mainly because the test suite uses some conveniences in 1.0 - this for example:
@pytest.fixture
def ds():
return Datasette(
config={
"plugins": {
"datasette-secrets": {
"database": "_internal",
"encryption-key": TEST_ENCRYPTION_KEY,
}
},
"permissions": {"manage-secrets": {"id": "admin"}},
}
)
That permissions piece of configuration is a much more convenient way of testing permissions.
Some options:
- Ignore this. Have more plugins that require 1.0a+ and hurry towards a 1.0 proper release
- Expand the https://github.com/datasette/datasette-test tool which is already intended to help paper over gaps between the two versions
- Release a
0.65 which backports some of these conveniences from 1.0, such that it's pleasant and easy to write tests that work in both
I already have a good pattern for running CI against both versions, as seen here: https://github.com/simonw/datasette-configure-fts/blob/1.1.3/.github/workflows/test.yml
With 1.0 growing ever closer, I'm running into some problems with plugins. datasette-secrets is currently only compatible with 1.0a+ because of the way it uses the new permissions infrastructure from 1.0. But I want a bunch of other plugins to make use of
datasette-secrets:And this means that those plugins will stop working with Datasette <1.0 due to that dependency.
I looked into changing
datasette-secretsto be compatible with both versions and it's a tiny bit inconvenient mainly because the test suite uses some conveniences in 1.0 - this for example:That
permissionspiece of configuration is a much more convenient way of testing permissions.Some options:
0.65which backports some of these conveniences from 1.0, such that it's pleasant and easy to write tests that work in bothI already have a good pattern for running CI against both versions, as seen here: https://github.com/simonw/datasette-configure-fts/blob/1.1.3/.github/workflows/test.yml