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

2.0.0b5 #351

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ["3.10", "3.11", "3.12"] # Add 3.12 when pxr updates
python-version: ["3.10", "3.11", "3.12"]
timeout-minutes: 15
steps:
- name: Checkout awpy library
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ pip install --pre awpy
```

> [!NOTE]
> `awpy` requires [Python](https://www.python.org/downloads/) >= 3.10. To update the library, just run `pip install --upgrade awpy`. To check your current version, run `pip freeze | grep awpy`.
> `awpy` requires [Python](https://www.python.org/downloads/) between 3.10, 3.11 or 3.12. 3.13 is _not_ currently supported! To update the library, just run `pip install --upgrade awpy`. To check your current version, run `pip freeze | grep awpy`.

> [!TIP]
> Don't worry if you get stuck, visit us [our Discord](https://discord.gg/W34XjsSs2H) for help.
Expand Down
2 changes: 1 addition & 1 deletion awpy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@

from awpy.demo import Demo

__version__ = "2.0.0b4"
__version__ = "2.0.0b5"
__all__ = ["Demo"]
15 changes: 15 additions & 0 deletions awpy/demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
from pathlib import Path
from typing import Optional

import pandas as pd
from demoparser2 import DemoParser # pylint: disable=E0611
from loguru import logger

Expand All @@ -31,6 +32,9 @@
"X",
"Y",
"Z",
"velocity_X",
"velocity_Y",
"velocity_Z",
"pitch",
"yaw",
"last_place_name",
Expand Down Expand Up @@ -167,6 +171,17 @@ def _debug(self, msg: str) -> None:
if self.verbose:
logger.debug(msg)

@property
def players(self) -> pd.DataFrame:
"""Get the players in the demo.

Returns: pd.DataFrame of the players, their steam IDs and rounds.
"""
if self.ticks is not None:
ticks_not_parsed_error_msg = "Ticks are not parsed!"
raise ValueError(ticks_not_parsed_error_msg)
return self.ticks[["steamid", "name", "round", "team_name"]].drop_duplicates()

def _parse_demo(self) -> None:
"""Parse the demo header and file."""
if not self.parser:
Expand Down
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
# The short X.Y version
version = ""
# The full version, including alpha/beta/rc tags
release = "2.0.0b4"
release = "2.0.0b5"


# -- General configuration ---------------------------------------------------
Expand Down
2,289 changes: 1,180 additions & 1,109 deletions poetry.lock

Large diffs are not rendered by default.

14 changes: 8 additions & 6 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api"

[tool.poetry]
name = "awpy"
version = "2.0.0b4"
version = "2.0.0b5"
description = "Counter-Strike 2 demo parsing, analysis and visualization"
readme = "README.md"
authors = [
Expand Down Expand Up @@ -34,7 +34,7 @@ matplotlib = ">=3.9.0"
numpy = "^1.26.4"
pandas = ">=2.2.2"
setuptools = ">=70.1.0"
demoparser2 = ">=0.31.0"
demoparser2 = ">=0.33.1"
tqdm = "^4.66.4"
usd-core = "^24.8"
scipy = "^1.14.0"
Expand Down Expand Up @@ -96,6 +96,9 @@ exclude = [
"venv",
"docs"
]
line-length = 88

[tool.ruff.lint]
select = [
"E",
"F",
Expand Down Expand Up @@ -144,15 +147,14 @@ select = [
]
ignore = ["D208", "ANN101", "T20", "PTH", "TRY003", "BLE001", "PLR2004", "UP007", "ISC001"]
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
line-length = 88

[tool.ruff.pydocstyle]
[tool.ruff.lint.pydocstyle]
convention = "google"

[tool.ruff.pylint]
[tool.ruff.lint.pylint]
max-args = 17

[tool.ruff.per-file-ignores]
[tool.ruff.lint.per-file-ignores]
"__init__.py" = ["E402", "F401"]
"tests/test_*.py" = ["ANN201", "S101", "SLF001", "PLR2004"]

Expand Down