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
api: Add MOCKED /workflows -endpoint #21
Conversation
reana_workflow_controller/app.py
Outdated
@app.route('/workflows', methods=['GET']) | ||
def get_workflows(): | ||
"""Get all workflows. | ||
|
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.
PEP8 expects here and empty line. Try to plug some linter to your editor so you notice this kind of errors before! :)
reana_workflow_controller/app.py
Outdated
"""Get all workflows. | ||
|
||
.. http:get:: /workflows | ||
Returns a JSON list with all the workflows. |
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.
I would suggest to keep empty lines between different blocks when documenting as in yadage_endpoint()
docstring, in favor of readability
reana_workflow_controller/app.py
Outdated
|
||
.. http:get:: /workflows | ||
Returns a JSON list with all the workflows. | ||
NOTE: Currently just a mock that can used e.g. to quickly |
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.
Regarding to the NOTE, it is rendered all in the same line and it doesn't look very pretty. I would do either one of the following things:
- Add empty line between the endpoint description and the note.
Returns a JSON list with all the workflows.
NOTE: Currently just a mock that can used e.g. to quickly
check if reana-workflow-controller is running.
- Use
sphinx
.. warning::
so it gets nicely rendered with red background.
.. warning::
Not implemented, just a mock that can be used e.g. to quickly
check if reana-workflow-controller is running.
p.s. mind the missing verb in ... just a mock that can [be] used ...
reana_workflow_controller/app.py
Outdated
} | ||
:resheader Content-Type: application/json | ||
:statuscode 200: no error - the list has been returned. | ||
""" |
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.
Remember that you should reference this new endpoint in https://raw.githubusercontent.com/reanahub/reana-workflow-controller/master/docs/restapi.rst otherwise it doesn't get rendered
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.
p.s. run test locally and build docs so you can see how the documentation gets rendered 😄
98408cf
to
a8dc1d7
Compare
@hjhsalo Please squash the commits together at the end and use something like the following commit message style:
This could be important later for automatic generation of release notes... |
* Adds mocked `/workflows` endpoint that provides a quick way to check if reana-workflow-engine is running. (closes reanahub#20) Signed-off-by: Harri Hirvonsalo <harri.hirvonsalo@cern.ch>
a8dc1d7
to
6eb1e81
Compare
check if reana-workflow-engine is running. Closes api: add workflows endpoint #20.
Signed-off-by: Harri Hirvonsalo harri.hirvonsalo@cern.ch