Welcome to your cloud development instance of CKAN!
⌛ If you are not seeing a browser tab with the CKAN homepage to the right or a terminal below that says "Running CKAN on http://localhost:5000", wait a bit, things are getting set up... ⌛
Once you see them, you are ready to go! 🚀
This is an online development environment powered by GitHub Codespaces. It is a fully functional CKAN instance that you can configure and customize in any way you need. Changes that you make to the source files with the editor as well as changes to the site itself (e.g. creating a dataset or uploading a file) will be persisted until you delete the codespace.
It's your own CKAN demo site! You can log in using the ckan_admin sysadmin user (password test1234) which will give you full control of the UI. Try creating an Organization, adding some datasets, uploading data, etc
The site has been configured using the default settings that you get in a brand new CKAN instance but you can change any configuration in the ckan.ini file. The development server will refresh automatically as soon as you save your changes to reflect the new configuration.
Additionally, you can install as many extensions as you want. Check the extension README for any particular instructions but they all basically follow the same pattern:
- Open a new terminal in the panel below
- Clone the extension
git clone https://github.com/ckan/ckanext-dcat.git - Install the extension
cd ckanext-dcat python setup.py develop --user - Install extra requirements (if any)
pip install -r requirements.txt - Add the plugin(s) to the
ckan.pluginsconfiguration option in theckan.inifile.
What you are using right now is an online editor, Visual Studio Code for the Web, which runs in your browser. You can browse the files in the CKAN source code using the tree panel on the left, open one of them and edit it. Once you save your changes, the development server will be restarted automatically.
You can commit your changes to the branch where you started the codespace in using the "Source Control" icon in the left toolbar.
You can run queries against the PostgreSQL database using the "SQLTools" plugin, the database icon in the left toolbar.
To run the automated tests simply add a new terminal to the console below and run the pytest command:
pytest --ckan-ini=test-core.ini ckan ckanext
Or to run a specific test:
pytest --ckan-ini=test-core.ini ckan/tests/logic/action/test_create.py::TestMemberCreate::test_group_member_creation
- If you are finding the codespace too slow you can change the machine type to add more cores to the VM, but note that this will count towards your free allowed quota.
- If you don't like the editor, you can run the same codespace using your local Visual Studio Code or JetBrains IDE instances.
- Alternatively you can use a Docker Compose setup or do a tried and tested Source Install in your local computer.