materials-marketplace / python-sdk

Python software development kit for MarketPlace.
MIT License
0 stars 1 forks source link

Rename `get_transformation_list` to `list_transformations` #46

Open csadorf opened 2 years ago

csadorf commented 2 years ago

I propose to rename the get_transformation_list() function to list_transformations() for conciseness: https://github.com/materials-marketplace/python-sdk/blob/32e20649969a7f063d7aae016bddc0f9b8346dd5/marketplace/app/v0/transformation.py#L9

pablo-de-andres commented 2 years ago

Shouldn't this better go in the standard app API, since we want to rename the capability? Which might change because of #41, but that is the original source for the name.

I do agree, though. It is also not consistent with other like the semantic mappings: https://github.com/materials-marketplace/python-sdk/blob/32e20649969a7f063d7aae016bddc0f9b8346dd5/marketplace/app/v0/object_storage.py#L188

csadorf commented 2 years ago

I don't agree that the function names in the SDK and the operationIDs (capabilities) must correspond one-to-one. One is a RESTful API, the other one is a Python library so we should use conventions that are applicable in the respective context.

pablo-de-andres commented 2 years ago

I meant this because the capabilities also reflect this discrepancy. There is getTransformationList on one hand and listSemanticMappings (or listCollections, listDatasets) on the other.

csadorf commented 2 years ago

I meant this because the capabilities also reflect this discrepancy. There is getTransformationList on one hand and listSemanticMappings (or listCollections, listDatasets) on the other.

Ah yes, that should probably be renamed as well.