awpy icon indicating copy to clipboard operation
awpy copied to clipboard

DRAFT: HLTV Win Probability Matrix

Open hojlund123 opened this issue 2 years ago • 3 comments

Finally got the datacleaning done. Alot of it is still on testing basis but need some suggestions on additional helpers and how we should structure it.

hojlund123 avatar Jul 24 '23 03:07 hojlund123

I'll grab the branch and check it out later.

But for general thought. We should probably have a an existing version of the matrix stored as a json file.

I am not sure how to handle updating it yet. Options would be:

  • on install
  • on call of a separate function
  • on grabbing a value from the matrix (always)
  • on grabbing a value from the matrix (if the matrix is old)
  • on grabbing a value from the matrix (when a boolean arg is specified)

if trying to update then notify the user of success or failure. if we update during grabbing and fail just grab the old value

With this change request would be a new runtime requirement now i think. Should we make that optional on installation? (Does anyone know how that works?)

  • When downloading i think we should handle the cleaning in code and only write the final matrix as json.

We definitely have to pass the CI.

  • Pass formatting from black
  • Pass lints from ruff
  • Pass type checking from pyright:
  • -> Define a pydantic model/typeddict (and check with pydantic) that we expect the matrix structure to follow
  • Pass pylint

Names shoud probably be more descriptive

JanEricNitschke avatar Jul 24 '23 07:07 JanEricNitschke

For the CI we are using pre-commit which should run black and ruff for you and then you would have to manually install and run pyright and pylint.

Ill try to write a contributing file soon.

JanEricNitschke avatar Jul 24 '23 14:07 JanEricNitschke

We should also definitely make this all type save with type dicts and/or pydantic.

Additionally i am currently getting a JSONDecodeError when trying to call round_win_probability.

So we should also definitely add tests.

JanEricNitschke avatar Jul 25 '23 05:07 JanEricNitschke