Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into ckan-master
Browse files Browse the repository at this point in the history
  • Loading branch information
FuhuXia committed Nov 13, 2024
2 parents 2e515f6 + c68bd4f commit c592d2a
Show file tree
Hide file tree
Showing 28 changed files with 1,299 additions and 1,458 deletions.
12 changes: 4 additions & 8 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,14 @@ version: 2
# Set the version of Python and other tools you might need
build:
os: ubuntu-22.04
apt_packages:
- libmagic-dev
tools:
python: "3.10"
python: "3.12"

sphinx:
configuration: doc/conf.py
mkdocs:
configuration: mkdocs.yml

formats: all

python:
install:
- method: pip
path: .
- requirements: doc-requirements.txt
- requirements: doc/requirements.txt
64 changes: 64 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# Changelog

## [Unreleased](https://github.com/ckan/ckanext-dcat/compare/v2.2.0...HEAD)


## [v2.2.0](https://github.com/ckan/ckanext-spatial/compare/v2.1.1...v2.2.0) - 2024-11-08

* CKAN 2.11 support [#331](https://github.com/ckan/ckanext-spatial/pull/331)
* SQLALchemy v2 support [#338](https://github.com/ckan/ckanext-spatial/pull/338)
* Fix requirements versions issues with Shapely and Numpy [#341](https://github.com/ckan/ckanext-spatial/pull/341)
* Fix catch error on index [#327](https://github.com/ckan/ckanext-spatial/pull/327)
* Traverse IIS folders in WAF harvester [#337](https://github.com/ckan/ckanext-spatial/pull/337)
* Ensure the bbox input is in the correct form [#322](https://github.com/ckan/ckanext-spatial/pull/322)

## [v2.1.1](https://github.com/ckan/ckanext-spatial/compare/v2.1.0...v2.1.1) - 2023-11-10

* Lock pyproj to released 3.6.1 [#321](https://github.com/ckan/ckanext-spatial/pull/321)
* Improve date parser for IIS servers [#320](https://github.com/ckan/ckanext-spatial/pull/320)


## [v2.1.0](https://github.com/ckan/ckanext-spatial/compare/v2.0.0...v2.1.0) - 2023-10-31

* Dropped support for Python 2
* Dropped support for the PostGIS search backend
* Updated the common map JS module to support many different tile providers. The default Stamen Terrain tile will no longer work, and users will need to configure a map tiles provider. Please check the [documentation](https://docs.ckan.org/projects/ckanext-spatial/en/latest/map-widgets.html) for full details.
* Upgrade tests to check all envs, including CKAN 2.10 with Python 3.10 [#308](https://github.com/ckan/ckanext-spatial/pull/308)
* TypeError when spatial is missing [#306](https://github.com/ckan/ckanext-spatial/pull/306)
* Fix requirements [#313](https://github.com/ckan/ckanext-spatial/pull/313)
* Fix detecting Microsoft-IIS server [#316](https://github.com/ckan/ckanext-spatial/pull/316)
* Update install.rst [#318](https://github.com/ckan/ckanext-spatial/pull/318)
* Change str validator to unicode_safe [#312](https://github.com/ckan/ckanext-spatial/pull/312)
* Use csw2 from owslib [#311](https://github.com/ckan/ckanext-spatial/pull/311)

## [v2.0.0](https://github.com/ckan/ckanext-spatial/compare/v1.1.0...v2.0.0) - 2023-01-26

> [!NOTE]
> ckanext-spaital v2.0.0 only supports CKAN >= 2.9. For older versions use the 1.x versions

* Remove PostGIS requirement. Still available if using `ckan.spatial.use_postgis=true`, but will be dropped in the future
* Updated and simplified bbox-based and spatial field based searches, cleaning up and consolidating code, extending test coverage
* Pre-built and customized [Docker images](https://github.com/ckan/ckan-solr) (`*-spatial`) including all necessary changes to enable the spatial search
* New dataset search widget, easier to integrate with custom themes
* Allow to customize the actual Solr spatial query
* Updated [docs](https://docs.ckan.org/projects/ckanext-spatial/en/latest/)!
* [Document](https://docs.ckan.org/projects/ckanext-spatial/en/latest/spatial-search.html#custom-indexing-logic) and add tests for custom indexing support and multiple geometries per dataset
* Refactor `IPackageController` hooks


## [v1.1.0](https://github.com/ckan/ckanext-spatial/compare/v1.0.0...v1.1.0) - 2022-12-20

* Update for PY3 Encoding (waf harvester) [#252](https://github.com/ckan/ckanext-spatial/pull/252)
* Drop deprecated `package_extras` usage [#273](https://github.com/ckan/ckanext-spatial/pull/273)
* Make `_params_for_solr_search` extend `fq_list` [#236](https://github.com/ckan/ckanext-spatial/pull/236)
* Update shapely usage to avoid deprecation [#276](https://github.com/ckan/ckanext-spatial/pull/276)
* `guess_resource_format` may use protocol and function to better guess t… [#268](https://github.com/ckan/ckanext-spatial/pull/268)
* Make `ckanext.spatial.harvest.validate_wms` working again #265 [#267](https://github.com/ckan/ckanext-spatial/pull/267)
* Lineage support [#266](https://github.com/ckan/ckanext-spatial/pull/266)
* Apply byte->str conversion to recursive call [#278](https://github.com/ckan/ckanext-spatial/pull/278)
* CKAN 2.10 support [#279](https://github.com/ckan/ckanext-spatial/pull/279)
* Remove coupled resources from solr [#285](https://github.com/ckan/ckanext-spatial/pull/285)
* Add nginx WAF server [#283](https://github.com/ckan/ckanext-spatial/pull/283)
* Pin shapely [#303](https://github.com/ckan/ckanext-spatial/pull/303)
* Fix HTML view of ISO XML [#280](https://github.com/ckan/ckanext-spatial/pull/280)
2 changes: 1 addition & 1 deletion ckanext/spatial/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
import pkgutil
__path__ = pkgutil.extend_path(__path__, __name__)

__version__ = "2.1.1"
__version__ = "2.2.0"
32 changes: 15 additions & 17 deletions ckanext/spatial/public/js/spatial_query.js
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ this.ckan.module('spatial-query', function ($, _) {
map.removeLayer(module.extentLayer);
}
module.extentLayer = extentLayer = e.layer;
$('#ext_bbox').val(extentLayer.getBounds().toBBoxString());
module.ext_bbox_input.val(extentLayer.getBounds().toBBoxString());
map.addLayer(extentLayer);
element.find('.btn-primary').removeClass('disabled').addClass('btn-primary');
});
Expand Down Expand Up @@ -197,33 +197,31 @@ this.ckan.module('spatial-query', function ($, _) {

// Is there an existing box from a previous search?
_setPreviousBBBox: function(map, zoom=true) {
previous_bbox = this._getParameterByName('ext_bbox');
let module = this;
previous_bbox = module._getParameterByName('ext_bbox');
if (previous_bbox) {
$('#ext_bbox').val(previous_bbox);
this.extentLayer = this._drawExtentFromCoords(previous_bbox.split(','))
map.addLayer(this.extentLayer);
module.ext_bbox_input.val(previous_bbox);
module.extentLayer = module._drawExtentFromCoords(previous_bbox.split(','))
map.addLayer(module.extentLayer);
if (zoom) {
map.fitBounds(this.extentLayer.getBounds(), {"animate": false, "padding": [20, 20]});
map.fitBounds(module.extentLayer.getBounds(), {"animate": false, "padding": [20, 20]});
}
} else {
map.fitBounds(this.options.default_extent, {"animate": false});
map.fitBounds(module.options.default_extent, {"animate": false});
}

},

_onReady: function() {
let module = this;
let map;
let form = $(".search-form");

var buttons;
let form = $('#dataset-search-form');
let bbox_input_id = 'ext_bbox';

// Add necessary fields to the search form if not already created
$(['ext_bbox']).each(function(index, item){
if ($("#" + item).length === 0) {
$('<input type="hidden" />').attr({'id': item, 'name': item}).appendTo(form);
}
});
// Add necessary field to the search form if not already created
if ($("#" + bbox_input_id).length === 0) {
$('<input type="hidden" />').attr({'id': bbox_input_id, 'name': bbox_input_id}).appendTo(form);
}
module.ext_bbox_input = $('#dataset-search-form #ext_bbox');

// OK map time
this.mainMap = map = this._createMap('dataset-map-container');
Expand Down
1 change: 0 additions & 1 deletion doc-requirements.txt

This file was deleted.

Binary file added doc/_assets/ckan.ico
Binary file not shown.
Binary file added doc/_assets/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
27 changes: 27 additions & 0 deletions doc/_css/extra.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
[data-md-color-scheme="ckan"] {
--md-primary-fg-color: #2980b9;
--md-primary-fg-color--light: #ECB7B7;
--md-primary-fg-color--dark: #90030C;
}

[data-md-color-scheme="slate"] {
--md-primary-fg-color: #2980b9;
--md-primary-fg-color--light: #ECB7B7;
--md-primary-fg-color--dark: #90030C;
--md-hue: 210;
}


[data-md-toggle="search"]:not(:checked) ~ .md-header .md-search__form::after {
position: absolute;
top: .3rem;
right: .3rem;
display: block;
padding: .1rem .4rem;
color: var(--md-default-bg-color);
font-weight: bold;
font-size: .8rem;
border: .05rem solid var(--md-default-bg-color--lighter);
border-radius: .1rem;
content: "/";
}
Binary file added doc/_static/index.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
22 changes: 0 additions & 22 deletions doc/_templates/footer.html

This file was deleted.

1 change: 1 addition & 0 deletions doc/changelog.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
--8<-- "CHANGELOG.md"
Loading

0 comments on commit c592d2a

Please sign in to comment.