Skip to content

Latest commit

 

History

History
66 lines (46 loc) · 3.98 KB

developers_guide.md

File metadata and controls

66 lines (46 loc) · 3.98 KB

Developer's Guide

The CKAN installation is based on the docker-compose setup, follow project README for the setup

Components Used

The project is dependent on the below extensions, so follow the guide of extensions for any extension related item

Patches

There are some patch created for the CKAN and the extension that is required for the proper functioning of the project and is available at ckan-patch and extension-patch. So if any change is required in the community extensions and ckan base, new patches can be created and added with .patch extension. To create the patch modify the code and create a .patch file from the diff e.g. git diff file > filename.patch and place it in above-mentioned directories accordingly.

510 Extension

The Extension is created by following the extension guide by ckan.

Dependencies

The Extension is dependent on the PyPI packages that are added to the requirements.txt

So while developing if a new package is required that need to be added to requirements.txt to make the functioning smooth.

Custom UI

The Custom UI is used to Resource Create and Resource Edit setup for the Databases, Data lake, and External links. This UI is built over Angular 12. Please follow the documentation for the usage and implementation of the UI. The custom UI is based on the logic of datapub extension

Whenever you change something in the Custom UI you need to rebuild the artifacts, so to do that

  • Go to src/ckanext-data-catalog-510/ directory
  • Run command ./sync.sh ./datapub-510-custom-ui.
  • It will update the assets in src/ckanext-data-catalog-510/ckanext/data_catalog_510/assets. It will update both JS and CSS files
  • It is used by the file src/ckanext-data-catalog-510/ckanext/data_catalog_510/templates/datapub/snippets/resource_module.html

This way you can implement your custom UI changes to the 510 Data Catalog Project

Important Links and commands

  • For CKAN configuration
  • For Environment Variables
  • If you change anything in DB directly or you want to recover broken solr, please run the following:-     - Log in to the pod/container     - Run the following command ckan search-index rebuild
  • To Create a user as sysadmin ckan sysadmin add <username>
  • You can find more ckan commands here
  • CKAN API Guide
  • CKAN Theming Guide
  • For Customizing CKAN Look and feel by Admin Guide

Tests

  • CKAN tests are running on the Github workflow
  • To Get the tests result you can go to Github Actions and click on the workflow with your commit message.
  • You will see a Job with test written, click on that.
  • Click on the stage Run Tests.
  • You will see how many tests are passed and failed.