Skip to content

python 3.11 version #111

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

Open
wants to merge 11 commits into
base: develop
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
4 changes: 2 additions & 2 deletions .github/workflows/python-actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
python-version: [3.9]
python-version: [3.11]

steps:
- uses: actions/checkout@v2
Expand Down Expand Up @@ -58,7 +58,7 @@ jobs:
strategy:
fail-fast: true # one failure is enough
matrix:
python-version: [3.9]
python-version: [3.11]
player1: [bio, bc, 4gate, lurker, mutalisk, saferaven, disruptor]
player2: [ai.zerg.hard.macro]

Expand Down
6 changes: 3 additions & 3 deletions requirements.dev.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
pytest==5.4.1
pytest-asyncio==0.11.0
pytest-pythonpath==0.7.3
pytest==7.2.1
pytest-asyncio==0.20.3
pytest-pythonpath==0.7.4
flake8==3.7.9
black==19.10b0
pre-commit==2.2.0
Expand Down
8 changes: 4 additions & 4 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
s2clientprotocol==4.10.3.76114.0
portpicker==1.4.0
numpy==1.20.0
numpy==1.24.1
requests==2.23.0
aiohttp==3.7.4
scipy==1.7.1
scipy==1.10.0
six==1.16.0
opencv-python==4.5.3.56
opencv-python==4.7.0.68
more-itertools==7.2.0
mpyq==0.2.5
scikit-learn==0.24.2
scikit-learn==1.2.0
loguru==0.6.0
protobuf==3.20.2
Binary file added sc2pathlib/sc2pathlib.cp311-win_amd64.pyd
Binary file not shown.
Binary file added sc2pathlib/sc2pathlib.cpython-311-darwin.so
Binary file not shown.
Binary file not shown.
1 change: 0 additions & 1 deletion sharpy/combat/micro_rules.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,5 +112,4 @@ def load_default_micro(self):
self.unit_micros[UnitTypeId.REAPER] = MicroReaper()
self.unit_micros[UnitTypeId.WIDOWMINE] = MicroMines()


self.generic_micro = GenericMicro()
12 changes: 5 additions & 7 deletions sharpy/combat/terran/micro_widowmines.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

from sc2.ids.ability_id import AbilityId
from sc2.ids.unit_typeid import UnitTypeId
from sc2.unit import Unit
Expand All @@ -15,17 +14,17 @@ def __init__(self):

def unit_solve_combat(self, unit: Unit, current_command: Action) -> Action:
relevant_enemies = self.enemies_near_by.visible
#unburrow if retreating
if self.move_type == MoveType.PanicRetreat:
# unburrow if retreating
if self.move_type == MoveType.PanicRetreat:
if unit.type_id == UnitTypeId.WIDOWMINEBURROWED and not relevant_enemies.exists:
self.requested_mode = AbilityId.BURROWUP_WIDOWMINE
#getting distance to closest enemy
# getting distance to closest enemy
else:
if relevant_enemies.exists:
self.closest_enemy = relevant_enemies.closest_distance_to(unit)
else:
self.closest_enemy = 100
#toggle mode request
# toggle mode request
if self.closest_enemy <= self.burrow_distance:
if self.requested_mode == AbilityId.BURROWUP_WIDOWMINE:
self.requested_mode = AbilityId.BURROWDOWN_WIDOWMINE
Expand All @@ -34,10 +33,9 @@ def unit_solve_combat(self, unit: Unit, current_command: Action) -> Action:
if self.requested_mode == AbilityId.BURROWDOWN_WIDOWMINE:
self.requested_mode = AbilityId.BURROWUP_WIDOWMINE


if unit.type_id == UnitTypeId.WIDOWMINEBURROWED and self.requested_mode == AbilityId.BURROWUP_WIDOWMINE:
return Action(None, False, self.requested_mode)
elif unit.type_id == UnitTypeId.WIDOWMINE and self.requested_mode == AbilityId.BURROWDOWN_WIDOWMINE:
return Action(None,False, self.requested_mode)
return Action(None, False, self.requested_mode)
else:
return current_command
2 changes: 1 addition & 1 deletion test/Dockerfile_python-sc2
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Set up StarCraft II Test Environment for python-sc2 bots (not pysc2 bots!)
ARG PYTHON_VERSION=3.9
ARG PYTHON_VERSION=3.11

# Use an official debian stretch slim release as a base image
FROM python:$PYTHON_VERSION-slim
Expand Down