Skip to content

Problems on PyCSW overwrite settings on view dispatch #14155

@cmotadev

Description

@cmotadev

Expected Behavior

Geonode's embedded PyCSW should accept changes in server behaviour, on modify PCSW setting:

geonode/geonode/settings.py

Lines 1207 to 1280 in a7950ec

PYCSW = {
# pycsw configuration
"CONFIGURATION": {
# uncomment / adjust to override server config system defaults
# 'server': {
# 'maxrecords': '10',
# 'pretty_print': 'true',
# 'federatedcatalogues': 'http://catalog.data.gov/csw'
# },
"server": {
"home": ".",
"url": CATALOGUE["default"]["URL"],
"encoding": "UTF-8",
"language": LANGUAGE_CODE if LANGUAGE_CODE in ("en", "fr", "el") else "en",
"maxrecords": "20",
"pretty_print": "true",
# 'domainquerytype': 'range',
"domaincounts": "true",
"profiles": "apiso,ebrim",
},
"manager": {
# authentication/authorization is handled by Django
"transactions": "false",
"allowed_ips": "*",
# 'csw_harvest_pagesize': '10',
},
"metadata": {
"inspire": {
"enabled": True,
"languages_supported": ["eng", "gre"],
"default_language": "eng",
"date": "YYYY-MM-DD",
"gemet_keywords": ["Utility and governmental services"],
"conformity_service": "notEvaluated",
"contact_name": "Organization Name",
"contact_email": "Email Address",
"temp_extent": {
"begin": "YYYY-MM-DD",
"end": "YYYY-MM-DD",
},
},
"identification": {
"title": "GeoNode Catalogue",
"description": "GeoNode is an open source platform"
" that facilitates the creation, sharing, and collaborative use"
" of geospatial data",
"keywords": ["sdi", "catalogue", "discovery", "metadata", "GeoNode"],
"keywords_type": "theme",
"fees": "None",
"accessconstraints": "None",
},
"provider": {
"name": "Organization Name",
"url": SITEURL,
},
"contact": {
"name": "Lastname, Firstname",
"position": "Position Title",
"address": "Mailing Address",
"city": "City",
"stateorprovince": "Administrative Area",
"postalcode": "Zip or Postal Code",
"country": "Country",
"phone": "+xx-xxx-xxx-xxxx",
"fax": "+xx-xxx-xxx-xxxx",
"email": "Email Address",
"url": "Contact URL",
"hours": "Hours of Service",
"instructions": "During hours of service. Off on " "weekends.",
"role": "pointOfContact",
},
},
}
}

Actual Behavior

When trying to add support for ISO 119115-3 for CSW requests, the geonode's embedded pycsw does't reflect changed made in PYCSW setting. This behaviour is observed even in a simple contact change

Steps to Reproduce the Problem

  1. Apply any change in PYCSW setting, e. g.: PYCSW["CONFIGURATION"]["server"]["profiles"] = "apiso,iso19115p3"
  2. Make a GetCapabilities request on PyCSW endpoint: http://localhost:8000/catalogue/csw?service=CSW&version=2.0.2&request=GetCapabilities
  3. Look for outputFormat's node to check if 'http://standards.iso.org/iso/19115/-3/mdb/2.0' is in children

Specifications

  • GeoNode version: 5.x
  • Installation type (vanilla, geonode-project): both
  • Installation method (manual, docker): dokcer
  • Platform: any
  • Additional details: A fix suggestion is to swap order between default CONFIGURATION and PYCSW["CONFIGURATION"], because the first argument in dict() should be the default, defined in geonode.catalogue.backends.pycsw_local. Look this code below, as an example:

mdict = dict(settings.PYCSW["CONFIGURATION"], **CONFIGURATION)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions