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

Added all contacts to the DataCite metadata with pycsw upgrade. #11

Merged
merged 4 commits into from
Nov 28, 2024

Conversation

ahmdthr
Copy link

@ahmdthr ahmdthr commented Nov 26, 2024

DataCite metadata now includes all contacts with multiple roles using the pycsw 3

Checklist

Reviewing is a process done by project maintainers, mostly on a volunteer basis. We try to keep the overhead as small as possible and appreciate if you help us to do so by completing the following items. Feel free to ask in a comment if you have troubles with any of them.

For all pull requests:

  • Confirm you have read the contribution guidelines
  • You have sent a Contribution Licence Agreement (CLA) as necessary (not required for small changes, e.g., fixing typos in the documentation)
  • Make sure the first PR targets the master branch, eventual backports will be managed later. This can be ignored if the PR is fixing an issue that only happens in a specific branch, but not in newer ones.

The following are required only for core and extension modules (they are welcomed, but not required, for contrib modules):

  • There is a ticket in https://github.com/GeoNode/geonode/issues describing the issue/improvement/feature (a notable exemption is, changes not visible to end-users)
  • The issue connected to the PR must have Labels and Milestone assigned
  • PR for bug fixes and small new features are presented as a single commit
  • Commit message must be in the form "[Fixes #<issue_number>] Title of the Issue"
  • New unit tests have been added covering the changes, unless there is an explanation on why the tests are not necessary/implemented
  • This PR passes all existing unit tests (test results will be reported by travis-ci after opening this PR)
  • This PR passes the QA checks: black geonode && flake8 geonode
  • Commits changing the settings, UI, existing user workflows, or adding new functionality, need to include documentation updates
  • Commits adding new texts do use gettext and have updated .po / .mo files (without location infos)

Submitting the PR does not require you to check all items, but by the time it gets merged, they should be either satisfied or inapplicable.

}


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"]
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ahmdthr what happened to DataCite?

@@ -37,8 +39,8 @@
"pycsw:SensorType": "sensortype",
"pycsw:CloudCover": "cloudcover",
"pycsw:Bands": "bands",
"pycsw:Themes": "themes",
"pycsw:Contacts": "contacts",
"pycsw:Themes": "csw_themes",
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cannot spot both themes nor csw_themes .. where are those defined?

@ridoo ridoo force-pushed the datacite-multiple-contacts branch from c3309ef to 10b8035 Compare November 27, 2024 15:16
@ridoo
Copy link

ridoo commented Nov 27, 2024

@ahmdthr The tests are failing. It seems that there are dependency issues as running them locally reveals the following:

django4geonode  | Traceback (most recent call last):
django4geonode  |   File "/usr/src/geonode/manage.py", line 29, in <module>
django4geonode  |     execute_from_command_line(sys.argv)
django4geonode  |   File "/usr/local/lib/python3.10/dist-packages/django/core/management/__init__.py", line 442, in execute_from_command_line
django4geonode  |     utility.execute()
django4geonode  |   File "/usr/local/lib/python3.10/dist-packages/django/core/management/__init__.py", line 416, in execute
django4geonode  |     django.setup()
django4geonode  |   File "/usr/local/lib/python3.10/dist-packages/django/__init__.py", line 24, in setup
django4geonode  |     apps.populate(settings.INSTALLED_APPS)
django4geonode  |   File "/usr/local/lib/python3.10/dist-packages/django/apps/registry.py", line 124, in populate
django4geonode  |     app_config.ready()
django4geonode  |   File "/usr/src/geonode/geonode/harvesting/apps.py", line 31, in ready
django4geonode  |     from geonode.urls import urlpatterns
django4geonode  |   File "/usr/src/geonode/geonode/urls.py", line 84, in <module>
django4geonode  |     re_path(r"^catalogue/", include("geonode.catalogue.urls")),
django4geonode  |   File "/usr/local/lib/python3.10/dist-packages/django/urls/conf.py", line 38, in include
django4geonode  |     urlconf_module = import_module(urlconf_module)
django4geonode  |   File "/usr/lib/python3.10/importlib/__init__.py", line 126, in import_module
django4geonode  |     return _bootstrap._gcd_import(name[level:], package, level)
django4geonode  |   File "/usr/src/geonode/geonode/catalogue/urls.py", line 22, in <module>
django4geonode  |     from . import views
django4geonode  |   File "/usr/src/geonode/geonode/catalogue/views.py", line 26, in <module>
django4geonode  |     from pycsw import server
django4geonode  |   File "/usr/local/lib/python3.10/dist-packages/pycsw/server.py", line 48, in <module>
django4geonode  |     from pycsw.ogc.api.util import yaml_load
django4geonode  |   File "/usr/local/lib/python3.10/dist-packages/pycsw/ogc/api/util.py", line 45, in <module>
django4geonode  |     from jinja2 import Environment, FileSystemLoader
django4geonode  | ModuleNotFoundError: No module named 'jinja2'

Could you please double check what iis wrong here?

@ridoo
Copy link

ridoo commented Nov 27, 2024

@ahmdthr I added jinja2 as dependency -- not sure this will be the only one to be added explicitly. However, let's wait for the tests to fail/succeed.

@ridoo ridoo merged commit cc8b918 into thuenen_4.x Nov 28, 2024
6 checks passed
@ridoo ridoo deleted the datacite-multiple-contacts branch November 28, 2024 06:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants