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
Remove relative links #1541
Remove relative links #1541
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1541 +/- ##
=========================================
+ Coverage 98.4% 98.4% +<.01%
=========================================
Files 58 58
Lines 2818 2819 +1
=========================================
+ Hits 2773 2774 +1
Misses 45 45 |
- Updated documentation - Updated tests
- Updated documentation - Updated tests
0f19da5
to
4d1131d
Compare
@@ -24,5 +24,5 @@ def get(self): | |||
with pool() as bigchain: | |||
outputs = bigchain.get_outputs_filtered(args['public_key'], | |||
include_spent) | |||
# NOTE: We pass '..' as a path to create a valid relative URI | |||
return [u.to_uri('..') for u in outputs] |
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.
The to_uri
method might have only been used for this API endpoint.
As we're not using it here anymore, we might want to check if we cannot simply remove it now.
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.
It is still being used for instance to check that all the inputs in a transaction are unique. I guess the same could be achieve without it since the TransactionLink
implements __hash__
but that requires some refactor that was not in the scope of this pr
@@ -265,16 +267,10 @@ Statuses | |||
|
|||
**Example response**: | |||
|
|||
.. literalinclude:: http-samples/get-statuses-block-invalid-response.http |
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.
Why remove?
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.
Before if the block was invalid it only returned the status
. If it was valid it would return the status
and _links
.
Now it always returns only the status
key so I though the two example responses were redundant.
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 found some more occurrences:
// not so sure about the ones from //docs? Are they local?
docs/server/source/drivers-clients/samples/get-statuses-block-valid-response.http
6: "_links": {
docs/server/source/drivers-clients/samples/api-index-response.http
5: "_links": {
docs/server/source/drivers-clients/samples/index-response.http
5: "_links": {
docs/server/source/drivers-clients/samples/get-statuses-tx-valid-response.http
6: "_links": {
// this one we should definitely take care of
tests/web/test_websocket_server.py
171: ws_url = client.get('http://localhost:9984/api/v1/').json['_links']['streams_v1']
Remove the docs build folder and rebuild the docs. There should be no more The test is being skipped so I did not change it. |
resolves #1525
{'txid': 'aaa', 'output': 0}
instead of links