-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f803776
commit 27ef0c4
Showing
33 changed files
with
588 additions
and
296 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,132 @@ | ||
# Changelog | ||
|
||
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. | ||
All notable changes to this project will be documented in this file. | ||
|
||
## [0.5.0](https://github.com/DataShades/ckanext-search-tweaks/compare/v0.4.12...v0.5.0) (2023-05-30) | ||
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) | ||
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). | ||
|
||
<!-- insertion marker --> | ||
## [v0.5.0](https://github.com/dataShades/ckanext-search-tweaks/releases/tag/v0.5.0) - 2023-05-30 | ||
|
||
### ⚠ BREAKING CHANGES | ||
|
||
* CKAN v2.10 support | ||
<small>[Compare with v0.4.12](https://github.com/dataShades/ckanext-search-tweaks/compare/v0.4.12...v0.5.0)</small> | ||
|
||
### Features | ||
|
||
* CKAN v2.10 support ([1e48497](https://github.com/DataShades/ckanext-search-tweaks/commit/1e48497301ea2fe488709b08958c427c7c63c79d)) | ||
- CKAN v2.10 support ([1e48497](https://github.com/dataShades/ckanext-search-tweaks/commit/1e48497301ea2fe488709b08958c427c7c63c79d) by Sergey Motornyuk). | ||
|
||
## [v0.4.12](https://github.com/dataShades/ckanext-search-tweaks/releases/tag/v0.4.12) - 2023-03-16 | ||
|
||
<small>[Compare with v0.3.10](https://github.com/dataShades/ckanext-search-tweaks/compare/v0.3.10...v0.4.12)</small> | ||
|
||
## [v0.3.10](https://github.com/dataShades/ckanext-search-tweaks/releases/tag/v0.3.10) - 2021-11-08 | ||
|
||
<small>[Compare with v0.3.8](https://github.com/dataShades/ckanext-search-tweaks/compare/v0.3.8...v0.3.10)</small> | ||
|
||
## [v0.3.8](https://github.com/dataShades/ckanext-search-tweaks/releases/tag/v0.3.8) - 2021-09-13 | ||
|
||
<small>[Compare with v0.3.7](https://github.com/dataShades/ckanext-search-tweaks/compare/v0.3.7...v0.3.8)</small> | ||
|
||
## [v0.3.7](https://github.com/dataShades/ckanext-search-tweaks/releases/tag/v0.3.7) - 2021-08-19 | ||
|
||
<small>[Compare with v0.3.6](https://github.com/dataShades/ckanext-search-tweaks/compare/v0.3.6...v0.3.7)</small> | ||
|
||
## [v0.3.6](https://github.com/dataShades/ckanext-search-tweaks/releases/tag/v0.3.6) - 2021-08-16 | ||
|
||
<small>[Compare with v0.3.4](https://github.com/dataShades/ckanext-search-tweaks/compare/v0.3.4...v0.3.6)</small> | ||
|
||
## [v0.3.4](https://github.com/dataShades/ckanext-search-tweaks/releases/tag/v0.3.4) - 2021-08-16 | ||
|
||
<small>[Compare with v0.3.3](https://github.com/dataShades/ckanext-search-tweaks/compare/v0.3.3...v0.3.4)</small> | ||
|
||
## [v0.3.3](https://github.com/dataShades/ckanext-search-tweaks/releases/tag/v0.3.3) - 2021-08-13 | ||
|
||
<small>[Compare with v0.3.2](https://github.com/dataShades/ckanext-search-tweaks/compare/v0.3.2...v0.3.3)</small> | ||
|
||
## [v0.3.2](https://github.com/dataShades/ckanext-search-tweaks/releases/tag/v0.3.2) - 2021-08-11 | ||
|
||
<small>[Compare with v0.3.1](https://github.com/dataShades/ckanext-search-tweaks/compare/v0.3.1...v0.3.2)</small> | ||
|
||
## [v0.3.1](https://github.com/dataShades/ckanext-search-tweaks/releases/tag/v0.3.1) - 2021-07-19 | ||
|
||
<small>[Compare with v0.3.0](https://github.com/dataShades/ckanext-search-tweaks/compare/v0.3.0...v0.3.1)</small> | ||
|
||
## [v0.3.0](https://github.com/dataShades/ckanext-search-tweaks/releases/tag/v0.3.0) - 2021-07-09 | ||
|
||
<small>[Compare with v0.2.8](https://github.com/dataShades/ckanext-search-tweaks/compare/v0.2.8...v0.3.0)</small> | ||
|
||
## [v0.2.8](https://github.com/dataShades/ckanext-search-tweaks/releases/tag/v0.2.8) - 2021-07-05 | ||
|
||
<small>[Compare with v0.2.7](https://github.com/dataShades/ckanext-search-tweaks/compare/v0.2.7...v0.2.8)</small> | ||
|
||
## [v0.2.7](https://github.com/dataShades/ckanext-search-tweaks/releases/tag/v0.2.7) - 2021-07-01 | ||
|
||
<small>[Compare with v0.2.6](https://github.com/dataShades/ckanext-search-tweaks/compare/v0.2.6...v0.2.7)</small> | ||
|
||
## [v0.2.6](https://github.com/dataShades/ckanext-search-tweaks/releases/tag/v0.2.6) - 2021-06-30 | ||
|
||
<small>[Compare with v0.2.5](https://github.com/dataShades/ckanext-search-tweaks/compare/v0.2.5...v0.2.6)</small> | ||
|
||
## [v0.2.5](https://github.com/dataShades/ckanext-search-tweaks/releases/tag/v0.2.5) - 2021-06-24 | ||
|
||
<small>[Compare with v0.2.4](https://github.com/dataShades/ckanext-search-tweaks/compare/v0.2.4...v0.2.5)</small> | ||
|
||
## [v0.2.4](https://github.com/dataShades/ckanext-search-tweaks/releases/tag/v0.2.4) - 2021-06-24 | ||
|
||
<small>[Compare with v0.2.3](https://github.com/dataShades/ckanext-search-tweaks/compare/v0.2.3...v0.2.4)</small> | ||
|
||
## [v0.2.3](https://github.com/dataShades/ckanext-search-tweaks/releases/tag/v0.2.3) - 2021-06-24 | ||
|
||
<small>[Compare with v0.2.2](https://github.com/dataShades/ckanext-search-tweaks/compare/v0.2.2...v0.2.3)</small> | ||
|
||
## [v0.2.2](https://github.com/dataShades/ckanext-search-tweaks/releases/tag/v0.2.2) - 2021-06-24 | ||
|
||
<small>[Compare with v0.2.1](https://github.com/dataShades/ckanext-search-tweaks/compare/v0.2.1...v0.2.2)</small> | ||
|
||
## [v0.2.1](https://github.com/dataShades/ckanext-search-tweaks/releases/tag/v0.2.1) - 2021-06-21 | ||
|
||
<small>[Compare with v0.2.0](https://github.com/dataShades/ckanext-search-tweaks/compare/v0.2.0...v0.2.1)</small> | ||
|
||
## [v0.2.0](https://github.com/dataShades/ckanext-search-tweaks/releases/tag/v0.2.0) - 2021-06-21 | ||
|
||
<small>[Compare with v0.1.7](https://github.com/dataShades/ckanext-search-tweaks/compare/v0.1.7...v0.2.0)</small> | ||
|
||
## [v0.1.7](https://github.com/dataShades/ckanext-search-tweaks/releases/tag/v0.1.7) - 2021-06-18 | ||
|
||
<small>[Compare with v0.1.6](https://github.com/dataShades/ckanext-search-tweaks/compare/v0.1.6...v0.1.7)</small> | ||
|
||
## [v0.1.6](https://github.com/dataShades/ckanext-search-tweaks/releases/tag/v0.1.6) - 2021-06-16 | ||
|
||
<small>[Compare with v0.1.5](https://github.com/dataShades/ckanext-search-tweaks/compare/v0.1.5...v0.1.6)</small> | ||
|
||
## [v0.1.5](https://github.com/dataShades/ckanext-search-tweaks/releases/tag/v0.1.5) - 2021-06-16 | ||
|
||
<small>[Compare with v0.1.4](https://github.com/dataShades/ckanext-search-tweaks/compare/v0.1.4...v0.1.5)</small> | ||
|
||
## [v0.1.4](https://github.com/dataShades/ckanext-search-tweaks/releases/tag/v0.1.4) - 2021-06-16 | ||
|
||
<small>[Compare with v0.1.3](https://github.com/dataShades/ckanext-search-tweaks/compare/v0.1.3...v0.1.4)</small> | ||
|
||
## [v0.1.3](https://github.com/dataShades/ckanext-search-tweaks/releases/tag/v0.1.3) - 2021-06-16 | ||
|
||
<small>[Compare with v0.1.2](https://github.com/dataShades/ckanext-search-tweaks/compare/v0.1.2...v0.1.3)</small> | ||
|
||
## [v0.1.2](https://github.com/dataShades/ckanext-search-tweaks/releases/tag/v0.1.2) - 2021-06-16 | ||
|
||
<small>[Compare with v0.1.1](https://github.com/dataShades/ckanext-search-tweaks/compare/v0.1.1...v0.1.2)</small> | ||
|
||
## [v0.1.1](https://github.com/dataShades/ckanext-search-tweaks/releases/tag/v0.1.1) - 2021-06-16 | ||
|
||
<small>[Compare with v0.1.0](https://github.com/dataShades/ckanext-search-tweaks/compare/v0.1.0...v0.1.1)</small> | ||
|
||
## [v0.1.0](https://github.com/dataShades/ckanext-search-tweaks/releases/tag/v0.1.0) - 2021-06-15 | ||
|
||
<small>[Compare with v0.0.2](https://github.com/dataShades/ckanext-search-tweaks/compare/v0.0.2...v0.1.0)</small> | ||
|
||
## [v0.0.2](https://github.com/dataShades/ckanext-search-tweaks/releases/tag/v0.0.2) - 2021-06-11 | ||
|
||
<small>[Compare with v0.0.1](https://github.com/dataShades/ckanext-search-tweaks/compare/v0.0.1...v0.0.2)</small> | ||
|
||
## [v0.0.1](https://github.com/dataShades/ckanext-search-tweaks/releases/tag/v0.0.1) - 2021-06-11 | ||
|
||
<small>[Compare with first commit](https://github.com/dataShades/ckanext-search-tweaks/compare/990e2ae0dd6781a4d32d2bda6929c5ce11975703...v0.0.1)</small> | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
.DEFAULT_GOAL := help | ||
.PHONY = help | ||
|
||
help: | ||
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}' | ||
|
||
|
||
changelog: ## compile changelog | ||
git changelog -c conventional -o CHANGELOG.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
# encoding: utf-8 | ||
|
||
# this is a namespace package | ||
try: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,3 @@ | ||
from __future__ import annotations | ||
|
||
from typing import Any | ||
import ckan.plugins.toolkit as tk | ||
|
||
CONFIG_PREFER_BOOST = "ckanext.search_tweaks.common.prefer_boost" | ||
DEFAULT_PREFER_BOOST = True | ||
|
||
|
||
def boost_preffered() -> bool: | ||
return tk.asbool(tk.config.get(CONFIG_PREFER_BOOST, DEFAULT_PREFER_BOOST)) | ||
|
||
|
||
def feature_disabled(feature: str, search_params: dict[str, Any]) -> bool: | ||
return tk.asbool( | ||
search_params.get("extras", {}).get( | ||
f"ext_search_tweaks_disable_{feature}", False | ||
) | ||
) | ||
from .shared import feature_disabled |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
from __future__ import annotations | ||
|
||
import ckan.plugins.toolkit as tk | ||
from ckan.lib.search.query import QUERY_FIELDS | ||
|
||
CONFIG_QF = "ckanext.search_tweaks.common.qf" | ||
DEFAULT_QF = QUERY_FIELDS | ||
|
||
CONFIG_FUZZY = "ckanext.search_tweaks.common.fuzzy_search.enabled" | ||
CONFIG_FUZZY_DISTANCE = "ckanext.search_tweaks.common.fuzzy_search.distance" | ||
CONFIG_MM = "ckanext.search_tweaks.common.mm" | ||
CONFIG_FUZZY_KEEP_ORIGINAL = "ckanext.search_tweaks.common.fuzzy_search.keep_original" | ||
CONFIG_PREFER_BOOST = "ckanext.search_tweaks.common.prefer_boost" | ||
|
||
|
||
def qf() -> str: | ||
return tk.config[CONFIG_QF] or DEFAULT_QF | ||
|
||
|
||
def fuzzy() -> bool: | ||
return tk.config[CONFIG_FUZZY] | ||
|
||
|
||
def fuzzy_distance() -> int: | ||
return tk.config[CONFIG_FUZZY_DISTANCE] | ||
|
||
|
||
def mm() -> str: | ||
return tk.config[CONFIG_MM] | ||
|
||
|
||
def fuzzy_with_original() -> bool: | ||
return tk.config[CONFIG_FUZZY_KEEP_ORIGINAL] | ||
|
||
|
||
def prefer_boost() -> bool: | ||
return tk.config[CONFIG_PREFER_BOOST] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
version: 1 | ||
groups: | ||
- annotation: "ckanext-search-tweaks: common" | ||
options: | ||
- key: ckanext.search_tweaks.common.qf | ||
placeholder: "name^4 title^4 tags^2 groups^2 text" | ||
|
||
- key: ckanext.search_tweaks.common.mm | ||
default: "1" | ||
|
||
- key: ckanext.search_tweaks.common.fuzzy_search.enabled | ||
type: bool | ||
|
||
- key: ckanext.search_tweaks.common.fuzzy_search.distance | ||
type: int | ||
default: 1 | ||
|
||
- key: ckanext.search_tweaks.common.fuzzy_search.keep_original | ||
type: bool | ||
default: true | ||
|
||
- key: ckanext.search_tweaks.common.prefer_boost | ||
type: bool | ||
default: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.