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

o'clock fix #13

Merged
merged 4 commits into from Feb 20, 2020
Merged

o'clock fix #13

merged 4 commits into from Feb 20, 2020

Conversation

umerhasan17
Copy link
Contributor

@umerhasan17 umerhasan17 commented Feb 19, 2020

#12

Fix parsing of "5 o'clock pm", "five o'clock pm" and "five o'clock".
Create a separate function to convert all word numbers to digit numbers.
Add 2 tests for new function and 2 extra tests to maybe_substitute_hour_minute function.
All tests on pytest passing.

@coveralls
Copy link

Pull Request Test Coverage Report for Build 40

  • 16 of 19 (84.21%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.5%) to 98.539%

Changes Missing Coverage Covered Lines Changed/Added Lines %
timefhuman/categorize.py 16 19 84.21%
Totals Coverage Status
Change from base Build 39: -0.5%
Covered Lines: 607
Relevant Lines: 616

💛 - Coveralls

@alvinwan alvinwan mentioned this pull request Feb 19, 2020
@@ -37,6 +38,24 @@ def categorize(tokens, now):
return tokens


# TODO: add conversions for thirty, fourty-five
Copy link
Owner

@alvinwan alvinwan Feb 19, 2020

Choose a reason for hiding this comment

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

These conversions could actually be done by https://pypi.org/project/word2number/

Edit: adding word2number might be too much for a single PR. Just noting we don't have to build it ourselves

@umerhasan17 umerhasan17 marked this pull request as ready for review February 19, 2020 22:32
@umerhasan17
Copy link
Contributor Author

@alvinwan Thanks for all your help. Extra tests added, coverage increased. Hopefully, I'll get around to opening a few more PRs soon!

@alvinwan alvinwan merged commit 6a601be into alvinwan:master Feb 20, 2020
@umerhasan17
Copy link
Contributor Author

@alvinwan Sorry about this, the build started failing as I think I forgot to test with pytest after my very last commit. I can open another PR but it won't be able to be automatically merged, unfortunately.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants