-
-
Notifications
You must be signed in to change notification settings - Fork 1
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
--digits
argument
#25
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## dev #25 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 2 2
Lines 62 63 +1
Branches 13 13
=========================================
+ Hits 62 63 +1 ☔ View full report in Codecov by Sentry. |
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.
Minor comments applied.
README.md
Outdated
@@ -174,6 +174,12 @@ Info: Chemex method | |||
<td align="center">String</td> | |||
<td align="center"><code>Custom brewing method</code></td> | |||
</tr> | |||
<tr> | |||
<td align="center"><code>--digits</code></td> | |||
<td align="center">Number of digits up to which the result is to be rounded</td> |
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.
is rounded
good enough.
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.
fixed in bec88b6
mycoffee/__main__.py
Outdated
@@ -18,6 +18,11 @@ def main(): | |||
parser.add_argument('--water-ratio', help='coefficient for the water component in the ratio', type=float) | |||
parser.add_argument('--water', help='amount of water in each cup (gr)', type=float) | |||
parser.add_argument('--cups', help='number of cups', type=int) | |||
parser.add_argument( | |||
'--digits', | |||
help='number of digits up to which the result is to be rounded', |
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.
here again.
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.
fixed in bec88b6
>>> args = parser.parse_args(["--method", 'steep-and-release', "--digits", '1']) | ||
>>> params = load_params(args) | ||
>>> params["coffee"] = calc_coffee(params) | ||
>>> params["water"] | ||
255 | ||
>>> params["coffee"] | ||
15.9375 | ||
>>> params["water_ratio"] | ||
16 | ||
>>> params["coffee_ratio"] | ||
1 | ||
>>> params["method"] | ||
'steep-and-release' | ||
>>> params = filter_params(params) | ||
>>> params["water_ratio"] | ||
16 | ||
>>> params["coffee_ratio"] | ||
1 | ||
>>> params["water"] | ||
255 | ||
>>> params["coffee"] | ||
15.9 |
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.
Don't we want to add params['digits']
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.
fixed in 999bf5f
Reference Issues/PRs
#9
What does this implement/fix? Explain your changes.
--digits
argument addedREADME.md
updatedfilter_params
function updatedAny other comments?