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

Release 0.2.0 #10

Merged
merged 29 commits into from
Apr 27, 2024
Merged

Release 0.2.0 #10

merged 29 commits into from
Apr 27, 2024

Commits on Jan 30, 2024

  1. Adds py.typed file.

    peterschutt authored and mberk committed Jan 30, 2024
    Configuration menu
    Copy the full SHA
    98941d7 View commit details
    Browse the repository at this point in the history

Commits on Feb 22, 2024

  1. Adds mypy and testing deps.

    peterschutt authored and mberk committed Feb 22, 2024
    Configuration menu
    Copy the full SHA
    013f0bb View commit details
    Browse the repository at this point in the history
  2. Adds stub file for shin.shin

    peterschutt authored and mberk committed Feb 22, 2024
    Configuration menu
    Copy the full SHA
    af60768 View commit details
    Browse the repository at this point in the history
  3. Fix instantiate variables as floats.

    peterschutt authored and mberk committed Feb 22, 2024
    Configuration menu
    Copy the full SHA
    04dd16a View commit details
    Browse the repository at this point in the history
  4. Fix for inferred type of p.

    This change declares the type of `p` to accept either the list of mapping return type.
    peterschutt authored and mberk committed Feb 22, 2024
    Configuration menu
    Copy the full SHA
    cbdf1c9 View commit details
    Browse the repository at this point in the history
  5. Use a different var instead of reassigning odds.

    Means we don't lose the information about whether the param `odds` is a mapping or other collection, and therefore we don't need to early capture `keys`.
    
    Also, `_class` was unused, so removed, however we probably can support returning the same type of mapping as the user inputs.
    peterschutt authored and mberk committed Feb 22, 2024
    Configuration menu
    Copy the full SHA
    8439e38 View commit details
    Browse the repository at this point in the history
  6. Use __future__.annotations.

    This allows us to use the nicer union syntax, `A | B`.
    peterschutt authored and mberk committed Feb 22, 2024
    Configuration menu
    Copy the full SHA
    79b22ec View commit details
    Browse the repository at this point in the history
  7. Use Sequence instead of Collection.

    Sequences have specific order, important as the output list is ordered the same as the input sequence.
    peterschutt authored and mberk committed Feb 22, 2024
    Configuration menu
    Copy the full SHA
    e8a72af View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    2d588fe View commit details
    Browse the repository at this point in the history
  9. BREAKING: kw onlyh args and overloads for `calculate_implied_probabil…

    …ities`
    
    Makes all arguments other than `odds` kw only, this drastically reduces the number of required overloads to type the signature properly.
    
    ```py
    # still works
    calculate_implied_probabilities([2.0, 2.0])
    calculate_implied_probabilities(odds=[2.0, 2.0])
    calculate_implied_probabilities([2.0, 2.0], full_output=True)
    ## also any other combination of passing arguments as keyword args remains the same
    
    # patterns of passing any arg other than `odds` as positional breaks
    calculate_implied_probabilibies([2.0, 2.0], 1000)
    calculate_impolied_probabilities([2.0, 2.0], 1000, 1e-12, True)
    ```
    
    This encourages clarity at the callsite and also helps from a library perspective as it is easier to add new kw only args to an api without breaking downstream.
    
    Adds overloads and tests for combination of input types and value of `full_output` flag.
    peterschutt authored and mberk committed Feb 22, 2024
    Configuration menu
    Copy the full SHA
    06a4ce9 View commit details
    Browse the repository at this point in the history
  10. Makes mapping input/output generic on key type.

    Allows the key type of returned dict to match the input key type.
    
    Previously, and input of `{"home": 2.0, "away": 2.0}` would return type `dict[Any, float]`. This change allows that to return `dict[str, float]`.
    peterschutt authored and mberk committed Feb 22, 2024
    Configuration menu
    Copy the full SHA
    11526d7 View commit details
    Browse the repository at this point in the history
  11. BREAKING: generic object return for full_ouput=True

    Instead of returning a dict that loses the type of the implied probabilities, we can return an object that is generic on the implied probability return type.
    
    This means that as far as mypy is concerned, the following two are equivalent:
    
    ```py
    calculate_implied_probabilities([2.0, 2.0])
    calculate_implied_probabilities([2.0, 2.0], full_output=True).implied_probabilities
    ```
    peterschutt authored and mberk committed Feb 22, 2024
    Configuration menu
    Copy the full SHA
    467d889 View commit details
    Browse the repository at this point in the history
  12. Black format.

    peterschutt authored and mberk committed Feb 22, 2024
    Configuration menu
    Copy the full SHA
    a9fbb39 View commit details
    Browse the repository at this point in the history
  13. Fix missing import.

    peterschutt authored and mberk committed Feb 22, 2024
    Configuration menu
    Copy the full SHA
    a490aa0 View commit details
    Browse the repository at this point in the history
  14. Expand tests for full output.

    peterschutt authored and mberk committed Feb 22, 2024
    Configuration menu
    Copy the full SHA
    3be047a View commit details
    Browse the repository at this point in the history
  15. test: mypy configuration

    Configures mypy to run on tests as well as library code.
    
    Refactors tests to deal with type errors caused by reused variable names inside the mono-test.
    peterschutt authored and mberk committed Feb 22, 2024
    Configuration menu
    Copy the full SHA
    494041e View commit details
    Browse the repository at this point in the history
  16. ci: add mypy

    peterschutt authored and mberk committed Feb 22, 2024
    Configuration menu
    Copy the full SHA
    20f8963 View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    c9b6e42 View commit details
    Browse the repository at this point in the history
  18. fix: black formatting

    peterschutt authored and mberk committed Feb 22, 2024
    Configuration menu
    Copy the full SHA
    720a658 View commit details
    Browse the repository at this point in the history
  19. fix: mypy target py version.

    peterschutt authored and mberk committed Feb 22, 2024
    Configuration menu
    Copy the full SHA
    8a26618 View commit details
    Browse the repository at this point in the history
  20. fix: ignore explicit type error in test

    peterschutt authored and mberk committed Feb 22, 2024
    Configuration menu
    Copy the full SHA
    3c524f0 View commit details
    Browse the repository at this point in the history
  21. Configuration menu
    Copy the full SHA
    af63742 View commit details
    Browse the repository at this point in the history

Commits on Apr 27, 2024

  1. docs: update README.md

    Reflects changes introduced in #5.
    
    Closes #7
    peterschutt authored and mberk committed Apr 27, 2024
    Configuration menu
    Copy the full SHA
    b58db9c View commit details
    Browse the repository at this point in the history
  2. Bump black from 23.10.1 to 24.3.0

    Bumps [black](https://github.com/psf/black) from 23.10.1 to 24.3.0.
    - [Release notes](https://github.com/psf/black/releases)
    - [Changelog](https://github.com/psf/black/blob/main/CHANGES.md)
    - [Commits](psf/black@23.10.1...24.3.0)
    
    ---
    updated-dependencies:
    - dependency-name: black
      dependency-type: direct:production
    ...
    
    Signed-off-by: dependabot[bot] <[email protected]>
    dependabot[bot] authored and mberk committed Apr 27, 2024
    Configuration menu
    Copy the full SHA
    2e14d42 View commit details
    Browse the repository at this point in the history
  3. Apply black formatting

    mberk committed Apr 27, 2024
    Configuration menu
    Copy the full SHA
    dab48ba View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    f774234 View commit details
    Browse the repository at this point in the history
  5. Bump version

    mberk committed Apr 27, 2024
    Configuration menu
    Copy the full SHA
    18df610 View commit details
    Browse the repository at this point in the history
  6. Update HISTORY.md

    mberk committed Apr 27, 2024
    Configuration menu
    Copy the full SHA
    10749ee View commit details
    Browse the repository at this point in the history
  7. Update HISTORY.md

    mberk committed Apr 27, 2024
    Configuration menu
    Copy the full SHA
    4deedd9 View commit details
    Browse the repository at this point in the history