-
Notifications
You must be signed in to change notification settings - Fork 43
feature: artifact-helper #750
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
base: master
Are you sure you want to change the base?
feature: artifact-helper #750
Conversation
Allow uploading artifacts using: ``` from openeo.extra.artifacts import ArtifactHelper artifact_helper = ArtifactHelper.from_openeo_connection(connection) storage_uri = artifact_helper.upload_file(object_name, src_file_path) presigned_uri = artifact_helper.get_presigned_url(storage_uri) ```
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is quite a large diff 😄 and I haven't gone deep yet, but here are some initial notes
No need for the type checking guards as also mentioned in PR feedback.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm a bit short on resources to go deep, so just some superficial notes:
This PR adds a lot of new things (lot of new modules, lot of classes) to the public API of the openeo
package. Is it necessary to make all of this public? Once something is public, it's hard to change things because you have to care about compatibility. It's also overwhelming to the user I think.
I also think this feature should be documented in the docs, e.g. somewhere under https://open-eo.github.io/openeo-python-client/cookbook/index.html . Doing that documentation exercise will also make it more clear what the minimal public user-facing part of the API is.
I see you already did some docs on ArtifactHelper, so it should be easy to bootstrap initial docs from that like done at
openeo-python-client/docs/cookbook/job_manager.rst
Lines 13 to 14 in 7e65087
.. autoclass:: openeo.extra.job_management.MultiBackendJobManager | |
:members: |
Allow uploading artifacts using:
Where object_name is a logical string name that will be used to give a unique name in the backend storage.
And src_file_path points to a local file that needs to be stored remotely.
This MVP version still has the sts and s3 URIs hard coded. This is temporary. It is possible to expand the links that are exposed at the root_url (https://openeo.dataspace.copernicus.eu/openeo/1.2/) to include rels like 'artifacts-s3-endpoint' and 'artifacts-sts-endpoint'. That way different artifact backends can be chosen based on the OpenEO environment.