Skip to content
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

Merged
merged 19 commits into from
Mar 13, 2024
Merged

New API workflow #616

merged 19 commits into from
Mar 13, 2024

Conversation

maaikelimper
Copy link
Collaborator

To address issue #572

Transforms moved to wis2box-api see also: wmo-im/wis2box-api#45

Copy link
Collaborator

@tomkralidis tomkralidis left a 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

wis2box-management/wis2box/data/bufr2geojson.py Outdated Show resolved Hide resolved
wis2box-management/wis2box/data/bufr4.py Outdated Show resolved Hide resolved

url = f'{DOCKER_API_URL}/processes/wis2box-csv2bufr/execution'
response = requests.post(url, headers=headers, json=payload)
if response.status_code != 200:
Copy link
Collaborator

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.

wis2box-management/wis2box/pubsub/subscribe.py Outdated Show resolved Hide resolved
wis2box-management/wis2box/pubsub/subscribe.py Outdated Show resolved Hide resolved
@maaikelimper maaikelimper requested a review from tomkralidis March 7, 2024 14:30
wis2box-management/wis2box/api/__init__.py Outdated Show resolved Hide resolved
Copy link
Collaborator

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??

@maaikelimper maaikelimper requested a review from tomkralidis March 8, 2024 16:33
@maaikelimper maaikelimper marked this pull request as draft March 12, 2024 10:20
@maaikelimper maaikelimper marked this pull request as ready for review March 12, 2024 16:17
wis2box-management/wis2box/api/__init__.py Outdated Show resolved Hide resolved
@@ -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"""
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add docstring.

wis2box-management/wis2box/data/bufr2geojson.py Outdated Show resolved Hide resolved
wis2box-management/wis2box/data/bufr2geojson.py Outdated Show resolved Hide resolved
wis2box-management/wis2box/pubsub/subscribe.py Outdated Show resolved Hide resolved
@tomkralidis tomkralidis merged commit b161192 into main Mar 13, 2024
2 checks passed
@tomkralidis tomkralidis deleted the new-api-workflow branch March 13, 2024 17:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants