Skip to content

Commit

Permalink
scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
pnxenopoulos committed Jan 14, 2025
1 parent 8417b6c commit 18b118f
Show file tree
Hide file tree
Showing 8 changed files with 30 additions and 33 deletions.
9 changes: 4 additions & 5 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''

about: Create an Awpy bug report
title: ""
labels: ""
assignees: ""
---

**Describe the bug**
Expand Down
11 changes: 6 additions & 5 deletions .github/workflows/artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ on:
- "tests/**"
- "pyproject.toml"
workflow_dispatch:

# on:
# push:
# branches: [main]
Expand Down Expand Up @@ -64,24 +65,24 @@ jobs:
- name: Generate Triangles
run: |
Get-ChildItem -Force
.\scripts\generate-tris.ps1 -sourcePath "cs_go\game\csgo\maps"
.\scripts\generate-tris.ps1 -inputPath "cs_go\game\csgo\maps"
- name: Generate Map Images
run: |
Get-ChildItem -Force
.\scripts\generate-map-images.ps1 -sourcePath "cs_go\game\csgo\pak01_dir.vpk"
.\scripts\generate-map-images.ps1 -inputPath "cs_go\game\csgo\pak01_dir.vpk"
- name: Generate Map Data
run: |
Get-ChildItem -Force
.\scripts\generate-map-data.ps1 -sourcePath "cs_go\game\csgo\pak01_dir.vpk"
.\scripts\generate-map-data.ps1 -inputPath "cs_go\game\csgo\pak01_dir.vpk"
- name: Generate Nav
run: |
Get-ChildItem -Force
.\scripts\generate-navs.ps1 -sourcePath "cs_go\game\csgo\maps"
.\scripts\generate-navs.ps1 -inputPath "cs_go\game\csgo\maps"
- name: Generate Spawns
run: |
Get-ChildItem -Force
.\scripts\generate-spawns.ps1 -sourcePath "cs_go\game\csgo\maps"
.\scripts\generate-spawns.ps1 -inputPath "cs_go\game\csgo\maps"
15 changes: 6 additions & 9 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,12 @@ build:
os: "ubuntu-22.04"
tools:
python: "3.10"
jobs:
post_create_environment:
# Install poetry
# https://python-poetry.org/docs/#installing-manually
- python -m pip install poetry
post_install:
# Install dependencies with 'docs' dependency group
# https://python-poetry.org/docs/managing-dependencies/#dependency-groups
- VIRTUAL_ENV=$READTHEDOCS_VIRTUALENV_PATH poetry install
commands:
- asdf plugin add uv
- asdf install uv latest
- asdf global uv latest
- uv sync --extra docs --frozen
- uv run -m sphinx -T -b html -d docs/_build/doctrees -D language=en docs $READTHEDOCS_OUTPUT/html

sphinx:
configuration: docs/conf.py
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2020-2024 Peter Xenopoulos
Copyright (c) 2020-2025 Peter Xenopoulos

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
8 changes: 4 additions & 4 deletions scripts/generate-navs.ps1
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
param(
[Parameter(Mandatory=$false)]
[string]$sourcePath = "C:\Program Files (x86)\Steam\steamapps\common\Counter-Strike Global Offensive\game\csgo\maps",
[string]$inputPath = "C:\Program Files (x86)\Steam\steamapps\common\Counter-Strike Global Offensive\game\csgo\maps",

[Parameter(Mandatory=$false)]
[string]$outputDirectory = (Get-Location).Path
Expand All @@ -9,9 +9,9 @@ param(
# This script generates .json files containing CS2 .nav information.

# Ensure the path exists
if (Test-Path $sourcePath) {
if (Test-Path $inputPath) {
# Get all .vpk files in the directory
Get-ChildItem -Path $sourcePath -Filter "*.vpk" | ForEach-Object {
Get-ChildItem -Path $inputPath -Filter "*.vpk" | ForEach-Object {
# Get full path and base name of the file
$filePath = $_.FullName
$fileNameWithoutExtension = $_.BaseName
Expand Down Expand Up @@ -47,5 +47,5 @@ if (Test-Path $sourcePath) {
Remove-Item -Path $tempOutputDir -Recurse -Force
}
} else {
Write-Host "The specified directory does not exist: $sourcePath" -ForegroundColor Red
Write-Host "The specified directory does not exist: $inputPath" -ForegroundColor Red
}
8 changes: 4 additions & 4 deletions scripts/generate-spawns.ps1
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
param(
[Parameter(Mandatory=$false)]
[string]$sourcePath = "C:\Program Files (x86)\Steam\steamapps\common\Counter-Strike Global Offensive\game\csgo\maps",
[string]$inputPath = "C:\Program Files (x86)\Steam\steamapps\common\Counter-Strike Global Offensive\game\csgo\maps",

[Parameter(Mandatory=$false)]
[string]$outputDirectory = (Get-Location).Path
Expand All @@ -9,9 +9,9 @@ param(
# This script generates .json files containing CS2 .nav information.

# Ensure the path exists
if (Test-Path $sourcePath) {
if (Test-Path $inputPath) {
# Get all .vpk files in the directory
Get-ChildItem -Path $sourcePath -Filter "*.vpk" | ForEach-Object {
Get-ChildItem -Path $inputPath -Filter "*.vpk" | ForEach-Object {
# Get full path and base name of the file
$filePath = $_.FullName
$fileNameWithoutExtension = $_.BaseName
Expand Down Expand Up @@ -47,5 +47,5 @@ if (Test-Path $sourcePath) {
Remove-Item -Path $tempOutputDir -Recurse -Force
}
} else {
Write-Host "The specified directory does not exist: $sourcePath" -ForegroundColor Red
Write-Host "The specified directory does not exist: $inputPath" -ForegroundColor Red
}
8 changes: 4 additions & 4 deletions scripts/generate-tris.ps1
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
param(
[Parameter(Mandatory=$false)]
[string]$sourcePath = "C:\Program Files (x86)\Steam\steamapps\common\Counter-Strike Global Offensive\game\csgo\maps",
[string]$inputPath = "C:\Program Files (x86)\Steam\steamapps\common\Counter-Strike Global Offensive\game\csgo\maps",

[Parameter(Mandatory=$false)]
[string]$outputDirectory = (Get-Location).Path
Expand All @@ -9,9 +9,9 @@ param(
# This script generates .tri files containing CS2 .vphys_c triangle information.

# Ensure the path exists
if (Test-Path $sourcePath) {
if (Test-Path $inputPath) {
# Get all .vpk files in the directory
Get-ChildItem -Path $sourcePath -Filter "*.vpk" | ForEach-Object {
Get-ChildItem -Path $inputPath -Filter "*.vpk" | ForEach-Object {
# Get full path and base name of the file
$filePath = $_.FullName
$fileNameWithoutExtension = $_.BaseName
Expand Down Expand Up @@ -47,5 +47,5 @@ if (Test-Path $sourcePath) {
Remove-Item -Path $tempOutputDir -Recurse -Force
}
} else {
Write-Host "The specified directory does not exist: $sourcePath" -ForegroundColor Red
Write-Host "The specified directory does not exist: $inputPath" -ForegroundColor Red
}
2 changes: 1 addition & 1 deletion tests/test_vis.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from awpy.cli import get
from awpy.data import AWPY_DATA_DIR
from awpy.vector import Vector3
from awpy.vis import Triangle, VisibilityChecker
from awpy.visibility import Triangle, VisibilityChecker


def check_visibility_brute_force(
Expand Down

0 comments on commit 18b118f

Please sign in to comment.