Skip to content

[Fixies #12540] PyCSW upgrade to version 3 #13112

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

Merged
merged 16 commits into from
May 21, 2025
Merged

[Fixies #12540] PyCSW upgrade to version 3 #13112

merged 16 commits into from
May 21, 2025

Conversation

Gpetrak
Copy link
Contributor

@Gpetrak Gpetrak commented Apr 18, 2025

This PR was created according to this issue: #12540 . There is an older PR here: #12535 but a new one was created due to significant changes on the master branch since the previous PR — including the addition of the new metadata editor.

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"
  • PR title must be in the form "[Fixes #<issue_number>] Title of the PR"
  • 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.

@Gpetrak Gpetrak added this to the 5.0.0 milestone Apr 18, 2025
@Gpetrak Gpetrak requested a review from giohappy April 18, 2025 11:16
@Gpetrak Gpetrak self-assigned this Apr 18, 2025
@cla-bot cla-bot bot added the cla-signed CLA Bot: community license agreement signed label Apr 18, 2025
@Gpetrak Gpetrak linked an issue Apr 18, 2025 that may be closed by this pull request
Copy link

codecov bot commented Apr 18, 2025

Codecov Report

Attention: Patch coverage is 50.00000% with 1 line in your changes missing coverage. Please review.

Project coverage is 72.59%. Comparing base (a90b110) to head (35cc7bf).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #13112      +/-   ##
==========================================
- Coverage   72.59%   72.59%   -0.01%     
==========================================
  Files         916      916              
  Lines       52636    52636              
  Branches     6058     6058              
==========================================
- Hits        38213    38210       -3     
- Misses      12857    12860       +3     
  Partials     1566     1566              
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Gpetrak Gpetrak marked this pull request as ready for review April 18, 2025 14:01
@mattiagiupponi mattiagiupponi mentioned this pull request Apr 18, 2025
12 tasks
@giohappy giohappy requested review from etj and removed request for giohappy April 28, 2025 13:39
@giohappy giohappy assigned etj and unassigned Gpetrak Apr 28, 2025
"pycsw:AnyText": "csw_anytext",
"pycsw:Language": "language",
"pycsw:Title": "title",
"pycsw:Abstract": "raw_abstract",
"pycsw:Edition": "csw_edition",
Copy link
Contributor

Choose a reason for hiding this comment

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

ResourceBase has an edition field, not csw_edition

 edition = models.CharField(_("edition"), max_length=255, blank=True, null=True, help_text=edition_help_text)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

requirements.txt Outdated
@@ -52,13 +52,14 @@ oauthlib==3.2.2
pyjwt==2.8.0

# geopython dependencies
git+https://github.com/geopython/pycsw.git@master#egg=pycsw
Copy link
Contributor

Choose a reason for hiding this comment

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

master is a bit too dynamic, we may want a tagged version (3.0.0-beta1 is the latest)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

setup.cfg Outdated
@@ -80,11 +80,12 @@ install_requires =
# geopython dependencies
pyproj<3.7.0
OWSLib==0.31.0
pycsw==2.6.1
pycsw @ git+https://github.com/geopython/pycsw.git@master#egg=pycsw
Copy link
Contributor

Choose a reason for hiding this comment

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

as above: master is a bit too dynamic, we may want a tagged version (3.0.0-beta1 is the latest)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

@@ -28,24 +28,29 @@
"pycsw:MdSource": "csw_mdsource",
"pycsw:InsertDate": "csw_insert_date",
"pycsw:XML": "metadata_xml",
"pycsw:Metadata": "metadata",
Copy link
Contributor

Choose a reason for hiding this comment

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

Should probably be metadata_xml since in pycsw doc:

  • pycsw:XML: full XML representation (deprecated; will be removed in a future release)
  • pycsw:Metadata: full metadata representation

Copy link
Contributor Author

Choose a reason for hiding this comment

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

As we discussed, I left it as it for now

@giohappy giohappy requested review from etj and giohappy May 21, 2025 13:48
@giohappy giohappy merged commit 8856297 into master May 21, 2025
15 of 17 checks passed
@giohappy giohappy deleted the ISSUE_12540 branch May 21, 2025 16:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla-signed CLA Bot: community license agreement signed enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Upgrade to PyCSW 3
3 participants