A CKAN extension implementing the DCAT requirements of app-transportdata. Extends ckanext-dcat. This extension does mainly 2 things:
- Adapt the DCAT-AP2 profile inherited from ckanext-dcat to fit app-transportdata's custom datamodel
- Implement MobilityDCAT-AP
This extension currently requires a fork of ckanext-dcat. This is because the MobilityDCAT-AP spec makes dcat:CatalogRecord mandatory and the upstream DCAT extension doesn't support this feature yet. A PR proposing this feature upstream has been made.
Compatibility with core CKAN versions:
| CKAN version | Compatible? |
|---|---|
| 2.9 and earlier | no |
| 2.10 | not tested |
| 2.11 | yes |
The extension defines the DCAT profiles that it publishes in pyproject.toml under [project.entry-points."ckan.rdf.profiles"]. Currently available profiles are:
euro_mobility_dcat_ap
In order to make this profile the default, configure the following in the project .env:
CKANEXT__DCAT__RDF__PROFILES=euro_mobility_dcat_ap
- Move this extension repo folder into
app-transportdata/src - Use the
bin/composedevelopment setup there - Run
bin/install_src
Live code reloading should now be active.
To run the tests, do:
pytest --ckan-ini=test.ini
If ckanext-dcat-be-napits should be available on PyPI you can follow these steps to publish a new version:
-
Update the version number in the
pyproject.tomlfile. 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 -m build && 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