-
Notifications
You must be signed in to change notification settings - Fork 4
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
Shipment Creator Bin Command #210
base: master
Are you sure you want to change the base?
Conversation
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.
Overall conceptually this looks okay. But I see room for improvements in several areas related to program structure, logging, error handling, and argument parsing. Please review the comments below in full before starting to work on any changes as some of them imply changes to other areas. Additionally some of these comments apply to a type of scenario that occurs multiple times, yet the comment only exists once. As you review the comments against your code, be cognizant of similar sections of code and make the appropriate updates there as well.
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 exception handling looks better here. When I run this and encounter an error, there are multiple instances of every error message logged to the console. Can you take a look in to this? I think there is something going on with when you are logging various things relating to the new exception handling.
Wallets are created specifically for this test. Same with storage credentials and devices. Lucas talked about possibly reusing extant wallets/credentials but we hadn't fully decided on including that. I could possibly include such a field though I'd want to think about how it grabs these reusable assets. that's why |
99dcde6
to
958aedd
Compare
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.
Rather than reusing static test data (i.e. same tracking data duplicated x times), it might be a nice addition to make use of a random data generator. Check out the Python faker
and factory_boy
libraries for some neat tools that can help generate random values. mimesis
looks good too, I just found that one. For example, you could have faker
generate each subsequent tracking data point within a certain radius of the previous one. You'd probably end up with really zigzaggy data, but it should be fine for testing purposes.
958aedd
to
8cc9fb1
Compare
1a2b024
to
671515f
Compare
671515f
to
6c3f02d
Compare
This branch adds a new bin command to transmission that allows for the automatic creation of shipments. The requires engine, profiles and transmission to all be running locally, and will by default create a new storage credential, shipper/carrier wallet and create 10 new shipments with them.
The creator can be customized by adding in the optional arguments: