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

Issue#287: Refactor GeoNode API client module and drop legacy support #288

Merged
merged 18 commits into from
Nov 11, 2024

Conversation

Gpetrak
Copy link
Contributor

@Gpetrak Gpetrak commented Nov 8, 2024

This PR refactors the GeoNode API client module and drops the legacy support according to the issue: #287

@Gpetrak Gpetrak marked this pull request as ready for review November 8, 2024 09:14
@Gpetrak Gpetrak requested a review from giohappy November 8, 2024 09:15
@giohappy
Copy link
Contributor

giohappy commented Nov 8, 2024

@Gpetrak I would implement a more robust and complient method to check if a version is supported. Just comparing the major version with a list of numbers is a bit simplistic.
I suggest to implement a method (e.g. validate_version()) to be used everywhere the version check is required, and compare the version with PEP440 semantics.

The plugin already contains a stripped version of packaging that can be used to parse and compare versions.

For example:

from vendor.packaging.version import Version

v332 = Version("3.3.2post1")
v442 = Version("4.4.2")
v500 = Version("5.0.0b0")
v332 < v442 < v500 # returns True

A check for a valid version should compare a min / max version

@Gpetrak
Copy link
Contributor Author

Gpetrak commented Nov 11, 2024

Thank you @giohappy . I just pushed a new commit regarding your recommendation.

@giohappy giohappy merged commit 3d32098 into GeoNode:main Nov 11, 2024
5 checks passed
@giohappy giohappy linked an issue Nov 11, 2024 that may be closed by this pull request
@giohappy giohappy mentioned this pull request Nov 11, 2024
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.

Refactor GeoNode API client module and drop legacy support
2 participants