Skip to content

Commit

Permalink
Merge pull request #44 from zalf-rdm/merge_4.2.2
Browse files Browse the repository at this point in the history
4.2.2
  • Loading branch information
mwallschlaeger authored Mar 12, 2024
2 parents 3c1a5bf + 6f7108b commit 45b27bf
Show file tree
Hide file tree
Showing 84 changed files with 494 additions and 715 deletions.
5 changes: 4 additions & 1 deletion .env.sample
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ OGC_REQUEST_POOL_CONNECTIONS=10
# Java Options & Memory
ENABLE_JSONP=true
outFormat=text/javascript
GEOSERVER_JAVA_OPTS='-Djava.awt.headless=true -Xms4G -Xmx4G -Dgwc.context.suffix=gwc -XX:+UnlockDiagnosticVMOptions -XX:+LogVMOutput -XX:LogFile=/var/log/jvm.log -XX:PerfDataSamplingInterval=500 -XX:SoftRefLRUPolicyMSPerMB=36000 -XX:-UseGCOverheadLimit -XX:ParallelGCThreads=4 -Dfile.encoding=UTF8 -Djavax.servlet.request.encoding=UTF-8 -Djavax.servlet.response.encoding=UTF-8 -Duser.timezone=GMT -Dorg.geotools.shapefile.datetime=false -DGS-SHAPEFILE-CHARSET=UTF-8 -DGEOSERVER_CSRF_DISABLED=true -DPRINT_BASE_URL={geoserver_ui}/geoserver/pdf -DALLOW_ENV_PARAMETRIZATION=true -Xbootclasspath/a:/usr/local/tomcat/webapps/geoserver/WEB-INF/lib/marlin-0.9.3-Unsafe.jar -Dsun.java2d.renderer=org.marlin.pisces.MarlinRenderingEngine'
GEOSERVER_JAVA_OPTS=-Djava.awt.headless=true -Xms4G -Xmx4G -Dgwc.context.suffix=gwc -XX:+UnlockDiagnosticVMOptions -XX:+LogVMOutput -XX:LogFile=/var/log/jvm.log -XX:PerfDataSamplingInterval=500 -XX:SoftRefLRUPolicyMSPerMB=36000 -XX:-UseGCOverheadLimit -XX:ParallelGCThreads=4 -Dfile.encoding=UTF8 -Djavax.servlet.request.encoding=UTF-8 -Djavax.servlet.response.encoding=UTF-8 -Duser.timezone=GMT -Dorg.geotools.shapefile.datetime=false -DGS-SHAPEFILE-CHARSET=UTF-8 -DGEOSERVER_CSRF_DISABLED=true -DPRINT_BASE_URL={siteurl}/geoserver/pdf -DALLOW_ENV_PARAMETRIZATION=true -Xbootclasspath/a:/usr/local/tomcat/webapps/geoserver/WEB-INF/lib/marlin-0.9.3-Unsafe.jar -Dsun.java2d.renderer=org.marlin.pisces.MarlinRenderingEngine

# #################
# Security
Expand Down Expand Up @@ -151,6 +151,7 @@ ACCOUNT_EMAIL_CONFIRMATION_EMAIL=False
ACCOUNT_EMAIL_CONFIRMATION_REQUIRED=False
ACCOUNT_AUTHENTICATION_METHOD=username_email
AUTO_ASSIGN_REGISTERED_MEMBERS_TO_REGISTERED_MEMBERS_GROUP_NAME=True
AUTO_ASSIGN_REGISTERED_MEMBERS_TO_CONTRIBUTORS=True

# OAuth2
OAUTH2_API_KEY=
Expand Down Expand Up @@ -252,3 +253,5 @@ RESTART_POLICY_WINDOW=120s

DEFAULT_MAX_UPLOAD_SIZE=5368709120
DEFAULT_MAX_PARALLEL_UPLOADS_PER_USER=5

# FORCE_READ_ONLY_MODE=False Override the read-only value saved in the configuration
1 change: 1 addition & 0 deletions .env_dev
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ ACCOUNT_EMAIL_CONFIRMATION_EMAIL=False
ACCOUNT_EMAIL_CONFIRMATION_REQUIRED=False
ACCOUNT_AUTHENTICATION_METHOD=username_email
AUTO_ASSIGN_REGISTERED_MEMBERS_TO_REGISTERED_MEMBERS_GROUP_NAME=True
AUTO_ASSIGN_REGISTERED_MEMBERS_TO_CONTRIBUTORS=True

# OAuth2
OAUTH2_API_KEY=
Expand Down
1 change: 1 addition & 0 deletions .env_local
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ ACCOUNT_EMAIL_CONFIRMATION_EMAIL=False
ACCOUNT_EMAIL_CONFIRMATION_REQUIRED=False
ACCOUNT_AUTHENTICATION_METHOD=username_email
AUTO_ASSIGN_REGISTERED_MEMBERS_TO_REGISTERED_MEMBERS_GROUP_NAME=True
AUTO_ASSIGN_REGISTERED_MEMBERS_TO_CONTRIBUTORS=True

# OAuth2
OAUTH2_API_KEY=
Expand Down
1 change: 1 addition & 0 deletions .env_test
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ ACCOUNT_EMAIL_CONFIRMATION_EMAIL=False
ACCOUNT_EMAIL_CONFIRMATION_REQUIRED=False
ACCOUNT_AUTHENTICATION_METHOD=username_email
AUTO_ASSIGN_REGISTERED_MEMBERS_TO_REGISTERED_MEMBERS_GROUP_NAME=True
AUTO_ASSIGN_REGISTERED_MEMBERS_TO_CONTRIBUTORS=True

# OAuth2
OAUTH2_API_KEY=
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/flake8.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
python-version: ${{matrix.python-version}}

- name: Install flake8 & black
run: pip install flake8 black
run: pip install --upgrade $(grep 'flake8\|black' requirements.txt)

- name: "Check: flake8"
run: |
Expand Down
6 changes: 2 additions & 4 deletions create-envfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,7 @@ def _get_vals_to_replace(args):
_vals_to_replace["letsencrypt_mode"] = (
"disabled"
if not _vals_to_replace.get("https_host")
else "staging"
if _jsfile.get("env_type", args.env_type) in ["test"]
else "production"
else "staging" if _jsfile.get("env_type", args.env_type) in ["test"] else "production"
)
_vals_to_replace["debug"] = False if _jsfile.get("env_type", args.env_type) in ["prod", "test"] else True
_vals_to_replace["email"] = _jsfile.get("email", args.email)
Expand Down Expand Up @@ -124,7 +122,7 @@ def _get_vals_to_replace(args):
prog="ENV file builder",
description="Tool for generate environment file automatically. The information can be passed or via CLI or via JSON file ( --file /path/env.json)",
usage="python create-envfile.py localhost -f /path/to/json/file.json",
allow_abbrev=False
allow_abbrev=False,
)
parser.add_argument(
"--noinput",
Expand Down
12 changes: 5 additions & 7 deletions docker-compose-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,7 @@ services:

# Nginx is serving django static and media files and proxies to django and geonode
geonode:
image: geonode/nginx:1.25.1
build: ./scripts/docker/nginx/
image: geonode/nginx:1.25.3-v1
container_name: nginx4${COMPOSE_PROJECT_NAME}
env_file:
- .env
Expand All @@ -70,8 +69,7 @@ services:

# Gets and installs letsencrypt certificates
letsencrypt:
image: geonode/letsencrypt:latest
build: ./scripts/docker/letsencrypt/
image: geonode/letsencrypt:2.6.0-v1
container_name: letsencrypt4${COMPOSE_PROJECT_NAME}
env_file:
- .env
Expand All @@ -81,7 +79,7 @@ services:

# Geoserver backend
geoserver:
image: geonode/geoserver:2.23.0
image: geonode/geoserver:2.23.3-v2
container_name: geoserver4${COMPOSE_PROJECT_NAME}
healthcheck:
test: "curl -m 10 --fail --silent --write-out 'HTTP CODE : %{http_code}\n' --output /dev/null http://geoserver:8080/geoserver/ows"
Expand All @@ -107,7 +105,7 @@ services:
condition: service_healthy

data-dir-conf:
image: geonode/geoserver_data:2.23.0
image: geonode/geoserver_data:2.23.3-v1
container_name: gsconf4${COMPOSE_PROJECT_NAME}
entrypoint: sleep infinity
volumes:
Expand All @@ -119,7 +117,7 @@ services:
# PostGIS database.
db:
# use geonode official postgis 15 image
image: geonode/postgis:15
image: geonode/postgis:15.3-v1
command: postgres -c "max_connections=${POSTGRESQL_MAX_CONNECTIONS}"
container_name: db4${COMPOSE_PROJECT_NAME}
env_file:
Expand Down
4 changes: 2 additions & 2 deletions docker-compose-geoserver-server.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: '2.2'
services:

data-dir-conf:
image: geonode/geoserver_data:2.23.0
image: geonode/geoserver_data:latest
restart: on-failure
container_name: gsconf4${COMPOSE_PROJECT_NAME}
labels:
Expand All @@ -13,7 +13,7 @@ services:
- geoserver-data-dir:/geoserver_data/data

geoserver:
image: geonode/geoserver:2.23.0
image: geonode/geoserver:latest
restart: unless-stopped
container_name: geoserver4${COMPOSE_PROJECT_NAME}
stdin_open: true
Expand Down
14 changes: 6 additions & 8 deletions docker-compose-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ version: '3.9'
# Common Django template for GeoNode and Celery services below
x-common-django:
&default-common-django
image: geonode/geonode:latest-ubuntu-22.04
image: geonode/geonode:local
restart: unless-stopped
env_file:
- .env_test
Expand Down Expand Up @@ -52,8 +52,7 @@ services:

# Nginx is serving django static and media files and proxies to django and geonode
geonode:
image: geonode/nginx:1.25.1
build: ./scripts/docker/nginx/
image: geonode/nginx:1.25.3-v1
container_name: nginx4${COMPOSE_PROJECT_NAME}
env_file:
- .env_test
Expand Down Expand Up @@ -83,8 +82,7 @@ services:

# Gets and installs letsencrypt certificates
letsencrypt:
image: geonode/letsencrypt:latest
build: ./scripts/docker/letsencrypt/
image: geonode/letsencrypt:2.6.0-v1
container_name: letsencrypt4${COMPOSE_PROJECT_NAME}
env_file:
- .env_test
Expand All @@ -94,7 +92,7 @@ services:

# Geoserver backend
geoserver:
image: geonode/geoserver:2.23.0
image: geonode/geoserver:2.23.3-v2
container_name: geoserver4${COMPOSE_PROJECT_NAME}
healthcheck:
test: "curl -m 10 --fail --silent --write-out 'HTTP CODE : %{http_code}\n' --output /dev/null http://geoserver:8080/geoserver/ows"
Expand All @@ -120,7 +118,7 @@ services:
condition: service_healthy

data-dir-conf:
image: geonode/geoserver_data:2.23.0
image: geonode/geoserver_data:2.23.3-v1
container_name: gsconf4${COMPOSE_PROJECT_NAME}
entrypoint: sleep infinity
volumes:
Expand All @@ -132,7 +130,7 @@ services:
# PostGIS database.
db:
# use geonode official postgis 15 image
image: geonode/postgis:15
image: geonode/postgis:15.3-v1
command: postgres -c "max_connections=${POSTGRESQL_MAX_CONNECTIONS}"
container_name: db4${COMPOSE_PROJECT_NAME}
env_file:
Expand Down
17 changes: 9 additions & 8 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ version: '3.9'
# Common Django template for GeoNode and Celery services below
x-common-django:
&default-common-django
image: geonode/geonode:latest-ubuntu-22.04
image: geonode/geonode:4.2.x
restart: unless-stopped
env_file:
- .env
Expand All @@ -22,6 +22,9 @@ services:
# Our custom django application. It includes Geonode.
django:
<< : *default-common-django
build:
context: ./
dockerfile: Dockerfile
container_name: django4${COMPOSE_PROJECT_NAME}
healthcheck:
test: "curl -m 10 --fail --silent --write-out 'HTTP CODE : %{http_code}\n' --output /dev/null http://django:8000/"
Expand Down Expand Up @@ -61,8 +64,7 @@ services:

# Nginx is serving django static and media files and proxies to django and geonode
geonode:
image: geonode/nginx:1.25.1
build: ./scripts/docker/nginx/
image: geonode/nginx:1.25.3-v1
container_name: nginx4${COMPOSE_PROJECT_NAME}
env_file:
- .env
Expand All @@ -79,8 +81,7 @@ services:

# Gets and installs letsencrypt certificates
letsencrypt:
image: geonode/letsencrypt:latest
build: ./scripts/docker/letsencrypt/
image: geonode/letsencrypt:2.6.0-v1
container_name: letsencrypt4${COMPOSE_PROJECT_NAME}
env_file:
- .env
Expand All @@ -90,7 +91,7 @@ services:

# Geoserver backend
geoserver:
image: geonode/geoserver:2.23.0
image: geonode/geoserver:2.23.3-v2
container_name: geoserver4${COMPOSE_PROJECT_NAME}
healthcheck:
test: "curl -m 10 --fail --silent --write-out 'HTTP CODE : %{http_code}\n' --output /dev/null http://geoserver:8080/geoserver/ows"
Expand All @@ -116,7 +117,7 @@ services:
condition: service_healthy

data-dir-conf:
image: geonode/geoserver_data:2.23.0
image: geonode/geoserver_data:2.23.3-v1
container_name: gsconf4${COMPOSE_PROJECT_NAME}
entrypoint: sleep infinity
volumes:
Expand All @@ -128,7 +129,7 @@ services:
# PostGIS database.
db:
# use geonode official postgis 15 image
image: geonode/postgis:15
image: geonode/postgis:15.3-v1
command: postgres -c "max_connections=${POSTGRESQL_MAX_CONNECTIONS}"
container_name: db4${COMPOSE_PROJECT_NAME}
env_file:
Expand Down
2 changes: 1 addition & 1 deletion geonode/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

import os

__version__ = (4, 2, 0, "dev", 0)
__version__ = (4, 2, 2, "final", 0)


default_app_config = "geonode.apps.AppConfig"
Expand Down
6 changes: 0 additions & 6 deletions geonode/api/resourcebase_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -593,7 +593,6 @@ def hydrate_title(self, bundle):


class ResourceBaseResource(CommonModelApi):

"""ResourceBase api"""

class Meta(CommonMetaApi):
Expand All @@ -607,7 +606,6 @@ class Meta(CommonMetaApi):


class FeaturedResourceBaseResource(CommonModelApi):

"""Only the featured resourcebases"""

class Meta(CommonMetaApi):
Expand All @@ -620,7 +618,6 @@ class Meta(CommonMetaApi):


class LayerResource(CommonModelApi):

"""Dataset API"""

links = fields.ListField(attribute="links", null=True, use_in="all", default=[])
Expand Down Expand Up @@ -756,7 +753,6 @@ class Meta(CommonMetaApi):


class MapResource(CommonModelApi):

"""Maps API"""

def build_filters(self, filters=None, ignore_bad_filters=False, **kwargs):
Expand Down Expand Up @@ -822,7 +818,6 @@ class Meta(CommonMetaApi):


class GeoAppResource(CommonModelApi):

"""GeoApps API"""

def format_objects(self, objects):
Expand Down Expand Up @@ -874,7 +869,6 @@ class Meta(CommonMetaApi):


class DocumentResource(CommonModelApi):

"""Documents API"""

def build_filters(self, filters=None, ignore_bad_filters=False, **kwargs):
Expand Down
1 change: 0 additions & 1 deletion geonode/api/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,6 @@ def test_tags_lockdown(self):


class SearchApiTests(ResourceTestCaseMixin, GeoNodeBaseTestSupport):

"""Test the search"""

# loading test thesausuri and initial data
Expand Down
5 changes: 0 additions & 5 deletions geonode/base/api/permissions.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@


class IsSelf(permissions.BasePermission):

"""Grant permission only if the current instance is the request user.
Used to allow users to edit their own account, nothing to others (even
superusers).
Expand All @@ -62,7 +61,6 @@ def has_object_permission(self, request, view, obj):


class IsSelfOrReadOnly(IsSelf):

"""Grant permissions if instance *IS* the request user, or read-only.
Used to allow users to edit their own account, and others to read.
"""
Expand All @@ -75,7 +73,6 @@ def has_object_permission(self, request, view, obj):


class IsSelfOrAdmin(IsSelf):

"""Grant R/W to self and superusers/staff members. Deny others."""

def has_permission(self, request, view):
Expand All @@ -94,7 +91,6 @@ def has_object_permission(self, request, view, obj):


class IsSelfOrAdminOrReadOnly(IsSelfOrAdmin):

"""Grant R/W to self and superusers/staff members, R/O to others."""

def has_permission(self, request, view):
Expand All @@ -111,7 +107,6 @@ def has_object_permission(self, request, view, obj):


class IsSelfOrAdminOrAuthenticatedReadOnly(IsSelfOrAdmin):

"""Grant R/W to self and superusers/staff members, R/O to auth."""

def has_object_permission(self, request, view, obj):
Expand Down
2 changes: 1 addition & 1 deletion geonode/base/api/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -784,7 +784,7 @@ class Meta:
"is_copyable",
"blob",
"metadata",
"executions"
"executions",
# TODO
# csw_typename, csw_schema, csw_mdsource, csw_insert_date, csw_type, csw_anytext, csw_wkt_geometry,
# metadata_uploaded, metadata_uploaded_preserve, metadata_xml,
Expand Down
1 change: 0 additions & 1 deletion geonode/base/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,6 @@ def build_attrs(self, base_attrs=None, extra_attrs=None, **kwargs):


class ResourceBaseForm(TranslationModelForm, LinkedResourceForm):

"""Base form for metadata, should be inherited by childres classes of ResourceBase"""

abstract = forms.CharField(label=_("Abstract"), required=False, widget=TinyMCE())
Expand Down
Loading

0 comments on commit 45b27bf

Please sign in to comment.