Skip to content

Commit

Permalink
fixup! Issue #412 synchronize create_job in DataCube/VectorCube/MlModel
Browse files Browse the repository at this point in the history
  • Loading branch information
soxofaan committed Apr 6, 2023
1 parent f216477 commit b1a59ec
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 8 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
moved accordingly to the `VectorCube` class.
- Improved documentation on `openeo.processes` and `ProcessBuilder`
([#390](https://github.com/Open-EO/openeo-python-client/issues/390)).
- `DataCube.create_job()` now requires keyword arguments for all but the `out_format` argument.
- `DataCube.create_job()` and `Connection.create_job()` now require
keyword arguments for all but the first argument for clarity.
([#412](https://github.com/Open-EO/openeo-python-client/issues/412)).

### Removed
Expand Down
12 changes: 8 additions & 4 deletions openeo/rest/connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -1164,10 +1164,14 @@ def execute(self, process_graph: Union[dict, str, Path]):
return self.post(path="/result", json=req, expected_status=200).json()

def create_job(
self, process_graph: Union[dict, str, Path],
title: Optional[str] = None, description: Optional[str] = None,
plan: Optional[str] = None, budget: Optional[float] = None,
additional: Optional[dict] = None
self,
process_graph: Union[dict, str, Path],
*,
title: Optional[str] = None,
description: Optional[str] = None,
plan: Optional[str] = None,
budget: Optional[float] = None,
additional: Optional[dict] = None,
) -> BatchJob:
"""
Posts a job to the back end.
Expand Down
2 changes: 0 additions & 2 deletions openeo/rest/mlmodel.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ def execute_batch(

def create_job(
self,
out_format=None,
*,
title: Optional[str] = None,
description: Optional[str] = None,
Expand All @@ -92,7 +91,6 @@ def create_job(
"""
Sends a job to the backend and returns a ClientJob instance.
:param out_format: String Format of the job result.
:param title: job title
:param description: job description
:param plan: billing plan
Expand Down
2 changes: 1 addition & 1 deletion openeo/rest/vectorcube.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ def execute_batch(

def create_job(
self,
out_format=None,
out_format: Optional[str] = None,
*,
title: Optional[str] = None,
description: Optional[str] = None,
Expand Down

0 comments on commit b1a59ec

Please sign in to comment.