Upgrade Datasette instance configuration to handle new features
Install this plugin in the same environment as Datasette.
datasette install datasette-upgrade
The plugin currently provides one command, which will split an old style metadata.json
or metadata.yml
file - which contains both metadata and plugin configuration and permissions, into a Datasette 1.0+ metadata.yml
file and a datasette.yml
file.
datasette upgrade metadata-to-config metadata.json -m metadata.yml -c datasette.yml
This will leave metadata.json
in place, but will write out metadata.yml
and datasette.yml
as two new files.
To set up this plugin locally, first checkout the code. Then create a new virtual environment:
cd datasette-upgrade
python3 -m venv venv
source venv/bin/activate
Now install the dependencies and test dependencies:
pip install -e '.[test]'
To run the tests:
pytest