Feature/edit flow 896
✨ Feature: Implement openml.flows.edit_flow for Flow Metadata Editing (Closes #896)
This Pull Request addresses Issue #896 by introducing the function openml.flows.edit_flow, which allows authenticated users to modify non-critical metadata fields of their uploaded OpenML Flows.
This functionality is crucial for fixing typos, adding missing context, or updating automatically generated names, as discussed in the original issue thread.
⚙️ Key Changes:
- New Function: Added
openml.flows.edit_flow(flow_id, **kwargs)toopenml/flows/functions.py. - Editable Fields: The function supports editing the following fields, which are sent to the newly implemented REST API endpoint (
flow/edit):custom_nametags(passed as a list, converted to a comma-separated string for the API)languagedescription
- Validation: Implements client-side checks to ensure:
flow_idis an integer.- At least one editable field is provided.
- Testing: Comprehensive tests are added in
tests/test_flows/test_flow_functions.pyto cover single-field edits, multiple-field edits, tag handling, and error conditions (like no fields provided or server errors). - Documentation: The function is added to
openml/flows/__init__.pyand includes detailed docstrings with examples.
Note to Reviewers: This implementation relies on the existence of the corresponding flow/edit endpoint in the OpenML REST API (which was implemented separately as a prerequisite for this PR).
@PGijsbers Hello, This Pull Request implements the openml.flows.edit_flow functionality discussed in Issue #896. The proposed implementation enables authenticated users to update selected non-critical metadata fields of an existing flow, including custom_name, tags, language, and description. It also includes validation logic, tests, and documentation updates to ensure consistent behavior.
When you have the opportunity, I kindly request your review and feedback on this PR. Thank you for your time and consideration.