Skip to content

2 new optional parameters on load-records #1101

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

pvgenuchten
Copy link
Contributor

@pvgenuchten pvgenuchten commented Apr 1, 2025

Overview

parameter to set source

this allows to set the source field to some value, records typically are extracted somewhere to be loaded in this instance, mdsource field can also be used to remove a set (in stead of all). This gives a new contradicting meaning to the mdsource field, which is used by the refresh_harvest method, to be discussed... alternative is to introduce a new field. Another idea here is to have ogcapi-record collections which are based on a source, and not as now configured, via parentidentifier.

parameter to hash md.identifier, so it can safely be send as url parameter

this improves #998 which is still an issue in for example https://demo.pycsw.org/gisdata/collections/metadata:main/items/http://capita.wustl.edu/DataspaceMetadata_ISO/CIRA.VIEWS.MOf.xml. MD5 Hash (and not a random uuid) is used so there is still a relation between the identifier and the hash, in theory you can do a select in db where record.identifier = md5({identifier}). Options are Never (default), ALWAYS and DOUBLESLASH, last one is only applied if the identifier contains double slash, e.g. https://doi.org/54321/example.3456353

Contributions and Licensing

(as per https://github.com/geopython/pycsw/blob/master/CONTRIBUTING.rst#contributions-and-licensing)

  • I'd like to contribute [feature X|bugfix Y|docs|something else] to pycsw. I confirm that my contributions to pycsw will be compatible with the pycsw license guidelines at the time of contribution.
  • I have already previously agreed to the pycsw Contributions and Licensing Guidelines
pycsw-admin.py load-records -c ./default.yml -p ./tests/functionaltests/ -h ALWAYS -s test-records -r
pycsw-admin.py delete-records -c ./default.yml -s test-records

- parameter to set source
- parameter to hash md.identifier, so it can safely be send as url parameter
@pvgenuchten pvgenuchten requested a review from tomkralidis April 1, 2025 15:12
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.

1 participant