Skip to content
This repository was archived by the owner on Jan 13, 2023. It is now read-only.

Conversation

@EmbeddedAndroid
Copy link
Contributor

@EmbeddedAndroid EmbeddedAndroid commented Jul 5, 2018

Some notable changes:

  • Add argparse interface
  • Add hook for retrieving PyOTA library version
  • Reuse get_seed() to keep from displaying the seed in cleartext
  • Clean up IOTA library imports
  • Removed unused imports
  • Fix invalid depth
  • Misc PEP8 formatting fixes

@todofixthis todofixthis changed the base branch from master to develop July 6, 2018 20:45
@todofixthis
Copy link
Contributor

Hey @EmbeddedAndroid thanks for submitting this PR! I changed the target branch to develop. This caused a couple of conflicts, as we're currently in the middle of PEP-8-ifying the codebase.

Once the conflicts are resolved, I think this is ready to merge 😺

@EmbeddedAndroid
Copy link
Contributor Author

Thanks for reviewing, I'll get the conflicts sorted!

@EmbeddedAndroid EmbeddedAndroid force-pushed the send-transfer-example branch from 0c3621a to 2d2a378 Compare July 6, 2018 21:04
@EmbeddedAndroid
Copy link
Contributor Author

Patches should apply cleanly to the develop branch now!

@todofixthis
Copy link
Contributor

Sweet as. Cheers for that!

Would you mind updating the formatting so that it matches PEP-8 (4-space indents, no spaces around = in function invocations, etc.)?

Everything else looks good!

@EmbeddedAndroid EmbeddedAndroid force-pushed the send-transfer-example branch from 2d2a378 to c327e21 Compare July 6, 2018 21:47
@EmbeddedAndroid
Copy link
Contributor Author

That should fix up the PEP-8 issues, let me know if you spot anything else. Cheers!

Copy link
Contributor

@todofixthis todofixthis left a comment

Choose a reason for hiding this comment

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

Hey @EmbeddedAndroid I apologise for doing this, but I wanted to request two additional changes.

Those will be the last changes; everything else looks great!


from iota import Iota, __version__
from iota.crypto.addresses import AddressGenerator
from iota.crypto.types import Seed
Copy link
Contributor

@todofixthis todofixthis Jul 7, 2018

Choose a reason for hiding this comment

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

❕ This import is used on line 60, as part of a type hint:

https://github.com/iotaledger/iota.lib.py/blob/develop/examples/address_generator.py#L59-L60

Even though the type hint is in a comment (for compatibility with Python 2), IDEs use the import to resolve the type hint correctly.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah good catch, should have looked closed. Will drop this patch.

help=
'Users IOTA seed.'
'(defaults to THESEEDOFTHEWALLETSENDINGGOESHERE99999999999999999999999999999999999999999999999).',
)
Copy link
Contributor

Choose a reason for hiding this comment

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

❔ I'm a tad bit uncomfortable having an interface for users to enter their seed in cleartext. Could we change this to use the functions from https://github.com/iotaledger/iota.lib.py/blob/develop/examples/address_generator.py#L46-L80 instead?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Travelling at the moment, but will implement this as soon as I can.

Copy link
Contributor

Choose a reason for hiding this comment

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

Cheers mate!

@EmbeddedAndroid EmbeddedAndroid force-pushed the send-transfer-example branch 2 times, most recently from 96e485f to d9750eb Compare July 17, 2018 08:29
@EmbeddedAndroid
Copy link
Contributor Author

@todofixthis comments addressed finally :)

Some notable changes:

  * Add argparse interface
  * Add hook for retrieving PyOTA library version
  * Clean up IOTA library imports
  * Ensure seed is not displayed in cleartext
  * Fix invalid depth
  * Misc PEP8 formatting fixes

Signed-off-by: Tyler Baker <tyler.baker@iota.org>
@EmbeddedAndroid EmbeddedAndroid force-pushed the send-transfer-example branch from d9750eb to f072b2f Compare July 17, 2018 20:08
Copy link
Contributor

@todofixthis todofixthis left a comment

Choose a reason for hiding this comment

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

Looks good! Thanks @EmbeddedAndroid !!

@todofixthis todofixthis merged commit 292c4ce into iotaledger-archive:develop Jul 24, 2018
marko-k0 pushed a commit to marko-k0/iota.lib.py that referenced this pull request Jul 28, 2018
…ransfer-example

examples: cleanups for better user experience
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants