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

REM-1313: Implement getting only identifiers of batches #51

Merged
merged 1 commit into from
May 16, 2019

Conversation

Art17
Copy link
Contributor

@Art17 Art17 commented May 14, 2019

Jira references

Description

Get a list of batch identifiers — remme batch get-list --ids-only:

Arguments Type Required Description
ids String No Identifiers to get a list of batches by.
start String No Batch identifier to get a list of batches starting from.
limit Integer No Maximum amount of batches to return.
head String No Block identifier to get a list of batches from.
reverse Bool No Parameter to reverse result.
ids-only Bool No Command flag to return batch identifiers only.
node-url String No Node URL to apply a command to.

$ remme batch get-list
--limit=2
--ids-only
--node-url=node-6-testnet.remme.io
{
"result": [
"e4d5089f2ef15d20818b937e1fcf05e04b70ef6860069b31f441124e8d53243f35c265190520b25da07c3eb47354e6e145c6e52229683829dba6b0f185b3b6ca",
"df5e555f9e014e6d6d08b25f82698a1cf06eff4a11e941c0284f210d7b1535d3542f37dd5546d2fc08d51a866910317987933107c1cd2ef14860d0317f039501"
]
}

@Art17 Art17 force-pushed the get-batches-ids-only branch 2 times, most recently from f8fdd87 to 663a56e Compare May 14, 2019 15:27
README.md Outdated
@@ -502,7 +503,16 @@ $ remme batch get-list \
}
]
}

$ remme batch get-list \
Copy link
Contributor

Choose a reason for hiding this comment

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

At this section where we describe only --ids-only. So we should remove excess parameters. I mean refactor to:

$ remme batch get-list --ids-only --node-url=node-6-testnet.remme.io
{
    "result": [
        "e4d5089f2ef1...6b0f185b3b6ca",
        "df5e555f.317f039501",
        ...
    ]
}

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

cli/batch/cli.py Outdated
reverse=reverse,
)
if ids_only:
result, errors = Batch(service=remme).get_ids(
Copy link
Contributor

Choose a reason for hiding this comment

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

get_ids > get_list_ids.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.


def get_ids(self, ids, start, limit, head, reverse):
"""
Get a list of batches.
Copy link
Contributor

Choose a reason for hiding this comment

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

Get a list of batches > Get a list of batches' identifiers.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

@codecov-io
Copy link

codecov-io commented May 15, 2019

Codecov Report

Merging #51 into develop will decrease coverage by 0.14%.
The diff coverage is 88.88%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop      #51      +/-   ##
===========================================
- Coverage    97.22%   97.07%   -0.15%     
===========================================
  Files           55       55              
  Lines         1009     1026      +17     
===========================================
+ Hits           981      996      +15     
- Misses          28       30       +2
Impacted Files Coverage Δ
cli/batch/help.py 100% <100%> (ø) ⬆️
cli/batch/forms.py 100% <100%> (ø) ⬆️
cli/batch/cli.py 100% <100%> (ø) ⬆️
cli/batch/interfaces.py 55.55% <50%> (-1.59%) ⬇️
cli/batch/service.py 92.68% <88.88%> (-1.07%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8f7c87a...1ac9565. Read the comment docs.

@Annitra Annitra self-requested a review May 16, 2019 07:44
@@ -577,7 +578,14 @@ $ remme batch get-list \
}
]
}

$ remme batch get-list --ids-only --node-url=node-6-testnet.remme.io
Copy link
Contributor

Choose a reason for hiding this comment

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

Add the sentence which is in transactions example.

https://github.com/Remmeauth/remme-core-cli/blob/develop/README.md

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

@@ -8,3 +8,4 @@
BATCH_REVERSE_ARGUMENT_HELP_MESSAGE = 'Parameter to reverse result.'
BATCH_STATUS_IDENTIFIER_ARGUMENT_HELP_MESSAGE = 'Identifier to get a batch status by.'
BATCH_ID_ARGUMENT_HELP_MESSAGE = 'Identifier to get a batch by.'
BATCH_IDENTIFIERS_ONLY_ARGUMENT_HELP_MESSAGE = 'Command flag to return batch identifiers only.'
Copy link
Contributor

Choose a reason for hiding this comment

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

The flag to get a list of batches' identifiers.

Change in README also.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.


def get_list_ids(self, ids, start, limit, head, reverse):
"""
Get a list of batch identifiers.
Copy link
Contributor

Choose a reason for hiding this comment

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

batch > batches'.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.


def get_list_ids(self, ids, start, limit, head, reverse):
"""
Get a list of batch identifiers.
Copy link
Contributor

Choose a reason for hiding this comment

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

batch > batches'.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

Copy link
Contributor

Choose a reason for hiding this comment

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

@Art17, do not see changes —

Get a list of batch identifiers.
.

cli/constants.py Outdated
LATEST_RELEASE_NODE_IP_ADDRESS_FOR_TESTING = '165.22.75.163'
RELEASE_0_9_0_ALPHA_NODE_ADDRESS = '165.227.169.119'
NODE_1_IN_TESTNET_ADDRESS = 'node-1-testnet.remme.io'
NODE_27_IN_TESTNET_ADDRESS = 'node-27-testnet.remme.io'
Copy link
Contributor

Choose a reason for hiding this comment

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

Remove this. It is old code.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

@Art17 Art17 force-pushed the get-batches-ids-only branch 2 times, most recently from e9c369f to c48c11e Compare May 16, 2019 15:39
README.md Outdated
@@ -982,4 +991,4 @@ If you are new for the contribution, please read:
If you want to your pull request to be review, ensure you:
1. [Branch isn't out-of-date with the base branch](https://habrastorage.org/webt/ux/gi/wm/uxgiwmnft08fubvjfd6d-8pw2wq.png).
2. [Have written the description of the pull request and have added at least 2 reviewers](https://github.com/camo/55c309334a8b61a4848a6ef25f9b0fb3751ae5e9/68747470733a2f2f686162726173746f726167652e6f72672f776562742f74312f70792f63752f7431707963753162786a736c796f6a6c707935306d7862357969652e706e67).
3. [Continuous integration has been passed](https://habrastorage.org/webt/oz/fl/-n/ozfl-nl-jynrh7ofz8yuz9_gapy.png).
3. [Continuous integration has been passed](https://habrastorage.org/webt/oz/fl/-n/ozfl-nl-jynrh7ofz8yuz9_gapy.png).
Copy link
Contributor

Choose a reason for hiding this comment

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

Why it has been changed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.


def get_list_ids(self, ids, start, limit, head, reverse):
"""
Get a list of batch identifiers.
Copy link
Contributor

Choose a reason for hiding this comment

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

@Art17, do not see changes —

Get a list of batch identifiers.
.

@Art17 Art17 force-pushed the get-batches-ids-only branch 3 times, most recently from ec95672 to 7097db5 Compare May 16, 2019 16:28
@Art17 Art17 merged commit 3c18461 into develop May 16, 2019
@delete-merged-branch delete-merged-branch bot deleted the get-batches-ids-only branch May 16, 2019 16:45
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.

4 participants