PCVL-1255: rename global payload to cloud data - #788
Open
cmarsone wants to merge 11 commits into
Open
Conversation
…sor.py rpc_handler.py
…to-cloud-data' into PCVL-1255-rename-global-payload-to-cloud-data
…to-cloud-data' into HEAD
Aubaert
reviewed
Sep 2, 2026
| return PayloadGenerator.generate_cloud_data(command, experiment, params, platform_name, **kwargs) | ||
|
|
||
| @staticmethod | ||
| def generate_cloud_data(command: str, |
Contributor
There was a problem hiding this comment.
This is useless. While I agree that the method name above is wrong, this method is only used in deprecated methods anyway
|
|
||
| @staticmethod | ||
| def generate_global_data(payload: Any, kwargs: dict = None) -> dict: | ||
| def generate_cloud_data_from_payload(payload: Any, kwargs: dict = None) -> dict: |
Contributor
There was a problem hiding this comment.
You can remove the "from_payload". A cloud data is supposed to contain a payload in any case, so there is no need to precise it
| self._custom_status_response = None | ||
| self._job_availability_response = {"max_jobs_in_queue": 1, "num_jobs_in_queue": 0} | ||
| self.last_payload = {} | ||
| responses.start() |
| raise requests.HTTPError(f"Could not read json response from url: {endpoint}. \n{e}") | ||
|
|
||
| def post_request(self, endpoint: str, payload: dict | None) -> None | dict: | ||
| def post_request(self, endpoint: str, cloud_data: dict | None) -> None | dict: |
Contributor
There was a problem hiding this comment.
Here, it can be any kind of data, not just the cloud_data
| return response | ||
|
|
||
| def create_job(self, payload) -> str: | ||
| def create_job(self, payload: dict) -> str: |
Contributor
There was a problem hiding this comment.
You can rename this argument for all the RPCHandlers. Also change the docstrings
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Rename variable and functions
cloud_data = {
“job_name”: str
“payload”: dict
}