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

--digits argument #25

Merged
merged 12 commits into from
Sep 29, 2024
Merged

--digits argument #25

merged 12 commits into from
Sep 29, 2024

Conversation

sepandhaghighi
Copy link
Owner

@sepandhaghighi sepandhaghighi commented Sep 27, 2024

Reference Issues/PRs

#9

What does this implement/fix? Explain your changes.

  • --digits argument added
  • README.md updated
  • Test system modified
  • filter_params function updated

Any other comments?

Copy link

codecov bot commented Sep 27, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (b675eaf) to head (bec88b6).
Report is 1 commits behind head on dev.

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.
📢 Have feedback on the report? Share it here.

@sepandhaghighi sepandhaghighi self-assigned this Sep 27, 2024
@sepandhaghighi sepandhaghighi added the enhancement New feature or request label Sep 27, 2024
@sepandhaghighi sepandhaghighi added this to the mycoffee v0.4 milestone Sep 27, 2024
@sepandhaghighi sepandhaghighi marked this pull request as ready for review September 27, 2024 22:31
Copy link
Collaborator

@sadrasabouri sadrasabouri left a 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>
Copy link
Collaborator

Choose a reason for hiding this comment

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

is rounded good enough.

Copy link
Owner Author

Choose a reason for hiding this comment

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

fixed in bec88b6

@@ -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',
Copy link
Collaborator

Choose a reason for hiding this comment

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

here again.

Copy link
Owner Author

Choose a reason for hiding this comment

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

fixed in bec88b6

Comment on lines +160 to +181
>>> 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
Copy link
Collaborator

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']

Copy link
Owner Author

Choose a reason for hiding this comment

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

fixed in 999bf5f

@sadrasabouri sadrasabouri merged commit c44a325 into dev Sep 29, 2024
45 checks passed
@sadrasabouri sadrasabouri deleted the digit branch September 29, 2024 16:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants