Custom plugins for the Subak Data Catalogue
-
freshness - Derives a freshness score (between 1 and 5) for each dataset based on the age of the last updated dataset resource
-
schema - Customises the CKAN dataset and resource schema to enable useful filters and more information for searching datasets
-
qa - Add various QA tasks that can be reported on (via the ckanext-report plugin)
None
To install ckanext-subakdc-plugins:
-
Add the following lines to
ckan/Dockerfilein thedocker-ckanproject:RUN pip install -e git+https://github.com/climatesubak/ckanext-subakdc-plugins.git#egg=ckanext-subakdc-plugins && \ pip install -r https://raw.githubusercontent.com/climatesubak/ckanext-subakdc-plugins/main/requirements.txt -
Add the required plugins to
CKAN__PLUGINSin your .env file, e.gfreshness -
Rebuild and start the
ckancontainer. E.g. usingmake rebuild.ckan
None at present
To install ckanext-subakdc-plugins for development:
-
Clone this repo into the
/srcfolder of thedocker-ckanproject -
Add the required plugins to
CKAN__PLUGINSin your .env file, e.gfreshness -
Rebuild and start the
ckancontainer. E.g. usingmake rebuild.ckan
To run the tests, do:
pytest --ckan-ini=test.ini
If ckanext-subakdc-plugins should be available on PyPI you can follow these steps to publish a new version:
-
Update the version number in the
setup.pyfile. See PEP 440 for how to choose version numbers. -
Make sure you have the latest version of necessary packages:
pip install --upgrade setuptools wheel twine
-
Create a source and binary distributions of the new version:
python setup.py sdist bdist_wheel && twine check dist/*Fix any errors you get.
-
Upload the source distribution to PyPI:
twine upload dist/* -
Commit any outstanding changes:
git commit -a git push -
Tag the new release of the project on GitHub with the version number from the
setup.pyfile. For example if the version number insetup.pyis 0.0.1 then do:git tag 0.0.1 git push --tags