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

fix #88 and #93: multiple decimal places and multiple decimal numbers #91

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Commits on Mar 24, 2020

  1. fix MycroftAI#88: multiple decimal places

     * extract_number(), extract_numbers(), and all
       helper functions gain a keyword parameter
       `decimal_places` (for helpers, just `places`)
       which does what it sounds like, using builtin
       round().
    
     * avoid capturing non-adjacent numbers as decimal
       places
    
     * avoid capturing already-used decimal places as
       separate numbers in extract_numbers()
    
     * add a few tests for the above
    ChanceNCounter committed Mar 24, 2020
    Configuration menu
    Copy the full SHA
    11fae0a View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    715fdda View commit details
    Browse the repository at this point in the history

Commits on Mar 30, 2020

  1. address feedback from PR, add granularity

    - more visible funcs now have more explicitly-named parameter for places
    - `extract_number(decimal_places=...)` now has several options:
      - `decimal_places=n` will round to `n` places
      - `decimal_places=0` will round up to nearest int, equiv. ceil(result)
      - `decimal_places=-1` will round down to int, equiv. floor(result)
      - expanded comments and docstrings
    - remove old commented-out code
    ChanceNCounter committed Mar 30, 2020
    Configuration menu
    Copy the full SHA
    951b8df View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    260e32a View commit details
    Browse the repository at this point in the history

Commits on Apr 6, 2020

  1. Configuration menu
    Copy the full SHA
    d1d5a04 View commit details
    Browse the repository at this point in the history