Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix bug ckanext-spatial shapely/numpy >2.0 and update CKAN configuration to includes vars to the metadata templates and update ckanext-schemingdcat #138

Merged
merged 2 commits into from
Jun 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Base
APP_DIR=/srv/app
# Sets Docker Compose project name to avoid resource conflicts between projects. Defaults to the folder name "ckan-docker" if not set.
#COMPOSE_PROJECT_NAME=ckan-docker-mytheme

# Host Ports
CKAN_PORT_HOST=5000
Expand Down Expand Up @@ -173,6 +175,7 @@ CKANEXT__SCHEMINGDCAT_ORGANIZATION_CUSTOM_FACETS=True
CKANEXT__SCHEMINGDCAT_GROUP_CUSTOM_FACETS=True
CKANEXT__SCHEMINGDCAT_DEFAULT_PACKAGE_ITEM_ICON="theme"
CKANEXT__SCHEMINGDCAT_DEFAULT_PACKAGE_ITEM_SHOW_SPATIAL=True
CKANEXT__SCHEMINGDCAT_SHOW_METADATA_TEMPLATES_TOOLBAR=False

# ckanext-pages
CKANEXT__PAGES__ALOW_HTML=False
Expand Down
2 changes: 1 addition & 1 deletion ckan/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
## PDFView - 0.0.8 ##
## Fluent - v1.0.1 (mjanez/Forked stable version) ##
## Scheming DCAT - v3.2.0 (mjanez/GeoDCAT-AP/NTI-RISP extended version) ##
RUN echo ${TZ} > /etc/timezone && \

Check warning on line 26 in ckan/Dockerfile

View workflow job for this annotation

GitHub Actions / runner/test-docker-pr:ckan-2.9.11

Pin versions in pip. Instead of `pip install <package>` use `pip install <package>==<version>` or `pip install --requirement <requirements file>`

Check failure on line 26 in ckan/Dockerfile

View workflow job for this annotation

GitHub Actions / runner/build-docker-push:ckan-2.9.11

DL3013 warning: Pin versions in pip. Instead of `pip install <package>` use `pip install <package>==<version>` or `pip install --requirement <requirements file>`

Check failure on line 26 in ckan/Dockerfile

View workflow job for this annotation

GitHub Actions / runner/build-docker-push:ckan-2.9.11

SC3013 warning: In POSIX sh, -ef is undefined.

Check failure on line 26 in ckan/Dockerfile

View workflow job for this annotation

GitHub Actions / manual/build-docker-push:ckan-2.9.11

DL3013 warning: Pin versions in pip. Instead of `pip install <package>` use `pip install <package>==<version>` or `pip install --requirement <requirements file>`

Check failure on line 26 in ckan/Dockerfile

View workflow job for this annotation

GitHub Actions / manual/build-docker-push:ckan-2.9.11

SC3013 warning: In POSIX sh, -ef is undefined.

Check failure on line 26 in ckan/Dockerfile

View workflow job for this annotation

GitHub Actions / manual/build-docker-push:ckan-2.9.11

DL3013 warning: Pin versions in pip. Instead of `pip install <package>` use `pip install <package>==<version>` or `pip install --requirement <requirements file>`

Check failure on line 26 in ckan/Dockerfile

View workflow job for this annotation

GitHub Actions / manual/build-docker-push:ckan-2.9.11

SC3013 warning: In POSIX sh, -ef is undefined.

Check failure on line 26 in ckan/Dockerfile

View workflow job for this annotation

GitHub Actions / manual/build-docker-push:ckan-2.9.11

DL3013 warning: Pin versions in pip. Instead of `pip install <package>` use `pip install <package>==<version>` or `pip install --requirement <requirements file>`

Check failure on line 26 in ckan/Dockerfile

View workflow job for this annotation

GitHub Actions / manual/build-docker-push:ckan-2.9.11

SC3013 warning: In POSIX sh, -ef is undefined.

Check failure on line 26 in ckan/Dockerfile

View workflow job for this annotation

GitHub Actions / manual/build-docker-push:ckan-2.9.11

DL3013 warning: Pin versions in pip. Instead of `pip install <package>` use `pip install <package>==<version>` or `pip install --requirement <requirements file>`

Check failure on line 26 in ckan/Dockerfile

View workflow job for this annotation

GitHub Actions / manual/build-docker-push:ckan-2.9.11

SC3013 warning: In POSIX sh, -ef is undefined.
if ! [ /usr/share/zoneinfo/${TZ} -ef /etc/localtime ]; then cp /usr/share/zoneinfo/${TZ} /etc/localtime; fi && \
# Remove apk cache
rm -rf /var/cache/apk/* && \
Expand All @@ -39,7 +39,7 @@
pip3 install --no-cache-dir -e git+https://github.com/ckan/[email protected]#egg=ckanext-geoview && \
echo "ckan/ckanext-spatial" && \
pip3 install --no-cache-dir -e git+https://github.com/ckan/[email protected]#egg=ckanext-spatial && \
pip3 install --no-cache-dir -r ${APP_DIR}/src/ckanext-spatial/requirements.txt && \
pip3 install --no-cache-dir -r ${APP_DIR}/req_fixes/ckanext-spatial/requirements.txt && \
echo "mjanez/ckanext-dcat (GeoDCAT-AP extended version)" && \
pip3 install --no-cache-dir -e git+https://github.com/mjanez/[email protected]#egg=ckanext-dcat && \
pip3 install --no-cache-dir -r ${APP_DIR}/src/ckanext-dcat/requirements.txt && \
Expand All @@ -66,7 +66,7 @@
# Apply any patches needed to CKAN core
COPY patches patches

RUN for d in $APP_DIR/patches/*; do \

Check warning on line 69 in ckan/Dockerfile

View workflow job for this annotation

GitHub Actions / runner/test-docker-pr:ckan-2.9.11

Use WORKDIR to switch to a directory

Check warning on line 69 in ckan/Dockerfile

View workflow job for this annotation

GitHub Actions / runner/test-docker-pr:ckan-2.9.11

Set the SHELL option -o pipefail before RUN with a pipe in it. If you are using /bin/sh in an alpine image or if your shell is symlinked to busybox then consider explicitly setting your SHELL to /bin/ash, or disable this check

Check failure on line 69 in ckan/Dockerfile

View workflow job for this annotation

GitHub Actions / runner/build-docker-push:ckan-2.9.11

DL3003 warning: Use WORKDIR to switch to a directory

Check failure on line 69 in ckan/Dockerfile

View workflow job for this annotation

GitHub Actions / runner/build-docker-push:ckan-2.9.11

DL4006 warning: Set the SHELL option -o pipefail before RUN with a pipe in it. If you are using /bin/sh in an alpine image or if your shell is symlinked to busybox then consider explicitly setting your SHELL to /bin/ash, or disable this check

Check failure on line 69 in ckan/Dockerfile

View workflow job for this annotation

GitHub Actions / runner/build-docker-push:ckan-2.9.11

SC2086 info: Double quote to prevent globbing and word splitting.

Check failure on line 69 in ckan/Dockerfile

View workflow job for this annotation

GitHub Actions / manual/build-docker-push:ckan-2.9.11

DL3003 warning: Use WORKDIR to switch to a directory

Check failure on line 69 in ckan/Dockerfile

View workflow job for this annotation

GitHub Actions / manual/build-docker-push:ckan-2.9.11

DL4006 warning: Set the SHELL option -o pipefail before RUN with a pipe in it. If you are using /bin/sh in an alpine image or if your shell is symlinked to busybox then consider explicitly setting your SHELL to /bin/ash, or disable this check

Check failure on line 69 in ckan/Dockerfile

View workflow job for this annotation

GitHub Actions / manual/build-docker-push:ckan-2.9.11

SC2086 info: Double quote to prevent globbing and word splitting.

Check failure on line 69 in ckan/Dockerfile

View workflow job for this annotation

GitHub Actions / manual/build-docker-push:ckan-2.9.11

DL3003 warning: Use WORKDIR to switch to a directory

Check failure on line 69 in ckan/Dockerfile

View workflow job for this annotation

GitHub Actions / manual/build-docker-push:ckan-2.9.11

DL4006 warning: Set the SHELL option -o pipefail before RUN with a pipe in it. If you are using /bin/sh in an alpine image or if your shell is symlinked to busybox then consider explicitly setting your SHELL to /bin/ash, or disable this check

Check failure on line 69 in ckan/Dockerfile

View workflow job for this annotation

GitHub Actions / manual/build-docker-push:ckan-2.9.11

SC2086 info: Double quote to prevent globbing and word splitting.

Check failure on line 69 in ckan/Dockerfile

View workflow job for this annotation

GitHub Actions / manual/build-docker-push:ckan-2.9.11

DL3003 warning: Use WORKDIR to switch to a directory

Check failure on line 69 in ckan/Dockerfile

View workflow job for this annotation

GitHub Actions / manual/build-docker-push:ckan-2.9.11

DL4006 warning: Set the SHELL option -o pipefail before RUN with a pipe in it. If you are using /bin/sh in an alpine image or if your shell is symlinked to busybox then consider explicitly setting your SHELL to /bin/ash, or disable this check

Check failure on line 69 in ckan/Dockerfile

View workflow job for this annotation

GitHub Actions / manual/build-docker-push:ckan-2.9.11

SC2086 info: Double quote to prevent globbing and word splitting.

Check failure on line 69 in ckan/Dockerfile

View workflow job for this annotation

GitHub Actions / manual/build-docker-push:ckan-2.9.11

DL3003 warning: Use WORKDIR to switch to a directory

Check failure on line 69 in ckan/Dockerfile

View workflow job for this annotation

GitHub Actions / manual/build-docker-push:ckan-2.9.11

DL4006 warning: Set the SHELL option -o pipefail before RUN with a pipe in it. If you are using /bin/sh in an alpine image or if your shell is symlinked to busybox then consider explicitly setting your SHELL to /bin/ash, or disable this check

Check failure on line 69 in ckan/Dockerfile

View workflow job for this annotation

GitHub Actions / manual/build-docker-push:ckan-2.9.11

SC2086 info: Double quote to prevent globbing and word splitting.
if [ -d $d ]; then \
for f in `ls $d/*.patch | sort -g`; do \
cd $SRC_DIR/`basename "$d"` && \
Expand Down
3 changes: 2 additions & 1 deletion ckan/docker-entrypoint.d/02_setup_scheming.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ ckan config-tool $CKAN_INI \
"schemingdcat.group_custom_facets=$CKANEXT__SCHEMINGDCAT_GROUP_CUSTOM_FACETS" \
"schemingdcat.geometadata_base_uri=$CKANEXT__SCHEMINGDCAT_GEOMETADATA_BASE_URI" \
"schemingdcat.default_package_item_icon=$CKANEXT__SCHEMINGDCAT_DEFAULT_PACKAGE_ITEM_ICON" \
"schemingdcat.default_package_item_show_spatial=$CKANEXT__SCHEMINGDCAT_DEFAULT_PACKAGE_ITEM_SHOW_SPATIAL"
"schemingdcat.default_package_item_show_spatial=$CKANEXT__SCHEMINGDCAT_DEFAULT_PACKAGE_ITEM_SHOW_SPATIAL" \
"schemingdcat.show_metadata_templates_toolbar=$CKANEXT__SCHEMINGDCAT_SHOW_METADATA_TEMPLATES_TOOLBAR"

echo "[docker-entrypoint.02_setup_scheming] Rebuild index"
ckan -c $CKAN_INI search-index rebuild
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ cython==0.29.36; python_version < '3.9'
pyproj==2.6.1; python_version < '3.9'
pyproj==3.6.1; python_version >= '3.9'

Shapely==2.0.1
# Compatibility with NumPy 2.0: https://github.com/shapely/shapely/issues/1972
numpy>=1.26,<2
Shapely==2.0.4

OWSLib==0.28.1
geojson==3.0.1
geojson==3.0.1
Loading