Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ckanext-datagovtheme

Package Overview
Dependencies
Maintainers
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ckanext-datagovtheme

CKAN Extension to manage data.gov theme

  • 0.2.40
  • PyPI
  • Socket score

Maintainers
2

ckanext-datagovtheme

Github Actions PyPI version

Data.gov theme, branding, and UI customizations for catalog.data.gov as a CKAN extension.

Features

TODO document these better.

  • Provides a new spatial query view (overrides ckanext-spatial some front end)

Usage

Requirements

TODO: document how ckanext-datagovtheme interacts with third-party extensions, maybe in the context of Features above.

These extensions are required.

Additionally, ckanext-datagovtheme has "weak" dependencies on these extensions. The dependency might be on templates, template helpers, or other functionality.

This extension is compatible with these versions of CKAN.

CKAN versionCompatibility
<=2.8no
2.90.1.27 (last supported)
2.10>=0.2.0

Configuration

[Optional] ckanext.datagovtheme.js_recent_view = true

This defaults to false. If displaying the recent view count slows down page loading, the optional parameter can be set to true to make the recent view count an AJAX call, improving page loading speed. If the recent view count information (package['tracking_summary']) is already present, the AJAX call is disabled to reduce overhead. Therefore, the built-in recent view count rendering must be disabled for this mechanism to take effect. For catalog.data.gov, it means set setting ckanext.datagovcatalog.add_packages_tracking_info to false.

TODO: re-evaluate the need for this customization after ckan 2.11 release, as described in ticket https://github.com/GSA/data.gov/issues/4798.

Development

Requirements

  • GNU Make
  • Docker Compose

Setup

Build the docker containers. You'll want to do this anytime the dependencies change (requirements.txt, dev-requirements.txt).

$ make build

Start the containers.

$ make up

CKAN will start at localhost:5000.

Clean up the environment.

$ make down

Open a shell to run commands in the container.

$ docker-compose exec ckan bash

If you're unfamiliar with docker-compose, see our cheatsheet and the official docs.

For additional make targets, see the help.

$ make help

Testing

They follow the guidelines for testing CKAN extensions.

To run the extension tests:

$ make test

Lint your code.

$ make lint
Common issues

We have seen issues with datagovtheme not installed. If this is the case, run python setup.py develop in the container.

Matrix builds

The development environment drops as many dependencies as possible. It is not meant to have feature parity with GSA/catalog.data.gov or GSA/inventory-app. Tests should mock external dependencies where possible.

In order to support multiple versions of CKAN, or even upgrade to new versions of CKAN, we support development and testing through the CKAN_VERSION environment variable.

$ make CKAN_VERSION=2.10.1 test
VariableDescriptionDefault
CKAN_VERSIONVersion of CKAN to use.2.10.1
COMPOSE_FILEdocker-compose service description file.docker-compose.yml

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc