-
Notifications
You must be signed in to change notification settings - Fork 16
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
New API workflow #616
New API workflow #616
Conversation
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.
Minor comments. General/overall:
- update imports (standard library, 3rd party packages, local imports), alphabetically (see similar comment in
- keep quoting consistent (both double quotes and single quotes). Single quotes always preferred
|
||
url = f'{DOCKER_API_URL}/processes/wis2box-csv2bufr/execution' | ||
response = requests.post(url, headers=headers, json=payload) | ||
if response.status_code != 200: |
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.
Check if response.status_code >= 400
A 201 is a valid response, for example.
9438f44
to
98bef53
Compare
d24f01d
to
6f21dca
Compare
a6084d7
to
2628b5d
Compare
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.
Can we add a source code header??
@@ -325,5 +325,27 @@ def as_bytes(input_data): | |||
LOGGER.warning('Invalid data type') | |||
return None | |||
|
|||
@staticmethod | |||
def as_string(input_data, base64_encode=False): | |||
"""Get data as string""" |
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.
Add docstring.
To address issue #572
Transforms moved to wis2box-api see also: wmo-im/wis2box-api#45