Skip to content
This repository has been archived by the owner on Aug 24, 2024. It is now read-only.

API modules should be independent from server #21

Open
jdries opened this issue Mar 4, 2020 · 1 comment
Open

API modules should be independent from server #21

jdries opened this issue Mar 4, 2020 · 1 comment

Comments

@jdries
Copy link
Collaborator

jdries commented Mar 4, 2020

Currently, at least 2 modules in API have imports that reference server:

from openeo_udf.server.data_model.metadata_schema import MetadataModel

from openeo_udf.server.data_model.data_collection_schema import DataCollectionModel

This also creates a dependency on things required by the server, which is undesirable for use cases where someone wants to write a simple UDF. I believe these dependencies can be softened, or removed by moving the required server classes into api.

@huhabla
Copy link
Contributor

huhabla commented Mar 8, 2020

The REST based data exchange format must be converted into the internal xarray and pandas based formats. Using the data definitions from the server makes ist easier to implement the conversion. However, the server based format can always be converted into a dictionary that can be used for conversion.
If it is easier for all, then use the dictionary approach, to convert the server side format.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants