Skip to content

Refrain from eulxml package #527

@jokiefer

Description

@jokiefer

Proposed Changes

eulxml is project that is no longer maintained and now causes some other warnings such as pkg_resources is deprecated as an API.

/opt/venv/lib/python3.12/site-packages/eulxml/init.py:19: UserWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html. The pkg_resources package is slated for removal as early as 2025-11-30. Refrain from using this package or pin to Setuptools<81.
import pkg_resources

Justification

We need to remove the package as soon as possible.

To remove it we need to implement as a key component something like a mapper that can handle xml files biderectional.

Bidirectional in that context means:

  • XML structure --> django models --> db persistent
  • db state --> django models --> XML structure
We can split this issue into the following high level components:
  • C1: implement a configuration file architecture to use it for mapping logic (django field --> xpath)
  • C2: implement a xml mapper component which can iterative handle the configuration file and parse all content from a given xml file
  • C3: implement a persistence handle, that can dynamic sort the instantiated django models according to their db dependencies and insert them by the most efficient way (bulk, get_or_create, save...)

Note: XML structure can be any ows specific document like capabilities

Edge cases: There is a need to handle xml data and modify it on the fly which is not part of the django db models. Often used as a simple ogc client for wms, wfs or csw. So we need something like the following:

  • XML structure --> python object --> client
  • client --> python object --> xml structure

First we should evaluate the current state of the ows-lib. Maybe we could use this lib for client usage.

What we definitely need as key features for a client component:

  • initial from offline capabilitites documents
  • handle ows specific responses on python level
  • generate ows specific requests on python level

Sub-issues

Metadata

Metadata

Labels

type: housekeepingChanges to the application which do not directly impact the end user

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions