socha 2.2.0__tar.gz → 2.2.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- socha-2.2.2/.github/dependabot.yml +10 -0
- socha-2.2.0/.github/workflows/continuous_deployment.yml → socha-2.2.2/.github/workflows/cd.yml +2 -4
- socha-2.2.2/.github/workflows/ci.yaml +44 -0
- {socha-2.2.0 → socha-2.2.2}/.github/workflows/convert.yml +2 -2
- {socha-2.2.0 → socha-2.2.2}/.gitignore +2 -1
- {socha-2.2.0 → socha-2.2.2}/.readthedocs.yaml +3 -3
- {socha-2.2.0 → socha-2.2.2}/CODE_OF_CONDUCT.md +11 -11
- {socha-2.2.0 → socha-2.2.2}/CONTRIBUTING.md +28 -17
- {socha-2.2.0 → socha-2.2.2}/Cargo.lock +29 -29
- {socha-2.2.0 → socha-2.2.2}/Cargo.toml +1 -1
- {socha-2.2.0 → socha-2.2.2}/PKG-INFO +15 -9
- {socha-2.2.0 → socha-2.2.2}/README.md +13 -8
- {socha-2.2.0 → socha-2.2.2}/pyproject.toml +18 -15
- {socha-2.2.0 → socha-2.2.2}/python/socha/_socha.pyi +91 -74
- {socha-2.2.0 → socha-2.2.2}/python/socha/api/networking/game_client.py +69 -31
- {socha-2.2.0 → socha-2.2.2}/python/socha/api/networking/network_socket.py +2 -1
- {socha-2.2.0 → socha-2.2.2}/python/socha/api/networking/utils.py +92 -45
- {socha-2.2.0 → socha-2.2.2}/python/socha/api/networking/xml_protocol_interface.py +34 -18
- {socha-2.2.0 → socha-2.2.2}/python/socha/api/protocol/protocol.py +122 -215
- socha-2.2.2/python/socha/api/protocol/protocol_packet.py +10 -0
- {socha-2.2.0 → socha-2.2.2}/python/socha/api/protocol/room_message.py +4 -1
- socha-2.2.2/python/socha/starter.py +245 -0
- socha-2.2.2/python/socha/utils/package_builder.py +254 -0
- socha-2.2.2/requirements.txt +1 -0
- {socha-2.2.0 → socha-2.2.2}/src/lib.rs +14 -11
- {socha-2.2.0 → socha-2.2.2}/src/plugin/actions/accelerate.rs +58 -29
- {socha-2.2.0 → socha-2.2.2}/src/plugin/actions/advance.rs +25 -28
- {socha-2.2.0 → socha-2.2.2}/src/plugin/actions/push.rs +42 -49
- {socha-2.2.0 → socha-2.2.2}/src/plugin/actions/turn.rs +28 -27
- {socha-2.2.0 → socha-2.2.2}/src/plugin/actions.rs +19 -17
- {socha-2.2.0 → socha-2.2.2}/src/plugin/board.rs +65 -42
- {socha-2.2.0 → socha-2.2.2}/src/plugin/coordinate.rs +169 -107
- socha-2.2.2/src/plugin/errors/acceleration_errors.rs +44 -0
- socha-2.2.2/src/plugin/errors/advance_errors.rs +38 -0
- socha-2.2.2/src/plugin/errors/invalid_move_exception.rs +34 -0
- {socha-2.2.0 → socha-2.2.2}/src/plugin/errors/movement_error.rs +8 -7
- socha-2.2.2/src/plugin/errors/push_error.rs +34 -0
- {socha-2.2.0 → socha-2.2.2}/src/plugin/errors/turn_error.rs +8 -5
- socha-2.2.2/src/plugin/errors.rs +59 -0
- {socha-2.2.0 → socha-2.2.2}/src/plugin/field.rs +17 -13
- {socha-2.2.0 → socha-2.2.2}/src/plugin/game_state.rs +97 -424
- {socha-2.2.0 → socha-2.2.2}/src/plugin/move.rs +6 -3
- {socha-2.2.0 → socha-2.2.2}/src/plugin/segment.rs +49 -23
- {socha-2.2.0 → socha-2.2.2}/src/plugin/ship.rs +23 -10
- socha-2.2.2/src/plugin/test/game_state.rs +393 -0
- socha-2.2.2/src/plugin/test.rs +1 -0
- {socha-2.2.0 → socha-2.2.2}/src/plugin.rs +8 -7
- socha-2.2.0/.github/workflows/push.yaml +0 -17
- socha-2.2.0/python/socha/api/protocol/protocol_packet.py +0 -14
- socha-2.2.0/python/socha/starter.py +0 -148
- socha-2.2.0/python/socha/utils/package_builder.py +0 -216
- socha-2.2.0/requirements.txt +0 -1
- socha-2.2.0/src/plugin/errors/acceleration_errors.rs +0 -37
- socha-2.2.0/src/plugin/errors/advance_errors.rs +0 -33
- socha-2.2.0/src/plugin/errors/invalid_move_exception.rs +0 -34
- socha-2.2.0/src/plugin/errors/push_error.rs +0 -33
- socha-2.2.0/src/plugin/errors.rs +0 -60
- {socha-2.2.0 → socha-2.2.2}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
- {socha-2.2.0 → socha-2.2.2}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
- {socha-2.2.0 → socha-2.2.2}/.github/pull_request_template.md +0 -0
- {socha-2.2.0 → socha-2.2.2}/LICENSE +0 -0
- {socha-2.2.0 → socha-2.2.2}/docs/Makefile +0 -0
- {socha-2.2.0 → socha-2.2.2}/docs/appending +0 -0
- {socha-2.2.0 → socha-2.2.2}/docs/conf.py +0 -0
- {socha-2.2.0 → socha-2.2.2}/docs/index.rst +0 -0
- {socha-2.2.0 → socha-2.2.2}/docs/make.bat +0 -0
- {socha-2.2.0 → socha-2.2.2}/docs/modules.rst +0 -0
- {socha-2.2.0 → socha-2.2.2}/docs/requirements.txt +0 -0
- {socha-2.2.0 → socha-2.2.2}/python/socha/__init__.py +0 -0
- {socha-2.2.0 → socha-2.2.2}/python/socha/api/__init__.py +0 -0
- {socha-2.2.0 → socha-2.2.2}/python/socha/api/networking/__init__.py +0 -0
- {socha-2.2.0 → socha-2.2.2}/python/socha/api/protocol/__init__.py +0 -0
- {socha-2.2.0 → socha-2.2.2}/python/socha/py.typed +0 -0
- {socha-2.2.0 → socha-2.2.2}/src/plugin/constants.rs +0 -0
- {socha-2.2.0 → socha-2.2.2}/start.sh +0 -0
- {socha-2.2.0 → socha-2.2.2}/tests/test_network.py +0 -0
socha-2.2.0/.github/workflows/continuous_deployment.yml → socha-2.2.2/.github/workflows/cd.yml
RENAMED
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
name:
|
|
1
|
+
name: Continuous Deployment
|
|
2
2
|
|
|
3
3
|
on:
|
|
4
4
|
release:
|
|
5
5
|
types: [published]
|
|
6
|
-
branches:
|
|
7
|
-
- master
|
|
8
6
|
|
|
9
7
|
permissions:
|
|
10
8
|
contents: read
|
|
@@ -96,7 +94,7 @@ jobs:
|
|
|
96
94
|
release:
|
|
97
95
|
name: Release
|
|
98
96
|
runs-on: ubuntu-latest
|
|
99
|
-
if:
|
|
97
|
+
if: startsWith(github.ref, 'refs/tags/')
|
|
100
98
|
needs: [linux, windows, macos, sdist]
|
|
101
99
|
steps:
|
|
102
100
|
- uses: actions/download-artifact@v3
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
name: Continuous Integration
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- master
|
|
7
|
+
pull_request:
|
|
8
|
+
types: [opened, synchronize, reopened]
|
|
9
|
+
|
|
10
|
+
permissions: read-all
|
|
11
|
+
|
|
12
|
+
env:
|
|
13
|
+
CARGO_TERM_COLOR: always
|
|
14
|
+
|
|
15
|
+
jobs:
|
|
16
|
+
build:
|
|
17
|
+
runs-on: ubuntu-latest
|
|
18
|
+
|
|
19
|
+
steps:
|
|
20
|
+
- uses: actions/checkout@v3
|
|
21
|
+
|
|
22
|
+
# Clippy - Rust linter
|
|
23
|
+
- name: Install Rust toolchain
|
|
24
|
+
run: rustup toolchain install stable
|
|
25
|
+
- name: Run Clippy
|
|
26
|
+
run: rustup component add clippy && cargo clippy -- -D warnings
|
|
27
|
+
|
|
28
|
+
# Install dependencies and run unittests within the virtual environment
|
|
29
|
+
- name: Setup and run tests in virtual environment
|
|
30
|
+
run: |
|
|
31
|
+
python -m venv venv
|
|
32
|
+
source venv/bin/activate
|
|
33
|
+
pip install ruff
|
|
34
|
+
ruff .
|
|
35
|
+
pip install maturin
|
|
36
|
+
maturin develop
|
|
37
|
+
python -m unittest discover -s tests -p '*.py'
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
# Build and test steps for Rust
|
|
41
|
+
- name: Build
|
|
42
|
+
run: cargo build --verbose
|
|
43
|
+
- name: Run tests
|
|
44
|
+
run: cargo test --verbose
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
name: convert readme
|
|
2
2
|
on:
|
|
3
3
|
push:
|
|
4
|
-
branches: [
|
|
4
|
+
branches: [master]
|
|
5
5
|
jobs:
|
|
6
6
|
convert:
|
|
7
7
|
runs-on: ubuntu-latest
|
|
@@ -20,4 +20,4 @@ jobs:
|
|
|
20
20
|
git add docs/index.rst
|
|
21
21
|
git commit -m "docs: auto update index.rst"
|
|
22
22
|
git push
|
|
23
|
-
continue-on-error: true
|
|
23
|
+
continue-on-error: true
|
|
@@ -17,23 +17,23 @@ diverse, inclusive, and healthy community.
|
|
|
17
17
|
Examples of behavior that contributes to a positive environment for our
|
|
18
18
|
community include:
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
20
|
+
- Demonstrating empathy and kindness toward other people
|
|
21
|
+
- Being respectful of differing opinions, viewpoints, and experiences
|
|
22
|
+
- Giving and gracefully accepting constructive feedback
|
|
23
|
+
- Accepting responsibility and apologizing to those affected by our mistakes,
|
|
24
24
|
and learning from the experience
|
|
25
|
-
|
|
25
|
+
- Focusing on what is best not just for us as individuals, but for the
|
|
26
26
|
overall community
|
|
27
27
|
|
|
28
28
|
Examples of unacceptable behavior include:
|
|
29
29
|
|
|
30
|
-
|
|
30
|
+
- The use of sexualized language or imagery, and sexual attention or
|
|
31
31
|
advances of any kind
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
32
|
+
- Trolling, insulting or derogatory comments, and personal or political attacks
|
|
33
|
+
- Public or private harassment
|
|
34
|
+
- Publishing others' private information, such as a physical or email
|
|
35
35
|
address, without their explicit permission
|
|
36
|
-
|
|
36
|
+
- Other conduct which could reasonably be considered inappropriate in a
|
|
37
37
|
professional setting
|
|
38
38
|
|
|
39
39
|
## Enforcement Responsibilities
|
|
@@ -106,7 +106,7 @@ Violating these terms may lead to a permanent ban.
|
|
|
106
106
|
### 4. Permanent Ban
|
|
107
107
|
|
|
108
108
|
**Community Impact**: Demonstrating a pattern of violation of community
|
|
109
|
-
standards, including sustained inappropriate behavior,
|
|
109
|
+
standards, including sustained inappropriate behavior, harassment of an
|
|
110
110
|
individual, or aggression toward or disparagement of classes of individuals.
|
|
111
111
|
|
|
112
112
|
**Consequence**: A permanent ban from any sort of public interaction within
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
<!-- omit in toc -->
|
|
2
|
+
|
|
2
3
|
# Contributing to Software-Challenge Python Client
|
|
3
4
|
|
|
4
5
|
First off, thanks for taking the time to contribute! ❤️
|
|
@@ -6,10 +7,12 @@ First off, thanks for taking the time to contribute! ❤️
|
|
|
6
7
|
All types of contributions are encouraged and valued. See the [Table of Contents](#table-of-contents) for different ways to help and details about how this project handles them. Please make sure to read the relevant section before making your contribution. It will make it a lot easier for us maintainers and smooth out the experience for all involved. The community looks forward to your contributions. 🎉
|
|
7
8
|
|
|
8
9
|
> And if you like the project, but just don't have time to contribute, that's fine. There are other easy ways to support the project and show your appreciation, which we would also be very happy about:
|
|
10
|
+
>
|
|
9
11
|
> - Star the project
|
|
10
12
|
> - Refer this project in your project's readme
|
|
11
13
|
|
|
12
14
|
<!-- omit in toc -->
|
|
15
|
+
|
|
13
16
|
## Table of Contents
|
|
14
17
|
|
|
15
18
|
- [Code of Conduct](#code-of-conduct)
|
|
@@ -22,7 +25,6 @@ All types of contributions are encouraged and valued. See the [Table of Contents
|
|
|
22
25
|
- [Styleguides](#styleguides)
|
|
23
26
|
- [Commit Messages](#commit-messages)
|
|
24
27
|
|
|
25
|
-
|
|
26
28
|
## Code of Conduct
|
|
27
29
|
|
|
28
30
|
This project and everyone participating in it is governed by the
|
|
@@ -30,10 +32,9 @@ This project and everyone participating in it is governed by the
|
|
|
30
32
|
By participating, you are expected to uphold this code. Please report unacceptable behavior
|
|
31
33
|
to .
|
|
32
34
|
|
|
33
|
-
|
|
34
35
|
## I Have a Question
|
|
35
36
|
|
|
36
|
-
> If you want to ask a question, we assume that you have read the available
|
|
37
|
+
> If you want to ask a question, we assume that you have read the available Documentation.
|
|
37
38
|
|
|
38
39
|
Before you ask a question, it is best to search for existing [Issues](https://github.com/FalconsSky/socha-python-client/issues) that might help you. In case you have found a suitable issue and still need clarification, you can write your question in this issue. It is also advisable to search the internet for answers first.
|
|
39
40
|
|
|
@@ -63,17 +64,19 @@ Depending on how large the project is, you may want to outsource the questioning
|
|
|
63
64
|
## I Want To Contribute
|
|
64
65
|
|
|
65
66
|
> ### Legal Notice <!-- omit in toc -->
|
|
67
|
+
>
|
|
66
68
|
> When contributing to this project, you must agree that you have authored 100% of the content, that you have the necessary rights to the content and that the content you contribute may be provided under the project license.
|
|
67
69
|
|
|
68
70
|
### Reporting Bugs
|
|
69
71
|
|
|
70
72
|
<!-- omit in toc -->
|
|
73
|
+
|
|
71
74
|
#### Before Submitting a Bug Report
|
|
72
75
|
|
|
73
76
|
A good bug report shouldn't leave others needing to chase you up for more information. Therefore, we ask you to investigate carefully, collect information and describe the issue in detail in your report. Please complete the following steps in advance to help us fix any potential bug as fast as possible.
|
|
74
77
|
|
|
75
78
|
- Make sure that you are using the latest version.
|
|
76
|
-
- Determine if your bug is really a bug and not an error on your side e.g. using incompatible environment components/versions (Make sure that you have read the
|
|
79
|
+
- Determine if your bug is really a bug and not an error on your side e.g. using incompatible environment components/versions (Make sure that you have read the documentation. If you are looking for support, you might want to check [this section](#i-have-a-question)).
|
|
77
80
|
- To see if other users have experienced (and potentially already solved) the same issue you are having, check if there is not already a bug report existing for your bug or error in the [bug tracker](https://github.com/FalconsSky/socha-python-clientissues?q=label%3Abug).
|
|
78
81
|
- Also make sure to search the internet (including Stack Overflow) to see if users outside of the GitHub community have discussed the issue.
|
|
79
82
|
- Collect information about the bug:
|
|
@@ -84,16 +87,18 @@ A good bug report shouldn't leave others needing to chase you up for more inform
|
|
|
84
87
|
- Can you reliably reproduce the issue? And can you also reproduce it with older versions?
|
|
85
88
|
|
|
86
89
|
<!-- omit in toc -->
|
|
90
|
+
|
|
87
91
|
#### How Do I Submit a Good Bug Report?
|
|
88
92
|
|
|
89
93
|
> You must never report security related issues, vulnerabilities or bugs including sensitive information to the issue tracker, or elsewhere in public. Instead sensitive bugs must be sent by email to .
|
|
94
|
+
|
|
90
95
|
<!-- You may add a PGP key to allow the messages to be sent encrypted as well. -->
|
|
91
96
|
|
|
92
97
|
We use GitHub issues to track bugs and errors. If you run into an issue with the project:
|
|
93
98
|
|
|
94
99
|
- Open an [Issue](https://github.com/FalconsSky/socha-python-client/issues/new). (Since we can't be sure at this point whether it is a bug or not, we ask you not to talk about a bug yet and not to label the issue.)
|
|
95
100
|
- Explain the behavior you would expect and the actual behavior.
|
|
96
|
-
- Please provide as much context as possible and describe the
|
|
101
|
+
- Please provide as much context as possible and describe the _reproduction steps_ that someone else can follow to recreate the issue on their own. This usually includes your code. For good bug reports you should isolate the problem and create a reduced test case.
|
|
97
102
|
- Provide the information you collected in the previous section.
|
|
98
103
|
|
|
99
104
|
Once it's filed:
|
|
@@ -104,20 +109,21 @@ Once it's filed:
|
|
|
104
109
|
|
|
105
110
|
<!-- You might want to create an issue template for bugs and errors that can be used as a guide and that defines the structure of the information to be included. If you do so, reference it here in the description. -->
|
|
106
111
|
|
|
107
|
-
|
|
108
112
|
### Suggesting Enhancements
|
|
109
113
|
|
|
110
114
|
This section guides you through submitting an enhancement suggestion for Software-Challenge Python Client, **including completely new features and minor improvements to existing functionality**. Following these guidelines will help maintainers and the community to understand your suggestion and find related suggestions.
|
|
111
115
|
|
|
112
116
|
<!-- omit in toc -->
|
|
117
|
+
|
|
113
118
|
#### Before Submitting an Enhancement
|
|
114
119
|
|
|
115
120
|
- Make sure that you are using the latest version.
|
|
116
|
-
- Read the
|
|
121
|
+
- Read the documentation carefully and find out if the functionality is already covered, maybe by an individual configuration.
|
|
117
122
|
- Perform a [search](https://github.com/FalconsSky/socha-python-client/issues) to see if the enhancement has already been suggested. If it has, add a comment to the existing issue instead of opening a new one.
|
|
118
123
|
- Find out whether your idea fits with the scope and aims of the project. It's up to you to make a strong case to convince the project's developers of the merits of this feature. Keep in mind that we want features that will be useful to the majority of our users and not just a small subset. If you're just targeting a minority of users, consider writing an add-on/plugin library.
|
|
119
124
|
|
|
120
125
|
<!-- omit in toc -->
|
|
126
|
+
|
|
121
127
|
#### How Do I Submit a Good Enhancement Suggestion?
|
|
122
128
|
|
|
123
129
|
Enhancement suggestions are tracked as [GitHub issues](https://github.com/FalconsSky/socha-python-client/issues).
|
|
@@ -131,6 +137,7 @@ Enhancement suggestions are tracked as [GitHub issues](https://github.com/Falcon
|
|
|
131
137
|
<!-- You might want to create an issue template for enhancement suggestions that can be used as a guide and that defines the structure of the information to be included. If you do so, reference it here in the description. -->
|
|
132
138
|
|
|
133
139
|
### Your First Code Contribution
|
|
140
|
+
|
|
134
141
|
- Familiarize yourself with the project: Before you make your first contribution, take some time to understand the project and its goals. Read through the documentation and the source code to get a feel for the project structure and coding style.
|
|
135
142
|
|
|
136
143
|
- Find an issue to work on: Look through the open issues in the project's repository to find something that interests you or that you feel you can tackle. If you can't find an issue that suits your skills, consider creating a new issue to suggest a feature or fix a bug.
|
|
@@ -172,6 +179,7 @@ By following these steps, you can make your first code contribution to a project
|
|
|
172
179
|
By making improvements to the documentation, you can help others understand and use the project more easily. Your contributions will be invaluable in making the project a success!
|
|
173
180
|
|
|
174
181
|
## Styleguides
|
|
182
|
+
|
|
175
183
|
The following styleguides should be followed when contributing code to this project:
|
|
176
184
|
|
|
177
185
|
- PEP 8: Follow the guidelines set forth in the Python Enhancement Proposal 8 (PEP 8) for code style, including indentation, line length, naming conventions, and whitespace usage.
|
|
@@ -187,27 +195,30 @@ The following styleguides should be followed when contributing code to this proj
|
|
|
187
195
|
By following these styleguides, you can help maintain a consistent and high-quality codebase for this project.
|
|
188
196
|
|
|
189
197
|
### Commit Messages
|
|
198
|
+
|
|
190
199
|
- Use the present tense: Write your commit messages in the present tense, using phrases like "change" or "add" instead of "changed" or "added".
|
|
191
200
|
|
|
192
|
-
- Follow the Karma Runner format: Use the following format for your commit messages: `<type>(<scope>): <subject>`.
|
|
193
|
-
The `<type>` should describe the nature of the change (e.g. `fix`, `feat`, `docs`, `style`, etc.). The `<scope>` should describe the part of the code affected by the change,
|
|
201
|
+
- Follow the Karma Runner format: Use the following format for your commit messages: `<type>(<scope>): <subject>`.
|
|
202
|
+
The `<type>` should describe the nature of the change (e.g. `fix`, `feat`, `docs`, `style`, etc.). The `<scope>` should describe the part of the code affected by the change,
|
|
194
203
|
and the `<subject>` should provide a brief description of the change.
|
|
195
204
|
|
|
196
205
|
- Limit the subject line to 72 characters: Keep the subject line of your commit message concise and to the point, using no more than 72 characters.
|
|
197
206
|
|
|
198
|
-
- Provide more detail in the body: If necessary, provide additional detail about the changes in the body of the commit message,
|
|
207
|
+
- Provide more detail in the body: If necessary, provide additional detail about the changes in the body of the commit message,
|
|
199
208
|
separated from the subject line by a blank line.
|
|
200
209
|
|
|
201
210
|
- Reference issues: If your changes are related to a specific issue or bug, include a reference to that issue in your commit message.
|
|
202
211
|
|
|
203
212
|
Example:
|
|
204
|
-
```
|
|
205
|
-
fix(authentication system): validate users before logging in
|
|
206
213
|
|
|
207
|
-
|
|
208
|
-
|
|
214
|
+
```text
|
|
215
|
+
fix(authentication system): validate users before logging in
|
|
216
|
+
|
|
217
|
+
The authentication system was failing to properly validate users, causing them to be unable to log in.
|
|
218
|
+
This change adds additional checks to the authentication process to ensure that users are correctly validated.
|
|
219
|
+
|
|
220
|
+
Fixes #123.
|
|
221
|
+
```
|
|
209
222
|
|
|
210
|
-
|
|
211
|
-
```
|
|
212
|
-
By following the Karma Runner convention for commit messages, you can make it easier for others to understand the changes you've made and why.
|
|
223
|
+
By following the Karma Runner convention for commit messages, you can make it easier for others to understand the changes you've made and why.
|
|
213
224
|
This will help maintain the project's history and make it easier for others to contribute to the project in the future.
|
|
@@ -4,7 +4,7 @@ version = 3
|
|
|
4
4
|
|
|
5
5
|
[[package]]
|
|
6
6
|
name = "_socha"
|
|
7
|
-
version = "2.2.
|
|
7
|
+
version = "2.2.2"
|
|
8
8
|
dependencies = [
|
|
9
9
|
"libm",
|
|
10
10
|
"libmath",
|
|
@@ -18,24 +18,24 @@ dependencies = [
|
|
|
18
18
|
|
|
19
19
|
[[package]]
|
|
20
20
|
name = "aho-corasick"
|
|
21
|
-
version = "1.1.
|
|
21
|
+
version = "1.1.3"
|
|
22
22
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
23
|
-
checksum = "
|
|
23
|
+
checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916"
|
|
24
24
|
dependencies = [
|
|
25
25
|
"memchr",
|
|
26
26
|
]
|
|
27
27
|
|
|
28
28
|
[[package]]
|
|
29
29
|
name = "arc-swap"
|
|
30
|
-
version = "1.7.
|
|
30
|
+
version = "1.7.1"
|
|
31
31
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
32
|
-
checksum = "
|
|
32
|
+
checksum = "69f7f8c3906b62b754cd5326047894316021dcfe5a194c8ea52bdd94934a3457"
|
|
33
33
|
|
|
34
34
|
[[package]]
|
|
35
35
|
name = "autocfg"
|
|
36
|
-
version = "1.
|
|
36
|
+
version = "1.2.0"
|
|
37
37
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
38
|
-
checksum = "
|
|
38
|
+
checksum = "f1fdabc7756949593fe60f30ec81974b613357de856987752631dea1e3394c80"
|
|
39
39
|
|
|
40
40
|
[[package]]
|
|
41
41
|
name = "bitflags"
|
|
@@ -63,9 +63,9 @@ checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8"
|
|
|
63
63
|
|
|
64
64
|
[[package]]
|
|
65
65
|
name = "indoc"
|
|
66
|
-
version = "2.0.
|
|
66
|
+
version = "2.0.5"
|
|
67
67
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
68
|
-
checksum = "
|
|
68
|
+
checksum = "b248f5224d1d606005e02c97f5aa4e88eeb230488bcc03bc9ca4d7991399f2b5"
|
|
69
69
|
|
|
70
70
|
[[package]]
|
|
71
71
|
name = "libc"
|
|
@@ -106,15 +106,15 @@ checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c"
|
|
|
106
106
|
|
|
107
107
|
[[package]]
|
|
108
108
|
name = "memchr"
|
|
109
|
-
version = "2.7.
|
|
109
|
+
version = "2.7.2"
|
|
110
110
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
111
|
-
checksum = "
|
|
111
|
+
checksum = "6c8640c5d730cb13ebd907d8d04b52f55ac9a2eec55b440c8892f40d56c76c1d"
|
|
112
112
|
|
|
113
113
|
[[package]]
|
|
114
114
|
name = "memoffset"
|
|
115
|
-
version = "0.9.
|
|
115
|
+
version = "0.9.1"
|
|
116
116
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
117
|
-
checksum = "
|
|
117
|
+
checksum = "488016bfae457b036d996092f6cb448677611ce4449e970ceaf42695203f218a"
|
|
118
118
|
dependencies = [
|
|
119
119
|
"autocfg",
|
|
120
120
|
]
|
|
@@ -156,9 +156,9 @@ checksum = "7170ef9988bc169ba16dd36a7fa041e5c4cbeb6a35b76d4c03daded371eae7c0"
|
|
|
156
156
|
|
|
157
157
|
[[package]]
|
|
158
158
|
name = "proc-macro2"
|
|
159
|
-
version = "1.0.
|
|
159
|
+
version = "1.0.81"
|
|
160
160
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
161
|
-
checksum = "
|
|
161
|
+
checksum = "3d1597b0c024618f09a9c3b8655b7e430397a36d23fdafec26d6965e9eec3eba"
|
|
162
162
|
dependencies = [
|
|
163
163
|
"unicode-ident",
|
|
164
164
|
]
|
|
@@ -221,7 +221,7 @@ dependencies = [
|
|
|
221
221
|
"proc-macro2",
|
|
222
222
|
"pyo3-macros-backend",
|
|
223
223
|
"quote",
|
|
224
|
-
"syn 2.0.
|
|
224
|
+
"syn 2.0.59",
|
|
225
225
|
]
|
|
226
226
|
|
|
227
227
|
[[package]]
|
|
@@ -234,14 +234,14 @@ dependencies = [
|
|
|
234
234
|
"proc-macro2",
|
|
235
235
|
"pyo3-build-config",
|
|
236
236
|
"quote",
|
|
237
|
-
"syn 2.0.
|
|
237
|
+
"syn 2.0.59",
|
|
238
238
|
]
|
|
239
239
|
|
|
240
240
|
[[package]]
|
|
241
241
|
name = "quote"
|
|
242
|
-
version = "1.0.
|
|
242
|
+
version = "1.0.36"
|
|
243
243
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
244
|
-
checksum = "
|
|
244
|
+
checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7"
|
|
245
245
|
dependencies = [
|
|
246
246
|
"proc-macro2",
|
|
247
247
|
]
|
|
@@ -304,9 +304,9 @@ dependencies = [
|
|
|
304
304
|
|
|
305
305
|
[[package]]
|
|
306
306
|
name = "regex"
|
|
307
|
-
version = "1.10.
|
|
307
|
+
version = "1.10.4"
|
|
308
308
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
309
|
-
checksum = "
|
|
309
|
+
checksum = "c117dbdfde9c8308975b6a18d71f3f385c89461f7b3fb054288ecf2a2058ba4c"
|
|
310
310
|
dependencies = [
|
|
311
311
|
"aho-corasick",
|
|
312
312
|
"memchr",
|
|
@@ -327,9 +327,9 @@ dependencies = [
|
|
|
327
327
|
|
|
328
328
|
[[package]]
|
|
329
329
|
name = "regex-syntax"
|
|
330
|
-
version = "0.8.
|
|
330
|
+
version = "0.8.3"
|
|
331
331
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
332
|
-
checksum = "
|
|
332
|
+
checksum = "adad44e29e4c806119491a7f06f03de4d1af22c3a680dd47f1e6e179439d1f56"
|
|
333
333
|
|
|
334
334
|
[[package]]
|
|
335
335
|
name = "scopeguard"
|
|
@@ -339,9 +339,9 @@ checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49"
|
|
|
339
339
|
|
|
340
340
|
[[package]]
|
|
341
341
|
name = "smallvec"
|
|
342
|
-
version = "1.13.
|
|
342
|
+
version = "1.13.2"
|
|
343
343
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
344
|
-
checksum = "
|
|
344
|
+
checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67"
|
|
345
345
|
|
|
346
346
|
[[package]]
|
|
347
347
|
name = "syn"
|
|
@@ -356,9 +356,9 @@ dependencies = [
|
|
|
356
356
|
|
|
357
357
|
[[package]]
|
|
358
358
|
name = "syn"
|
|
359
|
-
version = "2.0.
|
|
359
|
+
version = "2.0.59"
|
|
360
360
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
361
|
-
checksum = "
|
|
361
|
+
checksum = "4a6531ffc7b071655e4ce2e04bd464c4830bb585a61cabb96cf808f05172615a"
|
|
362
362
|
dependencies = [
|
|
363
363
|
"proc-macro2",
|
|
364
364
|
"quote",
|
|
@@ -464,9 +464,9 @@ checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538"
|
|
|
464
464
|
|
|
465
465
|
[[package]]
|
|
466
466
|
name = "xml-rs"
|
|
467
|
-
version = "0.8.
|
|
467
|
+
version = "0.8.20"
|
|
468
468
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
469
|
-
checksum = "
|
|
469
|
+
checksum = "791978798f0597cfc70478424c2b4fdc2b7a8024aaff78497ef00f24ef674193"
|
|
470
470
|
|
|
471
471
|
[[package]]
|
|
472
472
|
name = "yaserde"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: socha
|
|
3
|
-
Version: 2.2.
|
|
3
|
+
Version: 2.2.2
|
|
4
4
|
Classifier: License :: OSI Approved :: MIT License
|
|
5
5
|
Classifier: Operating System :: MacOS
|
|
6
6
|
Classifier: Operating System :: Microsoft :: Windows
|
|
@@ -16,12 +16,13 @@ Classifier: Programming Language :: Rust
|
|
|
16
16
|
Classifier: Typing :: Typed
|
|
17
17
|
Requires-Dist: xsdata ==22.9
|
|
18
18
|
License-File: LICENSE
|
|
19
|
-
Summary: This is the package for the Software-Challenge Germany
|
|
19
|
+
Summary: This is the package for the Software-Challenge Germany 2024. This Season the game will be 'Mississippi Queen'.
|
|
20
20
|
Author-email: maxblan <stu222782@mail.uni-kiel.de>
|
|
21
21
|
Requires-Python: >=3.10
|
|
22
22
|
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
|
|
23
23
|
Project-URL: Bug Tracker, https://github.com/FalconsSky/Software-Challenge-Python-Client/issues
|
|
24
24
|
|
|
25
|
+
<!-- trunk-ignore-all(markdownlint/MD041) -->
|
|
25
26
|
<a target="_blank" rel="noopener noreferrer" href="https://www.software-challenge.de"><p align="center"><img width="128" src="https://software-challenge.de/site/themes/freebird/img/logo.png" alt="Software-Challenge Logo"></p></a>
|
|
26
27
|
|
|
27
28
|
# Python Client for the Software-Challenge Germany 2024
|
|
@@ -32,14 +33,11 @@ Project-URL: Bug Tracker, https://github.com/FalconsSky/Software-Challenge-Pytho
|
|
|
32
33
|
[](https://discord.gg/ARZamDptG5)
|
|
33
34
|
[](https://docs.software-challenge.de/)
|
|
34
35
|
|
|
35
|
-
> **Be warned!** This package is currently experimental and has still a few known bugs. But please try it out and let us know if anything comes up.
|
|
36
|
-
|
|
37
36
|
> Hey there! To help you out, it's best to start by checking out the
|
|
38
37
|
> [documentation for this client](https://socha-python-client.readthedocs.io/en/)
|
|
39
38
|
> before you ask any questions or open an issue.
|
|
40
39
|
> It'll provide you with some helpful information!
|
|
41
40
|
|
|
42
|
-
|
|
43
41
|
This repository contains the Python package for the
|
|
44
42
|
[Software-Challenge Germany](https://www.software-challenge.de), a programming competition for students. The students
|
|
45
43
|
have to develop an artificial intelligence that plays and competes against other opponents in an annually changing game.
|
|
@@ -197,9 +195,15 @@ you can of course pass start arguments.
|
|
|
197
195
|
| **-v, --verbose** | Verbose option for logging. |
|
|
198
196
|
| **--auto-reconnect** | Automatically reconnect to the server if the connection is lost. |
|
|
199
197
|
| **-b, --build** | Builds this script into a package with all its dependencies. |
|
|
198
|
+
| **-d, --directory** | The directory where the package should be built. |
|
|
199
|
+
| **-a, --architecture**| The architecture of the package. |
|
|
200
200
|
|
|
201
201
|
## Preparing Your Player for the Competition
|
|
202
202
|
|
|
203
|
+
> Please note that the competition system runs on a Linux system with an `x86_64` architecture.
|
|
204
|
+
> To use your client on the competition system, you will need to download the socha package
|
|
205
|
+
> built for the `manylinux2014_x86_64` platform and the Python version `310`.
|
|
206
|
+
|
|
203
207
|
To ensure that your player is usable for the competition system,
|
|
204
208
|
you need to download all the dependencies that your client uses
|
|
205
209
|
because the system will run on a docker container without access to the internet and sudo permission.
|
|
@@ -208,7 +212,7 @@ because the system will run on a docker container without access to the internet
|
|
|
208
212
|
> All you need is a `requirements.txt` file that lists all your dependencies.
|
|
209
213
|
> To start, simply run the following command in your terminal:
|
|
210
214
|
>
|
|
211
|
-
> `$ python <your_main_script>.py --build <your_directory_name>`
|
|
215
|
+
> `$ python <your_main_script>.py --build -directory <your_directory_name> -architecture <target architecture>`
|
|
212
216
|
>
|
|
213
217
|
> This will trigger the package to do its magic and build your project.
|
|
214
218
|
|
|
@@ -217,7 +221,7 @@ If you want to do it manually, follow the steps below to download the dependenci
|
|
|
217
221
|
1. Open your terminal or console wherever you want to create your directory that you will upload.
|
|
218
222
|
2. Type `mkdir my_player` to create a new directory named `my_player`. You can name yours whatever you want.
|
|
219
223
|
3. Enter the directory using `cd my_player`.
|
|
220
|
-
4. Run the command: `pip download socha
|
|
224
|
+
4. Run the command: `pip download socha --only-binary=:all: --platform manylinux2014_x86_64 --python-version 310 -d dependencies` in the directory.
|
|
221
225
|
This command downloads the dependencies you need into the folder `dependencies`.
|
|
222
226
|
5. Ensure to add all your dependencies that your client uses.
|
|
223
227
|
6. After the download, create a last directory using `mkdir .pip_cache`.
|
|
@@ -268,17 +272,19 @@ my_player/
|
|
|
268
272
|
The `my_player` directory or whatever you named yours just needs to be packaged as a ZIP archive,
|
|
269
273
|
and your player is ready to be uploaded. Congratulations! 🥳🎉
|
|
270
274
|
|
|
271
|
-
|
|
272
275
|
## Local Development
|
|
276
|
+
|
|
273
277
|
> 🏗️ This part is currently still unfinished and subject to change.
|
|
274
278
|
|
|
275
279
|
This package was mostly written in Rust, which gives a significant performance boost compared to a natural Python program.
|
|
276
|
-
However, this leads to considerable effort, as so-called bindings have to be created. These allow Python to access the functions in Rust. To realize this, [PyO3](https://github.com/PyO3/pyo3) is used here with the help of [Maturin](https://github.com/PyO3/maturin).
|
|
280
|
+
However, this leads to considerable effort, as so-called bindings have to be created. These allow Python to access the functions in Rust. To realize this, [PyO3](https://github.com/PyO3/pyo3) is used here with the help of [Maturin](https://github.com/PyO3/maturin).
|
|
277
281
|
|
|
278
282
|
If local development is desired, the following things must be installed beforehand:
|
|
283
|
+
|
|
279
284
|
- [Rust Compiler with Cargo](https://www.rust-lang.org/tools/install),
|
|
280
285
|
- [Python 3.10 or later](https://www.python.org/downloads/),
|
|
281
286
|
- and [Maturin](https://github.com/PyO3/maturin) in a virtual environment in this repository.
|
|
282
287
|
|
|
283
288
|
If everything has been installed successfully, then the command `maturin develop` must be executed in a virtual environment.
|
|
284
289
|
Now you can use a logic written in Python and make changes in the Rust code. Each time a change is made, `maturin develop` must be executed again to make the change visible to the Python code.
|
|
290
|
+
|