Skip to main content

Tests

ckanext-search-autocomplete

This extension provides an autocomplete for /datasets page search. Autocomplete search by dataset titles and facets.

The default facets:

{
    'organization': _('Organisations'),
    'tags': ('Tags'),
    'res_format': _('Formats'),
}

You can redefine this by implementing the ISearchAutocomplete interface.

Requirements

Compatibility with core CKAN versions:

CKAN version Compatible?
2.6 and earlier not tested
2.7 not tested
2.8 not tested
2.9 yes
2.10 yes

Installation

To install ckanext-search-autocomplete:

  1. Clone the source and install it on the virtualenv

    git clone https://github.com/mutantsan/ckanext-search-autocomplete.git cd ckanext-search-autocomplete pip install -e . pip install -r requirements.txt

  2. Add search_autocomplete to the ckan.plugins setting in your CKAN config file.

Config settings

TODO:

# The item limit to show
# (optional, default: 6).
ckanext.search_autocomplete.autocomplete_limit = 10


# Enable basic(example) template with the autocomplete widget.
# You can use it for testing, but it's better to implement your own template,
# because basic one is neither configurable, nor fancy-looking
# (optional, default: false).
ckanext.search_autocomplete.enable_default_implementation = yes

# Space-separated list of CKAN endpoints(Flask endpoints in form `blueprint.view`).
# It can be used if you want to enable autocomplete for non-standard dataset types, or on
# the organization/group page.
# (optional, default: dataset.search group.read organization.read).
ckanext.search_autocomplete.dataset_search_endpoints = dataset.search custom_dataset_type.search

Developer installation

To install ckanext-search-autocomplete for development, activate your CKAN virtualenv and do:

git clone https://github.com/mutantsan/ckanext-search-autocomplete.git
cd ckanext-search-autocomplete
python setup.py develop
pip install -r dev-requirements.txt

Tests

To run the tests, do:

pytest --ckan-ini=test.ini

License

AGPL

Metadata

Release files for ckanext-search-autocomplete 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ckanext-search-autocomplete 0.1.0
File Size Uploaded
ckanext_search_autocomplete-0.1.0.tar.gz 24.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for ckanext-search-autocomplete 0.1.0
File Interpreter ABI Platform
ckanext_search_autocomplete-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 50.2 kB

Release files / ckanext_search_autocomplete-0.1.0.tar.gz

Download URL ckanext_search_autocomplete-0.1.0.tar.gz
Size 24.5 kB
Tags Source
SHA-256 checksum
How to use checksums
904b149e524f6268cdc7546ad5092b4d27bf78845df82114bda51ad5b500d60b
BLAKE2b-256 checksum
How to use checksums
54fac890cdf873518ea312c5c92e3be79a5062bdcdc2425ff30d9411c735b3ae
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.10.12

Release files / ckanext_search_autocomplete-0.1.0-py3-none-any.whl

Download URL ckanext_search_autocomplete-0.1.0-py3-none-any.whl
Size 25.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
20efac2e002e7d5b578bbbc8b6380f6d4b87155fa2a4a61ff50cf48be5a9b369
BLAKE2b-256 checksum
How to use checksums
cb9d3bf74e659bf688d9462d03cc3318f8c3a0cc67ab6e52348ea736c95b744a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.10.12

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page