From f033f6b10c2f5b88205928b6a9df93327f9f4611 Mon Sep 17 00:00:00 2001 From: mjanez <96422458+mjanez@users.noreply.github.com> Date: Wed, 26 Jun 2024 10:17:28 +0200 Subject: [PATCH 1/5] Remove unused harvest patch - Now the custom harvest panel is derived to ckanext-schemingdcat. Update .env.example and remove patch. - Remove unused recline_view --- .env.example | 4 +- .../00_improve_harvest_panel.patch | 144 ------------------ 2 files changed, 2 insertions(+), 146 deletions(-) delete mode 100644 ckan/patches/ckanext-harvest/00_improve_harvest_panel.patch diff --git a/.env.example b/.env.example index f9ef19ea..cdbcd21c 100644 --- a/.env.example +++ b/.env.example @@ -119,7 +119,7 @@ CKAN__RESOURCE_PROXY__MAX_FILE_SIZE=50048576 CKAN__RESOURCE_PROXY__CHUNK_SIZE=4096 ## Default timeout for fetching proxied items CKAN__RESOURCE_PROXY__TIMEOUT=10 -CKAN__VIEWS__DEFAULT_VIEWS="image_view webpage_view text_view recline_view wmts_view geojson_view geo_view shp_view pdf_view" +CKAN__VIEWS__DEFAULT_VIEWS="image_view webpage_view text_view datatables_view wmts_view geojson_view geo_view shp_view pdf_view" # Localization CKAN__LOCALE_DEFAULT="en" @@ -127,7 +127,7 @@ CKAN__LOCALE_ORDER="en es pt_BR ja it cs_CZ ca fr el sv sr sr@latin no sk fi ru CKAN__LOCALES_OFFERED="en es pt_BR ja it cs_CZ ca fr el sv sr sr@latin no sk fi ru de pl nl bg ko_KR hu sa sl lv" # Extensions -CKAN__PLUGINS="envvars stats image_view text_view datatables_view webpage_view resourcedictionary datastore xloader harvest spatial_metadata spatial_query spatial_harvest_metadata_api csw_harvester waf_harvester doc_harvester resource_proxy geo_view geojson_view wmts_view shp_view dcat dcat_rdf_harvester dcat_json_harvester dcat_json_interface schemingdcat_datasets schemingdcat_groups schemingdcat_organizations schemingdcat schemingdcat_ckan_harvester schemingdcat_xls_harvester pdf_view pages fluent" +CKAN__PLUGINS="envvars stats image_view text_view datatables_view webpage_view resourcedictionary datastore xloader spatial_metadata spatial_query spatial_harvest_metadata_api csw_harvester waf_harvester doc_harvester resource_proxy geo_view geojson_view wmts_view shp_view dcat dcat_rdf_harvester dcat_json_harvester dcat_json_interface schemingdcat_datasets schemingdcat_groups schemingdcat_organizations schemingdcat schemingdcat_ckan_harvester schemingdcat_xls_harvester harvest pdf_view pages fluent" # ckanext-harvest CKAN__HARVEST__MQ__TYPE=redis diff --git a/ckan/patches/ckanext-harvest/00_improve_harvest_panel.patch b/ckan/patches/ckanext-harvest/00_improve_harvest_panel.patch deleted file mode 100644 index da31dde9..00000000 --- a/ckan/patches/ckanext-harvest/00_improve_harvest_panel.patch +++ /dev/null @@ -1,144 +0,0 @@ -diff --git a/ckanext/harvest/logic/action/update.py b/ckanext/harvest/logic/action/update.py -index 7dce1f5..ac4db4f 100644 ---- a/ckanext/harvest/logic/action/update.py -+++ b/ckanext/harvest/logic/action/update.py -@@ -706,7 +706,7 @@ def harvest_jobs_run(context, data_dict): - notify_all = toolkit.asbool(config.get('ckan.harvest.status_mail.all')) - notify_errors = toolkit.asbool(config.get('ckan.harvest.status_mail.errored')) - last_job_errors = status['last_job']['stats'].get('errored', 0) -- log.debug('Notifications: All:{} On error:{} Errors:{}'.format(notify_all, notify_errors, last_job_errors)) -+ log.debug('Notifications: All:{} On error:{} Errors:{} Errordict:{}'.format(notify_all, notify_errors, last_job_errors, status['last_job']['stats'])) - - if last_job_errors > 0 and (notify_all or notify_errors): - send_error_email(context, job_obj.source.id, status) -diff --git a/ckanext/harvest/templates/snippets/source_item.html b/ckanext/harvest/templates/snippets/source_item.html -index a8ba26f..3f50bdb 100644 ---- a/ckanext/harvest/templates/snippets/source_item.html -+++ b/ckanext/harvest/templates/snippets/source_item.html -@@ -48,6 +48,7 @@ Example: - {% endif %} - {% if not within_organization and source.organization %} - — {{ _('Organization') }}: {{ h.link_to(source.organization.title or source.organization.name, h.url_for('organization.read', id=source.organization.name)) }} -+ — {{ _('Datasets') }}: {{ h.link_to(h.schemingdcat_package_count_for_source(source.id), url) }} - {% endif %} -
- -diff --git a/ckanext/harvest/templates/source/new.html b/ckanext/harvest/templates/source/new.html -index b7feb3d..b1fe472 100644 ---- a/ckanext/harvest/templates/source/new.html -+++ b/ckanext/harvest/templates/source/new.html -@@ -24,12 +24,18 @@ -- {% trans %} -- Harvest sources allow importing remote metadata into this catalog. -- Remote sources can be other catalogs such as other CKAN instances, CSW -- servers or Web Accessible Folders (WAF) (depending on the actual -- harvesters enabled for this instance). -+ Harvest sources allow importing remote metadata into this catalog. Remote sources can be other catalogs such as other CKAN instances, CSW servers, XML metadata files, XLSX with metadata records or Web Accessible Folder (WAF). - {% endtrans %} -
-+ -+-+ {{ _('Depending on the actual harvesters enabled for this instance. eg: ') }} -+
-+ {% trans %} -+ Harvest sources allow importing remote metadata into this catalog. Remote sources can be other catalogs such as other CKAN instances, CSW servers, XML metadata files, XLSX with metadata records or Web Accessible Folder (WAF). -+ {% endtrans %} -+
-+ -+-+ {{ _('Depending on the actual harvesters enabled for this instance. eg: ') }} -+