IBM / serverless-language-translation

Create a communications channel using serverless technology to allow clients who speak different languages to seamlessly communicate with each other, built on Watson services.
https://developer.ibm.com/code/patterns/deploy-serverless-multilingual-conference-room/
Apache License 2.0
16 stars 35 forks source link

the code base is broken and untested #12

Closed stevemar closed 6 years ago

stevemar commented 6 years ago

I initially tried to fix the travis CI failure since a PR to fix a typo was failing. The travis failures have gone untriaged for weeks and anyone using this code pattern will be broken from the get-go. I am now left wondering why this was published in the first place.

Travis CI

I had to chmod 775 the files in /tests to get them to run. There's a whole slew of errors:

8     E111 indentation is not a multiple of four
4     E114 indentation is not a multiple of four (comment)
2     E115 expected an indented block (comment)
3     E201 whitespace after '('
3     E202 whitespace before ')'
5     E203 whitespace before ','
1     E225 missing whitespace around operator
3     E231 missing whitespace after ':'
2     E261 at least two spaces before inline comment
2     E302 expected 2 blank lines, found 1
12    E501 line too long (140 > 79 characters)
1     E999 SyntaxError: invalid syntax
1     F401 'sys' imported but unused
7     F821 undefined name 'params'
1     H101: Use TODO(NAME)
2     H233: Python 3.x incompatible use of print operator
2     H306: imports not in alphabetical order (sys, requests)

IoT Pub.py

There is a syntax error here: https://github.com/IBM/serverless-language-translation/blob/master/iotPub.py#L22 which is rather necessary for the route to even work.

... + device_type '/devices/' + device_id

it should be:

... + device_type + '/devices/' + device_id

handleIncomingSMS.py

More things preventing the code from being executed are here, where is params defined? I have no idea how to fix this, I'm not that familiar with the code base.

def main(dict):
  sender = dict['From'] # dict['sender']
  message = dict['Body'] # dict['message']

  # Get etcd keys
  etcd_endpoint_keys = 'http://' + params.etcd_endpoint+ ':2379/v2/keys'
stevemar commented 6 years ago

Was the rest of this fixed? I didnt see any other PRs

markstur commented 6 years ago

Still broken

stevemar commented 6 years ago

mostly fixed by https://github.com/IBM/serverless-language-translation/pull/27