Skip to content

Commit

Permalink
general: downgraded to python 3.6
Browse files Browse the repository at this point in the history
  • Loading branch information
maxblan committed Sep 7, 2022
1 parent faad08b commit e255f95
Show file tree
Hide file tree
Showing 12 changed files with 67 additions and 60 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
# Python Client for the Software-Challenge Germany 2023

[![GitHub Workflow Status](https://img.shields.io/github/workflow/status/FalconsSky/Software-Challenge-Python-Client/static%20and%20unit%20tests?label=Test)](https://github.com/FalconsSky/Software-Challenge-Python-Client)
[![Read the Docs](https://img.shields.io/readthedocs/software-challenge-python-client?label=Docs)](https://software-challenge-python-client.readthedocs.io/en/master)
[![Read the Docs](https://img.shields.io/readthedocs/software-challenge-python-client?label=Docs)](https://software-challenge-python-client.readthedocs.io/en/latest/)
[![PyPI](https://img.shields.io/pypi/v/socha?label=PyPi)](https://pypi.org/project/socha/)
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/socha?label=Python)](https://pypi.org/project/socha/)
[![Discord](https://img.shields.io/discord/233577109363097601?color=blue&label=Discord)](https://discord.gg/ARZamDptG5)
[![Documentation](https://img.shields.io/badge/Software--Challenge%20-Documentation-%234299e1)](https://docs.software-challenge.de/)
[![Website](https://img.shields.io/badge/Software--Challenge-Website-%23D9994F)](https://software-challenge.de/)
> Please note that this is a very early version, which may still contain some bugs. However, the client is able to play
> a game from start to end.
Expand All @@ -29,10 +29,10 @@ Therefore,
the possibility of a virtual environment is presented,
which installs the packages inside the folder.

> Pleas make sure that you have at least **Python 3.10** installed.
> Pleas make sure that you have at least **Python 3.6** installed.
> Check with `$ python -V` or `$ python3 -V`.
> - Windows: `> winget install -e --id Python.Python.3.10`
> - Debian: `$ sudo apt install python3.10`
> - Windows: `> winget install -e --id Python.Python.3.6`
> - Debian: `$ sudo apt install python3.6`
> - Arch: `$ sudo pacman -S python`
### Globally
Expand Down Expand Up @@ -181,4 +181,4 @@ my_player/
The `my_player` directory,
or whatever you named yours,
then just needs to be packaged as a ZIP archive
and your player is ready to be uploaded. 🥳🎉
and your player is ready to be uploaded. 🥳🎉
16 changes: 8 additions & 8 deletions docs/index.rst
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Python Client for the Software-Challenge Germany 2023
=====================================================

|GitHub Workflow Status| |Read the Docs| |PyPI| |Discord|
|Documentation| |Website|
|GitHub Workflow Status| |Read the Docs| |PyPI| |PyPI - Python Version|
|Discord| |Documentation|

Please note that this is a very early version, which may still
contain some bugs. However, the client is able to play a game from
Expand All @@ -27,11 +27,11 @@ since there is no Internet connection that allows you to download
packages. Therefore, the possibility of a virtual environment is
presented, which installs the packages inside the folder.

Pleas make sure that you have at least **Python 3.10** installed.
Pleas make sure that you have at least **Python 3.6** installed.
Check with ``$ python -V`` or ``$ python3 -V``.

- Windows: ``> winget install -e --id Python.Python.3.10``
- Debian: ``$ sudo apt install python3.10``
- Windows: ``> winget install -e --id Python.Python.3.6``
- Debian: ``$ sudo apt install python3.6``
- Arch: ``$ sudo pacman -S python``

Globally
Expand Down Expand Up @@ -210,15 +210,15 @@ uploaded. 🥳🎉
.. |GitHub Workflow Status| image:: https://img.shields.io/github/workflow/status/FalconsSky/Software-Challenge-Python-Client/static%20and%20unit%20tests?label=Test
:target: https://github.com/FalconsSky/Software-Challenge-Python-Client
.. |Read the Docs| image:: https://img.shields.io/readthedocs/software-challenge-python-client?label=Docs
:target: https://software-challenge-python-client.readthedocs.io/en/master
:target: https://software-challenge-python-client.readthedocs.io/en/latest/
.. |PyPI| image:: https://img.shields.io/pypi/v/socha?label=PyPi
:target: https://pypi.org/project/socha/
.. |PyPI - Python Version| image:: https://img.shields.io/pypi/pyversions/socha?label=Python
:target: https://pypi.org/project/socha/
.. |Discord| image:: https://img.shields.io/discord/233577109363097601?color=blue&label=Discord
:target: https://discord.gg/ARZamDptG5
.. |Documentation| image:: https://img.shields.io/badge/Software--Challenge%20-Documentation-%234299e1
:target: https://docs.software-challenge.de/
.. |Website| image:: https://img.shields.io/badge/Software--Challenge-Website-%23D9994F
:target: https://software-challenge.de/


Indices and tables
Expand Down
8 changes: 4 additions & 4 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
sphinx==5.1.1
sphinx-autodoc-typehints==1.19.2
furo==2022.6.21
xsdata==22.8
sphinx==4.0
sphinx-autodoc-typehints==1.12.0
furo==2022.4.7
xsdata==22.7
10 changes: 7 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,22 @@ build-backend = "hatchling.build"

[project]
name = "socha"
version = "0.9.4"
version = "0.9.5"
authors = [
{ name = "FalconsSky", email = "[email protected]" },
]
description = "This is the package for the Software-Challenge Germany 2023. This Season the game will be 'Hey, danke für den Fisch' a.k.a. 'Penguins' in short."
readme = "README.md"
requires-python = ">=3.10"
requires-python = ">=3.6"
dependencies = [
"xsdata~=22.8"
"xsdata==22.7"
]
classifiers = [
"Programming Language :: Python",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)",
"Operating System :: OS Independent",
Expand Down
2 changes: 1 addition & 1 deletion readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ version: 2
build:
os: ubuntu-20.04
tools:
python: "3.10"
python: "3.6"

python:
install:
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
xsdata~=22.8
xsdata==22.7
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

setup(
name='socha',
version='0.9.4',
version='0.9.5',
packages=['socha', 'socha.api', 'socha.api.plugin', 'socha.api.protocol',
'socha.api.networking'],
url='https://github.com/FalconsSky/Software-Challenge-Python-Client',
Expand Down
3 changes: 2 additions & 1 deletion socha/api/networking/_network_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import logging
import re
import socket
from typing import Union


class _NetworkInterface:
Expand Down Expand Up @@ -50,7 +51,7 @@ def send(self, data: bytes):
self.socket.sendall(data)
logging.debug("Sent data: %s", data.decode("utf-8"))

def receive_socket_data(self) -> bytes | None:
def receive_socket_data(self) -> Union[bytes, None]:
"""
Receives the raw tcp socket packages.
:return: A package in bytes, None if there where no packages.
Expand Down
2 changes: 1 addition & 1 deletion socha/api/networking/_xflux.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ def _client_loop(self):
"""
The client loop.
This is the main loop,
where the client waites for messages from the server
where the client waits for messages from the server
and handles them accordingly.
"""
while self.running:
Expand Down
7 changes: 4 additions & 3 deletions socha/api/networking/player_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"""
import logging
import time
from typing import List, Union

from socha.api.networking._xflux import _XFluxClient
from socha.api.plugin import penguins
Expand All @@ -16,9 +17,9 @@ def _convertBoard(protocolBoard: Board) -> penguins.Board:
Converts a protocol Board to a usable gam board for using in the logic.
:rtype: object
"""
boardList: list[list[Field]] = []
boardList: List[List[Field]] = []
for y, row in enumerate(protocolBoard.list_value):
rowList: list[Field] = []
rowList: List[Field] = []
for x, fieldsValue in enumerate(row.field_value):
fieldCoordinate = Coordinate(x, y, is_double=False).get_double_hex()
rowList.append(Field(coordinate=fieldCoordinate, field=fieldsValue))
Expand All @@ -27,7 +28,7 @@ def _convertBoard(protocolBoard: Board) -> penguins.Board:


class IClientHandler:
history: list[GameState | Error | Result] = []
history: List[Union[GameState, Error, Result]] = []

def calculate_move(self) -> Move:
"""
Expand Down
Loading

0 comments on commit e255f95

Please sign in to comment.