Skip to content

Commit

Permalink
Added all contacts to the DataCite metadata with pycsw upgrade. (#11)
Browse files Browse the repository at this point in the history
Co-authored-by: Henning Bredel <[email protected]>
ahmdthr and ridoo authored Nov 28, 2024
1 parent ecc576c commit cc8b918
Showing 16 changed files with 281 additions and 277 deletions.
229 changes: 76 additions & 153 deletions .env.sample
Original file line number Diff line number Diff line change
@@ -1,156 +1,79 @@
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
build:
context: ./
dockerfile: Dockerfile
restart: unless-stopped
env_file:
- .env
volumes:
- statics:/mnt/volumes/statics
- geoserver-data-dir:/geoserver_data/data
- backup-restore:/backup_restore
- data:/data
- tmp:/tmp
depends_on:
db:
condition: service_healthy

services:

# Our custom django application. It includes Geonode.
django:
<< : *default-common-django
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/"
start_period: 60s
interval: 60s
timeout: 10s
retries: 2
environment:
- IS_CELERY=False
entrypoint: ["/usr/src/geonode/entrypoint.sh"]
command: "uwsgi --ini /usr/src/geonode/uwsgi.ini"

# Celery worker that executes celery tasks created by Django.
celery:
<< : *default-common-django
container_name: celery4${COMPOSE_PROJECT_NAME}
depends_on:
django:
condition: service_healthy
environment:
- IS_CELERY=True
entrypoint: ["/usr/src/geonode/entrypoint.sh"]
command: "celery-cmd"

# memcached service
memcached:
image: memcached:alpine
container_name: memcached4${COMPOSE_PROJECT_NAME}
command: memcached ${MEMCACHED_OPTIONS}
restart: on-failure
healthcheck:
test: nc -z 127.0.0.1 11211
interval: 30s
timeout: 30s
retries: 5
start_period: 30s

# Nginx is serving django static and media files and proxies to django and geonode
geonode:
image: geonode/nginx:1.25.3-latest
container_name: nginx4${COMPOSE_PROJECT_NAME}
env_file:
- .env
environment:
- RESOLVER=127.0.0.11
ports:
- "${HTTP_PORT}:80"
- "${HTTPS_PORT}:443"
volumes:
- nginx-confd:/etc/nginx
- nginx-certificates:/geonode-certificates
- statics:/mnt/volumes/statics
restart: unless-stopped

# Gets and installs letsencrypt certificates
letsencrypt:
image: geonode/letsencrypt:2.6.0-latest
container_name: letsencrypt4${COMPOSE_PROJECT_NAME}
env_file:
- .env
volumes:
- nginx-certificates:/geonode-certificates
restart: unless-stopped

# Geoserver backend
geoserver:
image: geonode/geoserver:2.24.3-latest
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"
start_period: 60s
interval: 60s
timeout: 10s
retries: 2
env_file:
- .env
ports:
- "8080:8080"
volumes:
- statics:/mnt/volumes/statics
- geoserver-data-dir:/geoserver_data/data
- backup-restore:/backup_restore
- data:/data
- tmp:/tmp
restart: unless-stopped
depends_on:
data-dir-conf:
condition: service_healthy
django:
condition: service_healthy

data-dir-conf:
image: geonode/geoserver_data:2.24.3-latest
container_name: gsconf4${COMPOSE_PROJECT_NAME}
entrypoint: sleep infinity
volumes:
- geoserver-data-dir:/geoserver_data/data
restart: unless-stopped
healthcheck:
test: "ls -A '/geoserver_data/data' | wc -l"

# PostGIS database.
db:
# use geonode official postgis 15 image
image: geonode/postgis:15.3-latest
command: postgres -c "max_connections=${POSTGRESQL_MAX_CONNECTIONS}"
container_name: db4${COMPOSE_PROJECT_NAME}
env_file:
- .env
volumes:
- dbdata:/var/lib/postgresql/data
- dbbackups:/pg_backups
restart: unless-stopped
healthcheck:
test: "pg_isready -d postgres -U postgres"
# uncomment to enable remote connections to postgres
#ports:
# - "5432:5432"

# Vanilla RabbitMQ service. This is needed by celery
rabbitmq:
image: rabbitmq:3-alpine
container_name: rabbitmq4${COMPOSE_PROJECT_NAME}
volumes:
- rabbitmq:/var/lib/rabbitmq
restart: unless-stopped
COMPOSE_PROJECT_NAME=geonode
# See https://github.com/containers/podman/issues/13889
# DOCKER_BUILDKIT=0
DOCKER_ENV=production
# See https://github.com/geosolutions-it/geonode-generic/issues/28
# to see why we force API version to 1.24
DOCKER_API_VERSION="1.24"
BACKUPS_VOLUME_DRIVER=local

C_FORCE_ROOT=1
FORCE_REINIT=false
INVOKE_LOG_STDOUT=true

# LANGUAGE_CODE=it-it
# LANGUAGES=(('en-us','English'),('it-it','Italiano'))

DJANGO_SETTINGS_MODULE=geonode.settings
GEONODE_INSTANCE_NAME=geonode

# #################
# backend
# #################
POSTGRES_USER=postgres
POSTGRES_PASSWORD={pgpwd}
GEONODE_DATABASE=geonode
GEONODE_DATABASE_USER=geonode
GEONODE_DATABASE_PASSWORD={dbpwd}
GEONODE_GEODATABASE=geonode_data
GEONODE_GEODATABASE_USER=geonode_data
GEONODE_GEODATABASE_PASSWORD={geodbpwd}
GEONODE_DATABASE_SCHEMA=public
GEONODE_GEODATABASE_SCHEMA=public
DATABASE_HOST=db
DATABASE_PORT=5432
DATABASE_URL=postgis://geonode:{dbpwd}@db:5432/geonode
GEODATABASE_URL=postgis://geonode_data:{geodbpwd}@db:5432/geonode_data
GEONODE_DB_CONN_MAX_AGE=0
GEONODE_DB_CONN_TOUT=5
DEFAULT_BACKEND_DATASTORE=datastore
BROKER_URL=amqp://guest:guest@rabbitmq:5672/
CELERY_BEAT_SCHEDULER=celery.beat:PersistentScheduler
ASYNC_SIGNALS=True

SITEURL={siteurl}/

ALLOWED_HOSTS="['django', '{hostname}']"

# Data Uploader
DEFAULT_BACKEND_UPLOADER=geonode.importer
TIME_ENABLED=True
MOSAIC_ENABLED=False

# #################
# nginx
# HTTPD Server
# #################
GEONODE_LB_HOST_IP=django
GEONODE_LB_PORT=8000
NGINX_BASE_URL={siteurl}

# IP or domain name and port where the server can be reached on HTTPS (leave HOST empty if you want to use HTTP only)
# port where the server can be reached on HTTPS
HTTP_HOST={http_host}
HTTPS_HOST={https_host}

HTTP_PORT=80
HTTPS_PORT=443

# Let's Encrypt certificates for https encryption. You must have a domain name as HTTPS_HOST (doesn't work
# with an ip) and it must be reachable from the outside. This can be one of the following :
# disabled : we do not get a certificate at all (a placeholder certificate will be used)
# staging : we get staging certificates (are invalid, but allow to test the process completely and have much higher limit rates)
# production : we get a normal certificate (default)
LETSENCRYPT_MODE={letsencrypt_mode}
# LETSENCRYPT_MODE=staging
# LETSENCRYPT_MODE=production

RESOLVER=127.0.0.11

4 changes: 2 additions & 2 deletions docker-compose-dev.yml
Original file line number Diff line number Diff line change
@@ -79,7 +79,7 @@ services:

# Geoserver backend
geoserver:
image: geonode/geoserver:2.24.4-v1
image: geonode/geoserver:2.24.3-latest
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"
@@ -105,7 +105,7 @@ services:
condition: service_healthy

data-dir-conf:
image: geonode/geoserver_data:2.24.4-v1
image: geonode/geoserver_data:2.24.3-latest
container_name: gsconf4${COMPOSE_PROJECT_NAME}
entrypoint: sleep infinity
volumes:
6 changes: 3 additions & 3 deletions docker-compose-test.yml
Original file line number Diff line number Diff line change
@@ -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:4.3.0
image: geonode/geonode:latest-ubuntu-22.04
build:
context: ./
dockerfile: Dockerfile
@@ -92,7 +92,7 @@ services:

# Geoserver backend
geoserver:
image: geonode/geoserver:2.24.4-v1
image: geonode/geoserver:2.24.3-latest
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"
@@ -118,7 +118,7 @@ services:
condition: service_healthy

data-dir-conf:
image: geonode/geoserver_data:2.24.4-v1
image: geonode/geoserver_data:2.24.3-latest
container_name: gsconf4${COMPOSE_PROJECT_NAME}
entrypoint: sleep infinity
volumes:
22 changes: 21 additions & 1 deletion geonode/base/models.py
Original file line number Diff line number Diff line change
@@ -22,6 +22,7 @@
import html
import math
import uuid
import json
import logging
import traceback
from typing import List, Optional, Union, Tuple
@@ -82,7 +83,7 @@

from geonode.notifications_helper import send_notification, get_notification_recipients
from geonode.people import Roles
from geonode.people.enumerations import ROLE_VALUES
from geonode.people.enumerations import ROLE_VALUES, GMD_ROLE_LABEL_MAPPING

from urllib.parse import urlsplit, urljoin
from geonode.storage.manager import storage_manager
@@ -1455,6 +1456,25 @@ def download_links(self):
links.append((self.title, description, _link_type, link.url))
return links

def pycsw_contacts(self):
"""assemble contacts for pycsw"""
site_url = settings.SITEURL.rstrip("/") if settings.SITEURL.startswith("http") else settings.SITEURL
contact_roles = self.get_defined_multivalue_contact_roles()
if self.owner:
contact_roles["Owner"] = [self.owner]
contacts = []
for cont_lbl, cont_vals in contact_roles.items():
for cont in cont_vals:
contacts.append(
{
"individualname": cont.full_name_or_nick,
"organization": cont.organization,
"role": GMD_ROLE_LABEL_MAPPING[cont_lbl],
"url": urljoin(site_url, cont.get_absolute_url()),
}
)
return json.dumps(contacts)

@property
def embed_url(self):
return (
5 changes: 3 additions & 2 deletions geonode/catalogue/backends/pycsw_local.py
Original file line number Diff line number Diff line change
@@ -52,20 +52,21 @@
"pretty_print": "true",
"domainquerytype": "range",
"domaincounts": "true",
"profiles": "apiso,ebrim",
},
"profiles": {"apiso", "ebrim"},
"repository": {
"source": "geonode.catalogue.backends.pycsw_plugin.GeoNodeRepository",
"filter": "uuid IS NOT NULL",
"mappings": os.path.join(os.path.dirname(__file__), "pycsw_local_mappings.py"),
},
"logging": {"level": "ERROR"},
}


class CatalogueBackend(GenericCatalogueBackend):
def __init__(self, *args, **kwargs):
GenericCatalogueBackend.__init__(CatalogueBackend, self, *args, **kwargs)
self.catalogue.formats = ["Atom", "DataCite", "DIF", "Dublin Core", "ebRIM", "FGDC", "ISO"]
self.catalogue.formats = ["Atom", "DIF", "Dublin Core", "ebRIM", "FGDC", "ISO"]
self.catalogue.local = True

def remove_record(self, uuid):
6 changes: 4 additions & 2 deletions geonode/catalogue/backends/pycsw_local_mappings.py
Original file line number Diff line number Diff line change
@@ -28,6 +28,8 @@
"pycsw:MdSource": "csw_mdsource",
"pycsw:InsertDate": "csw_insert_date",
"pycsw:XML": "metadata_xml",
"pycsw:Metadata": "metadata",
"pycsw:MetadataType": "metadata_type",
"pycsw:AnyText": "csw_anytext",
"pycsw:Language": "language",
"pycsw:Title": "title",
@@ -37,8 +39,8 @@
"pycsw:SensorType": "sensortype",
"pycsw:CloudCover": "cloudcover",
"pycsw:Bands": "bands",
"pycsw:Themes": "themes",
"pycsw:Contacts": "contacts",
"pycsw:Themes": "csw_themes",
"pycsw:Contacts": "pycsw_contacts",
"pycsw:Abstract": "raw_abstract",
"pycsw:Keywords": "keyword_csv",
"pycsw:KeywordType": "keywordstype",
2 changes: 1 addition & 1 deletion geonode/catalogue/tests.py
Original file line number Diff line number Diff line change
@@ -111,7 +111,7 @@ def test_given_a_request_for_multiple_dataset_should_return_multiple_value_in_xm
request = self.__request_factory_multiple()
response = csw_global_dispatch(request, self.dataset_filter_multiple)
root = ET.fromstring(response.content)
actual = root.find("{http://www.opengis.net/cat/csw/2.0.2}SearchResults").attrib["numberOfRecordsReturned"]
actual = root.find("{http://www.opengis.net/cat/csw/2.0.2}SearchResults").attrib["numberOfRecordsMatched"]
self.assertEqual(2, int(actual))

@staticmethod
12 changes: 6 additions & 6 deletions geonode/catalogue/views.py
Original file line number Diff line number Diff line change
@@ -164,12 +164,12 @@ def opensearch_dispatch(request):
"""OpenSearch wrapper"""

ctx = {
"shortname": settings.PYCSW["CONFIGURATION"]["metadata:main"]["identification_title"],
"description": settings.PYCSW["CONFIGURATION"]["metadata:main"]["identification_abstract"],
"developer": settings.PYCSW["CONFIGURATION"]["metadata:main"]["contact_name"],
"contact": settings.PYCSW["CONFIGURATION"]["metadata:main"]["contact_email"],
"attribution": settings.PYCSW["CONFIGURATION"]["metadata:main"]["provider_name"],
"tags": settings.PYCSW["CONFIGURATION"]["metadata:main"]["identification_keywords"].replace(",", " "),
"shortname": settings.PYCSW["CONFIGURATION"]["metadata"]["identification"]["title"],
"description": settings.PYCSW["CONFIGURATION"]["metadata"]["identification"]["description"],
"developer": settings.PYCSW["CONFIGURATION"]["metadata"]["contact"]["name"],
"contact": settings.PYCSW["CONFIGURATION"]["metadata"]["contact"]["email"],
"attribution": settings.PYCSW["CONFIGURATION"]["metadata"]["provider"]["name"],
"tags": settings.PYCSW["CONFIGURATION"]["metadata"]["identification"]["keywords"].replace(",", " "),
"url": settings.SITEURL.rstrip("/") if settings.SITEURL.startswith("http") else settings.SITEURL,
}

2 changes: 1 addition & 1 deletion geonode/layers/views.py
Original file line number Diff line number Diff line change
@@ -204,7 +204,7 @@ def dataset_feature_catalogue(request, layername, template="../../catalogue/temp
context_dict = {
"dataset": layer,
"attributes": attributes,
"metadata": settings.PYCSW["CONFIGURATION"]["metadata:main"],
"metadata": settings.PYCSW["CONFIGURATION"]["metadata"],
}
register_event(request, "view", layer)
return render(request, template, context=context_dict, content_type="application/xml")
75 changes: 42 additions & 33 deletions geonode/local_settings.py.geoserver.sample
Original file line number Diff line number Diff line change
@@ -178,7 +178,7 @@ PYCSW = {
"home": ".",
"url": CATALOGUE["default"]["URL"],
"encoding": "UTF-8",
"language": LANGUAGE_CODE,
"language": LANGUAGE_CODE if LANGUAGE_CODE in ("en", "fr", "el") else "en",
"maxrecords": "20",
"pretty_print": "true",
# 'domainquerytype': 'range',
@@ -191,43 +191,52 @@ PYCSW = {
"allowed_ips": "*",
# 'csw_harvest_pagesize': '10',
},
"metadata:main": {
"identification_title": "GeoNode Catalogue",
"identification_abstract": "GeoNode is an open source platform"
" that facilitates the creation, sharing, and collaborative use"
" of geospatial data",
"identification_keywords": "sdi, catalogue, discovery, metadata," " GeoNode",
"identification_keywords_type": "theme",
"identification_fees": "None",
"identification_accessconstraints": "None",
"provider_name": "Organization Name",
"provider_url": SITEURL,
"contact_name": "Lastname, Firstname",
"contact_position": "Position Title",
"contact_address": "Mailing Address",
"contact_city": "City",
"contact_stateorprovince": "Administrative Area",
"contact_postalcode": "Zip or Postal Code",
"contact_country": "Country",
"contact_phone": "+xx-xxx-xxx-xxxx",
"contact_fax": "+xx-xxx-xxx-xxxx",
"contact_email": "Email Address",
"contact_url": "Contact URL",
"contact_hours": "Hours of Service",
"contact_instructions": "During hours of service. Off on " "weekends.",
"contact_role": "pointOfContact",
},
"metadata:inspire": {
"enabled": "true",
"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": "YYYY-MM-DD/YYYY-MM-DD",
},
"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",
}
}
}
}

@@ -274,10 +283,10 @@ if GEONODE_CLIENT_LAYER_PREVIEW_LIBRARY == "mapstore":
pycsw_config = PYCSW["CONFIGURATION"]
if pycsw_config:
pycsw_catalogue = {
("%s" % pycsw_config["metadata:main"]["identification_title"]): {
("%s" % pycsw_config["metadata"]["identification"]): {
"url": CATALOGUE["default"]["URL"],
"type": "csw",
"title": pycsw_config["metadata:main"]["identification_title"],
"title": pycsw_config["metadata"]["identification"]["title"],
"autoload": True,
}
}
14 changes: 14 additions & 0 deletions geonode/people/enumerations.py
Original file line number Diff line number Diff line change
@@ -37,3 +37,17 @@
("owner", _("party that owns the resource")),
("principalInvestigator", _("key party responsible for gathering information and conducting research")),
)

GMD_ROLE_LABEL_MAPPING = {
"Owner": "owner",
"Point of Contact": "pointOfContact",
"Metadata Author": "author",
"Processor": "processor",
"Publisher": "publisher",
"Custodian": "custodian",
"Distributor": "distributor",
"Resource User": "user",
"Resource Provider": "resourceProvider",
"Originator": "originator",
"Principal Investigator": "principalInvestigator",
}
85 changes: 47 additions & 38 deletions geonode/settings.py
Original file line number Diff line number Diff line change
@@ -1141,42 +1141,51 @@
"allowed_ips": "*",
# 'csw_harvest_pagesize': '10',
},
"metadata:main": {
"identification_title": "GeoNode Catalogue",
"identification_abstract": "GeoNode is an open source platform"
" that facilitates the creation, sharing, and collaborative use"
" of geospatial data",
"identification_keywords": "sdi, catalogue, discovery, metadata," " GeoNode",
"identification_keywords_type": "theme",
"identification_fees": "None",
"identification_accessconstraints": "None",
"provider_name": "Organization Name",
"provider_url": SITEURL,
"contact_name": "Lastname, Firstname",
"contact_position": "Position Title",
"contact_address": "Mailing Address",
"contact_city": "City",
"contact_stateorprovince": "Administrative Area",
"contact_postalcode": "Zip or Postal Code",
"contact_country": "Country",
"contact_phone": "+xx-xxx-xxx-xxxx",
"contact_fax": "+xx-xxx-xxx-xxxx",
"contact_email": "Email Address",
"contact_url": "Contact URL",
"contact_hours": "Hours of Service",
"contact_instructions": "During hours of service. Off on " "weekends.",
"contact_role": "pointOfContact",
},
"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": "YYYY-MM-DD/YYYY-MM-DD",
"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",
},
},
}
}
@@ -1461,10 +1470,10 @@ def get_geonode_catalogue_service():
pycsw_config = PYCSW["CONFIGURATION"]
if pycsw_config:
pycsw_catalogue = {
f"{pycsw_config['metadata:main']['identification_title']}": {
f"{pycsw_config['metadata']['identification']}": {
"url": CATALOGUE["default"]["URL"],
"type": "csw",
"title": pycsw_config["metadata:main"]["identification_title"],
"title": pycsw_config["metadata"]["identification"]["title"],
"autoload": True,
"layerOptions": {"tileSize": DEFAULT_TILE_SIZE},
}
6 changes: 3 additions & 3 deletions geonode/views.py
Original file line number Diff line number Diff line change
@@ -116,11 +116,11 @@ def ident_json(request):
site_url = settings.SITEURL.rstrip("/") if settings.SITEURL.startswith("http") else settings.SITEURL
json_data = {}
json_data["siteurl"] = site_url
json_data["name"] = settings.PYCSW["CONFIGURATION"]["metadata:main"]["identification_title"]
json_data["name"] = settings.PYCSW["CONFIGURATION"]["metadata"]["identification"]["title"]

json_data["poc"] = {
"name": settings.PYCSW["CONFIGURATION"]["metadata:main"]["contact_name"],
"email": settings.PYCSW["CONFIGURATION"]["metadata:main"]["contact_email"],
"name": settings.PYCSW["CONFIGURATION"]["metadata"]["contact"]["name"],
"email": settings.PYCSW["CONFIGURATION"]["metadata"]["contact"]["email"],
"twitter": f"https://twitter.com/{settings.TWITTER_SITE}",
}

84 changes: 54 additions & 30 deletions package/support/geonode.local_settings
Original file line number Diff line number Diff line change
@@ -203,44 +203,68 @@ PYCSW = {
# 'pretty_print': 'true',
# 'federatedcatalogues': 'http://catalog.data.gov/csw'
# },
'metadata:main': {
'identification_title': 'GeoNode Catalogue',
'identification_abstract': 'GeoNode is an open source platform' \
' that facilitates the creation, sharing, and collaborative use' \
' of geospatial data',
'identification_keywords': 'sdi, catalogue, discovery, metadata,' \
' GeoNode',
'identification_keywords_type': 'theme',
'identification_fees': 'None',
'identification_accessconstraints': 'None',
'provider_name': 'Organization Name',
'provider_url': SITEURL,
'contact_name': 'Lastname, Firstname',
'contact_position': 'Position Title',
'contact_address': 'Mailing Address',
'contact_city': 'City',
'contact_stateorprovince': 'Administrative Area',
'contact_postalcode': 'Zip or Postal Code',
'contact_country': 'Country',
'contact_phone': '+xx-xxx-xxx-xxxx',
'contact_fax': '+xx-xxx-xxx-xxxx',
'contact_email': 'Email Address',
'contact_url': 'Contact URL',
'contact_hours': 'Hours of Service',
'contact_instructions': 'During hours of service. Off on ' \
'weekends.',
'contact_role': 'pointOfContact',
'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',
'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': 'YYYY-MM-DD/YYYY-MM-DD',
'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',
}
}
}
}
3 changes: 2 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -56,7 +56,8 @@ pyjwt==2.8.0
pyproj<3.7.0
OWSLib==0.31.0
#pycsw==2.6.1
-e git+https://github.com/geopython/pycsw.git@3.0.0-alpha5#egg=pycsw
-e git+https://github.com/geopython/pycsw.git@3.0.0-alpha7#egg=pycsw
jinja2==3.1.4
SQLAlchemy==2.0.30 # required by PyCSW
Shapely==1.8.5.post1
mercantile==1.2.1
3 changes: 2 additions & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -81,7 +81,8 @@ install_requires =
# geopython dependencies
pyproj<3.7.0
OWSLib==0.31.0
pycsw==2.6.1
#pycsw==2.6.1
pycsw @ git+https://github.com/geopython/pycsw.git@3.0.0-alpha7
SQLAlchemy==2.0.30 # required by PyCSW
Shapely==1.8.5.post1
mercantile==1.2.1

0 comments on commit cc8b918

Please sign in to comment.