-
Notifications
You must be signed in to change notification settings - Fork 44
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
updated the organic name when creating the object #45
base: master
Are you sure you want to change the base?
Conversation
updated the organic name when creating the object Now when you create a measurement object the unit is converted to the most optimal for example, if you declare Capacitance('0.0001 F'), it returns the object Capacitance('100 uF') I recommend calling the function self.update_org_name() after calculations or before printing the value on the screen
Hi @SasoriOlkof, that is a great idea! I'd love to see this included in version 4. Would you mind adding tests for the new function and maybe an integration test to verify the overall behavior. Once you are done and all checks pass, simply click the "Ready for review" button. |
Hello, Sorry, I don't know how the tests work 😁, what do I have to add? |
something like that is enough? |
I think that's fine 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.
Hi @SasoriOlkof you are off to a good start however, there is still much to do.
Only Unit
and MetricUnit
implement Unit.factor
, DegreeUnit
for temperatures does not.
You also cast the factor to a float at one point. I don't think that wise, considering we use decimals for a reason here.
Also, plenty of other tests are failing. If you need any help, please let me know.
Best,
Joe
I see, keep the floats then for now. Let me know if you need any assistance in fixing the remaining issues in the test suite. Please also remember to add tests for negative example, where you code should not be executed. Best Joe |
updated the organic name when creating the object
Now when you create a measurement object the unit is converted to the most optimal
for example, if you declare Capacitance('0.0001 F'), it returns the object Capacitance('100 uF')
I recommend calling the function self.update_org_name() after calculations or before printing the value on the screen