Merge pull request #79 from mjanez/ckan-2.9.9

Fix pycsw and update plugins
This commit is contained in:
mjanez 2023-09-25 10:12:17 +02:00 committed by GitHub
commit 9b103cf4e4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
11 changed files with 48 additions and 29 deletions

View File

@ -136,15 +136,18 @@ CKANEXT__XLOADER__API_TOKEN=api_token
CKANEXT__XLOADER__JOBS__DB_URI=postgresql://ckan:ckan@db/ckan
# ckanext-dcat
CKANEXT__DCAT__BASE_URI=http://localhost:81/catalog
CKANEXT__DCAT__RDF_PROFILES="euro_dcat_ap_2 euro_dcat_ap"
CKANEXT__DCAT__BASE_URI=${CKAN_URL}
# Default profile(s). Instead of this envvar, it's possible to specify all the profile(s) availables to be used for serialization using the profiles parameter: http://localhost:5000/catalog.xml?profiles=euro_dcat_ap,spain_dcat
CKANEXT__DCAT__RDF_PROFILES='euro_dcat_ap_2'
# The custom endpoint **must** start with a forward slash (`/`) and contain the `{_format}` placeholder. The endpoint is added to the CKAN_SITE_URL and CKAN__ROOT_PATH, example: http://localhost:5000/catalog/catalog.rdf
CKANEXT__DCAT__DEFAULT_CATALOG_ENDPOINT='/catalog.{_format}'
# ckanext-spatial (Solr Backend - solr8-spatial)
CKANEXT__SPATIAL__SEARCH_BACKEND=solr-bbox
CKAN__SPATIAL__SRID=3857
CKANEXT__SPATIAL__COMMON_MAP__TYPE=custom
CKANEXT__SPATIAL__COMMON_MAP__CUSTOM__URL=https://rts.larioja.org/mapa-base/rioja/{z}/{x}/{y}.png
CKANEXT__SPATIAL__COMMON_MAP__ATTRIBUTION='Servicios de Teselas. <a href="https://www.ign.es/web/qsm-cnig">CNIG</a>, bajo <a href="http://creativecommons.org/licenses/by/4.0">CC BY 4.0</a>.'
CKANEXT__SPATIAL__COMMON_MAP__CUSTOM__URL=https://stamen-tiles-{s}.a.ssl.fastly.net/terrain/{z}/{x}/{y}.png
CKANEXT__SPATIAL__COMMON_MAP__ATTRIBUTION='Map tiles by <a href="http://stamen.com">Stamen Design</a> (<a href="http://creativecommons.org/licenses/by/3.0">CC BY 3.0</a>). Data by <a href="http://openstreetmap.org">OpenStreetMap</a> (<a href="http://creativecommons.org/licenses/by-sa/3.0">CC BY SA</a>)'
# ckanext-geoview
CKANEXT__GEOVIEW__GEOJSON__MAX_FILE_SIZE=100000000
@ -154,7 +157,7 @@ CKANEXT__GEOVIEW__SHP_VIEWER__ENCODING=UTF-8
# ckanext-scheming_dcat
## CSW Endpoint for spatial metadata
CKANEXT__SCHEMING_DCAT_GEOMETADATA_BASE_URI=http://localhost:81/csw
CKANEXT__SCHEMING_DCAT_GEOMETADATA_BASE_URI=${PYCSW_URL}
## Scheming: setup_scheming.sh
CKANEXT__SCHEMING_DCAT_DATASET_SCHEMA="ckanext.scheming_dcat:schemas/geodcatap/geodcatap_dataset.yaml"
CKANEXT__SCHEMING_DCAT_GROUP_SCHEMAS="ckanext.scheming_dcat:schemas/geodcatap/geodcatap_group.json"

View File

@ -1,5 +1,6 @@
# Base image
FROM ghcr.io/mjanez/ckan-pycsw:main AS base
LABEL maintainer="mnl.janez@gmail.com"
# ckan-pycsw envvars
ENV APP_DIR=/app
@ -19,6 +20,4 @@ WORKDIR ${APP_DIR}
# Update files if needed
COPY pycsw/conf/pycsw.conf.template docker-entrypoint.d/entrypoint.sh ./
USER $USERNAME
ENTRYPOINT ["/bin/bash", "./entrypoint.sh"]

View File

@ -2,6 +2,8 @@
set -xeuo pipefail
envsubst < pycsw.conf.template > pycsw.conf
#TODO: -Xfrozen_modules=off from: https://bugs.python.org/issue1666807
/wait-for --timeout "$TIMEOUT" "$CKAN_URL" -- pdm run python3 -Xfrozen_modules=off ckan2pycsw/ckan2pycsw.py

View File

@ -57,7 +57,7 @@ database=sqlite:///${PWD}/cite.db
table=records
#filter=type='http://purl.org/dc/dcmitype/Dataset'
#[metadata:inspire]
[metadata:inspire]
enabled=true
languages_supported=eng,spa
default_language=eng

View File

@ -12,12 +12,12 @@ COPY req_fixes ${APP_DIR}/req_fixes
### Harvester - v1.5.1 ###
### Geoview - v0.0.20 ###
### Spatial - v2.0.0 ### fixed requirements.txt
### DCAT - v1.1.0-geodcatap (GeoDCAT-AP extended version) ###
### DCAT - v1.2.0-geodcatap (GeoDCAT-AP/NTI-RISP extended version) ###
### Scheming - release-3.0.0 ###
### Resource dictionary - v1.0.1 ###
### Pages - v0.5.2 ###
### PDFView - 0.0.8 ###
### Scheming DCAT - v1.2.0 (GeoDCAT-AP extended version) ###
### Scheming DCAT - v2.0.0 (GeoDCAT-AP/NTI-RISP extended version) ###
### SPARQL Interface - 2.0.1 ###
RUN echo ${TZ} > /etc/timezone && \
if ! [ /usr/share/zoneinfo/${TZ} -ef /etc/localtime ]; then cp /usr/share/zoneinfo/${TZ} /etc/localtime ; fi && \
@ -35,7 +35,7 @@ RUN echo ${TZ} > /etc/timezone && \
pip3 install -e git+https://github.com/ckan/ckanext-spatial.git@v2.0.0#egg=ckanext-spatial && \
pip3 install -r ${APP_DIR}/req_fixes/ckanext-spatial_requirements.txt && \
echo "mjanez/ckanext-dcat (GeoDCAT-AP extended version)" && \
pip3 install -e git+https://github.com/mjanez/ckanext-dcat.git@v1.1.0-geodcatap#egg=ckanext-dcat && \
pip3 install -e git+https://github.com/mjanez/ckanext-dcat.git@v1.2.0-geodcatap#egg=ckanext-dcat && \
pip3 install -r ${APP_DIR}/src/ckanext-dcat/requirements.txt && \
echo "ckan/ckanext-scheming" && \
pip3 install -e git+https://github.com/ckan/ckanext-scheming.git@release-3.0.0#egg=ckanext-scheming && \
@ -46,8 +46,8 @@ RUN echo ${TZ} > /etc/timezone && \
echo "ckan/ckanext-pdfview" && \
pip3 install -e git+https://github.com/ckan/ckanext-pdfview.git@0.0.8#egg=ckanext-pdfview && \
echo "mjanez/ckanext-scheming_dcat" && \
pip3 install -e git+https://github.com/mjanez/ckanext-scheming_dcat.git@v1.2.0#egg=ckanext_scheming_dcat && \
pip3 install -r https://raw.githubusercontent.com/mjanez/ckanext-scheming_dcat/v1.2.0/requirements.txt
pip3 install -e git+https://github.com/mjanez/ckanext-scheming_dcat.git@v2.0.0#egg=ckanext_scheming_dcat && \
pip3 install -r https://raw.githubusercontent.com/mjanez/ckanext-scheming_dcat/v2.0.0/requirements.txt
# Used to configure the container environment by setting environment variables, creating users, running initialization scripts, .etc
COPY docker-entrypoint.d/* /docker-entrypoint.d/

View File

@ -4,4 +4,5 @@
echo "Loading ckanext-dcat settings in the CKAN config file"
ckan config-tool $CKAN_INI \
"ckanext.dcat.base_uri = $CKANEXT__DCAT__BASE_URI" \
"ckanext.dcat.catalog_endpoint = $CKANEXT__DCAT__DEFAULT_CATALOG_ENDPOINT" \
"ckanext.dcat.rdf.profiles = $CKANEXT__DCAT__RDF_PROFILES"

View File

@ -5,9 +5,9 @@ pyparsing>=2.1.10
requests>=1.1.0
six
# requirements pyproj tempfix: https://github.com/pyproj4/pyproj/issues/1321
# requirements pyproj fix: https://github.com/pyproj4/pyproj/issues/1321
pyproj==2.6.1; python_version < '3.9'
pyproj @ git+https://github.com/pyproj4/pyproj.git@main; python_version >= '3.9'
pyproj==3.6.1; python_version >= '3.9'
Shapely==2.0.1
OWSLib==0.28.1

View File

@ -129,14 +129,17 @@ CKANEXT__XLOADER__JOBS__DB_URI=postgresql://ckan:ckan@db/ckan
# ckanext-dcat
CKANEXT__DCAT__BASE_URI=http://localhost:81/catalog
CKANEXT__DCAT__RDF_PROFILES="euro_dcat_ap_2 euro_dcat_ap"
# Default profile(s). Instead of this envvar, it's possible to specify all the profile(s) availables to be used for serialization using the profiles parameter: http://localhost:5000/catalog.xml?profiles=euro_dcat_ap,spain_dcat
CKANEXT__DCAT__RDF_PROFILES='euro_dcat_ap_2'
# The custom endpoint **must** start with a forward slash (`/`) and contain the `{_format}` placeholder. The endpoint is added to the CKAN_SITE_URL and CKAN__ROOT_PATH, example: http://localhost:5000/catalog/catalog.rdf
CKANEXT__DCAT__DEFAULT_CATALOG_ENDPOINT='/catalog.{_format}'
# ckanext-spatial (Solr Backend - solr8-spatial)
CKANEXT__SPATIAL__SEARCH_BACKEND=solr-bbox
CKAN__SPATIAL__SRID=3857
CKANEXT__SPATIAL__COMMON_MAP__TYPE=custom
CKANEXT__SPATIAL__COMMON_MAP__CUSTOM__URL=https://rts.larioja.org/mapa-base/rioja/{z}/{x}/{y}.png
CKANEXT__SPATIAL__COMMON_MAP__ATTRIBUTION='Servicios de Teselas. <a href="https://www.ign.es/web/qsm-cnig">CNIG</a>, bajo <a href="http://creativecommons.org/licenses/by/4.0">CC BY 4.0</a>.'
CKANEXT__SPATIAL__COMMON_MAP__CUSTOM__URL=https://stamen-tiles-{s}.a.ssl.fastly.net/terrain/{z}/{x}/{y}.png
CKANEXT__SPATIAL__COMMON_MAP__ATTRIBUTION='Map tiles by <a href="http://stamen.com">Stamen Design</a> (<a href="http://creativecommons.org/licenses/by/3.0">CC BY 3.0</a>). Data by <a href="http://openstreetmap.org">OpenStreetMap</a> (<a href="http://creativecommons.org/licenses/by-sa/3.0">CC BY SA</a>)'
# ckanext-geoview
CKANEXT__GEOVIEW__GEOJSON__MAX_FILE_SIZE=100000000
@ -146,7 +149,7 @@ CKANEXT__GEOVIEW__SHP_VIEWER__ENCODING=UTF-8
# ckanext-scheming_dcat
## CSW Endpoint for spatial metadata
CKANEXT__SCHEMING_DCAT_GEOMETADATA_BASE_URI=http://localhost:81/csw
CKANEXT__SCHEMING_DCAT_GEOMETADATA_BASE_URI=${PYCSW_URL}
## Scheming: setup_scheming.sh
CKANEXT__SCHEMING_DCAT_DATASET_SCHEMA="ckanext.scheming_dcat:schemas/geodcatap/geodcatap_dataset.yaml"
CKANEXT__SCHEMING_DCAT_GROUP_SCHEMAS="ckanext.scheming_dcat:schemas/geodcatap/geodcatap_group.json"

View File

@ -137,14 +137,17 @@ CKANEXT__XLOADER__JOBS__DB_URI=postgresql://ckan:ckan@db/ckan
# ckanext-dcat
CKANEXT__DCAT__BASE_URI=http://localhost:81/catalog
CKANEXT__DCAT__RDF_PROFILES="euro_dcat_ap_2 euro_dcat_ap"
# Default profile(s). Instead of this envvar, it's possible to specify all the profile(s) availables to be used for serialization using the profiles parameter: http://localhost:5000/catalog.xml?profiles=euro_dcat_ap,spain_dcat
CKANEXT__DCAT__RDF_PROFILES='euro_dcat_ap_2'
# The custom endpoint **must** start with a forward slash (`/`) and contain the `{_format}` placeholder. The endpoint is added to the CKAN_SITE_URL and CKAN__ROOT_PATH, example: http://localhost:5000/catalog/catalog.rdf
CKANEXT__DCAT__DEFAULT_CATALOG_ENDPOINT='/catalog.{_format}'
# ckanext-spatial (Solr Backend - solr8-spatial)
CKANEXT__SPATIAL__SEARCH_BACKEND=solr-bbox
CKAN__SPATIAL__SRID=3857
CKANEXT__SPATIAL__COMMON_MAP__TYPE=custom
CKANEXT__SPATIAL__COMMON_MAP__CUSTOM__URL=https://rts.larioja.org/mapa-base/rioja/{z}/{x}/{y}.png
CKANEXT__SPATIAL__COMMON_MAP__ATTRIBUTION='Servicios de Teselas. <a href="https://www.ign.es/web/qsm-cnig">CNIG</a>, bajo <a href="http://creativecommons.org/licenses/by/4.0">CC BY 4.0</a>.'
CKANEXT__SPATIAL__COMMON_MAP__CUSTOM__URL=https://stamen-tiles-{s}.a.ssl.fastly.net/terrain/{z}/{x}/{y}.png
CKANEXT__SPATIAL__COMMON_MAP__ATTRIBUTION='Map tiles by <a href="http://stamen.com">Stamen Design</a> (<a href="http://creativecommons.org/licenses/by/3.0">CC BY 3.0</a>). Data by <a href="http://openstreetmap.org">OpenStreetMap</a> (<a href="http://creativecommons.org/licenses/by-sa/3.0">CC BY SA</a>)'
# ckanext-geoview
CKANEXT__GEOVIEW__GEOJSON__MAX_FILE_SIZE=100000000
@ -154,7 +157,7 @@ CKANEXT__GEOVIEW__SHP_VIEWER__ENCODING=UTF-8
# ckanext-scheming_dcat
## CSW Endpoint for spatial metadata
CKANEXT__SCHEMING_DCAT_GEOMETADATA_BASE_URI=http://localhost:81/csw
CKANEXT__SCHEMING_DCAT_GEOMETADATA_BASE_URI=${PYCSW_URL}
## Scheming: setup_scheming.sh
CKANEXT__SCHEMING_DCAT_DATASET_SCHEMA="ckanext.scheming_dcat:schemas/geodcatap/geodcatap_dataset.yaml"
CKANEXT__SCHEMING_DCAT_GROUP_SCHEMAS="ckanext.scheming_dcat:schemas/geodcatap/geodcatap_group.json"

View File

@ -129,14 +129,17 @@ CKANEXT__XLOADER__JOBS__DB_URI=postgresql://ckan:ckan@db/ckan
# ckanext-dcat
CKANEXT__DCAT__BASE_URI=http://localhost:81/catalog
CKANEXT__DCAT__RDF_PROFILES="euro_dcat_ap_2 euro_dcat_ap"
# Default profile(s). Instead of this envvar, it's possible to specify all the profile(s) availables to be used for serialization using the profiles parameter: http://localhost:5000/catalog.xml?profiles=euro_dcat_ap,spain_dcat
CKANEXT__DCAT__RDF_PROFILES='euro_dcat_ap_2'
# The custom endpoint **must** start with a forward slash (`/`) and contain the `{_format}` placeholder. The endpoint is added to the CKAN_SITE_URL and CKAN__ROOT_PATH, example: http://localhost:5000/catalog/catalog.rdf
CKANEXT__DCAT__DEFAULT_CATALOG_ENDPOINT='/catalog.{_format}'
# ckanext-spatial (Solr Backend - solr8-spatial)
CKANEXT__SPATIAL__SEARCH_BACKEND=solr-bbox
CKAN__SPATIAL__SRID=3857
CKANEXT__SPATIAL__COMMON_MAP__TYPE=custom
CKANEXT__SPATIAL__COMMON_MAP__CUSTOM__URL=https://rts.larioja.org/mapa-base/rioja/{z}/{x}/{y}.png
CKANEXT__SPATIAL__COMMON_MAP__ATTRIBUTION='Servicios de Teselas. <a href="https://www.ign.es/web/qsm-cnig">CNIG</a>, bajo <a href="http://creativecommons.org/licenses/by/4.0">CC BY 4.0</a>.'
CKANEXT__SPATIAL__COMMON_MAP__CUSTOM__URL=https://stamen-tiles-{s}.a.ssl.fastly.net/terrain/{z}/{x}/{y}.png
CKANEXT__SPATIAL__COMMON_MAP__ATTRIBUTION='Map tiles by <a href="http://stamen.com">Stamen Design</a> (<a href="http://creativecommons.org/licenses/by/3.0">CC BY 3.0</a>). Data by <a href="http://openstreetmap.org">OpenStreetMap</a> (<a href="http://creativecommons.org/licenses/by-sa/3.0">CC BY SA</a>)'
# ckanext-geoview
CKANEXT__GEOVIEW__GEOJSON__MAX_FILE_SIZE=100000000
@ -146,7 +149,7 @@ CKANEXT__GEOVIEW__SHP_VIEWER__ENCODING=UTF-8
# ckanext-scheming_dcat
## CSW Endpoint for spatial metadata
CKANEXT__SCHEMING_DCAT_GEOMETADATA_BASE_URI=http://localhost:81/csw
CKANEXT__SCHEMING_DCAT_GEOMETADATA_BASE_URI=${PYCSW_URL}
## Scheming: setup_scheming.sh
CKANEXT__SCHEMING_DCAT_DATASET_SCHEMA="ckanext.scheming_dcat:schemas/geodcatap/geodcatap_dataset.yaml"
CKANEXT__SCHEMING_DCAT_GROUP_SCHEMAS="ckanext.scheming_dcat:schemas/geodcatap/geodcatap_group.json"

View File

@ -137,14 +137,17 @@ CKANEXT__XLOADER__JOBS__DB_URI=postgresql://ckan:ckan@db/ckan
# ckanext-dcat
CKANEXT__DCAT__BASE_URI=http://localhost:81/catalog
CKANEXT__DCAT__RDF_PROFILES="euro_dcat_ap_2 euro_dcat_ap"
# Default profile(s). Instead of this envvar, it's possible to specify all the profile(s) availables to be used for serialization using the profiles parameter: http://localhost:5000/catalog.xml?profiles=euro_dcat_ap,spain_dcat
CKANEXT__DCAT__RDF_PROFILES='euro_dcat_ap_2'
# The custom endpoint **must** start with a forward slash (`/`) and contain the `{_format}` placeholder. The endpoint is added to the CKAN_SITE_URL and CKAN__ROOT_PATH, example: http://localhost:5000/catalog/catalog.rdf
CKANEXT__DCAT__DEFAULT_CATALOG_ENDPOINT='/catalog.{_format}'
# ckanext-spatial (Solr Backend - solr8-spatial)
CKANEXT__SPATIAL__SEARCH_BACKEND=solr-bbox
CKAN__SPATIAL__SRID=3857
CKANEXT__SPATIAL__COMMON_MAP__TYPE=custom
CKANEXT__SPATIAL__COMMON_MAP__CUSTOM__URL=https://rts.larioja.org/mapa-base/rioja/{z}/{x}/{y}.png
CKANEXT__SPATIAL__COMMON_MAP__ATTRIBUTION='Servicios de Teselas. <a href="https://www.ign.es/web/qsm-cnig">CNIG</a>, bajo <a href="http://creativecommons.org/licenses/by/4.0">CC BY 4.0</a>.'
CKANEXT__SPATIAL__COMMON_MAP__ATTRIBUTION='<a href="https://www.scne.es/">SCNE</a>, bajo <a href="http://creativecommons.org/licenses/by/4.0">CC BY 4.0</a>'
# ckanext-geoview
CKANEXT__GEOVIEW__GEOJSON__MAX_FILE_SIZE=100000000
@ -153,6 +156,8 @@ CKANEXT__GEOVIEW__SHP_VIEWER__SRID=3857
CKANEXT__GEOVIEW__SHP_VIEWER__ENCODING=UTF-8
# ckanext-scheming_dcat
## CSW Endpoint for spatial metadata
CKANEXT__SCHEMING_DCAT_GEOMETADATA_BASE_URI=${PYCSW_URL}
## Scheming: setup_scheming.sh
CKANEXT__SCHEMING_DCAT_DATASET_SCHEMA="ckanext.scheming_dcat:schemas/geodcatap_es/geodcatap_es_dataset.yaml"
CKANEXT__SCHEMING_DCAT_GROUP_SCHEMAS="ckanext.scheming_dcat:schemas/geodcatap_es/geodcatap_es_group.json"