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.
Files changed (76) hide show
  1. socha-2.2.2/.github/dependabot.yml +10 -0
  2. socha-2.2.0/.github/workflows/continuous_deployment.yml → socha-2.2.2/.github/workflows/cd.yml +2 -4
  3. socha-2.2.2/.github/workflows/ci.yaml +44 -0
  4. {socha-2.2.0 → socha-2.2.2}/.github/workflows/convert.yml +2 -2
  5. {socha-2.2.0 → socha-2.2.2}/.gitignore +2 -1
  6. {socha-2.2.0 → socha-2.2.2}/.readthedocs.yaml +3 -3
  7. {socha-2.2.0 → socha-2.2.2}/CODE_OF_CONDUCT.md +11 -11
  8. {socha-2.2.0 → socha-2.2.2}/CONTRIBUTING.md +28 -17
  9. {socha-2.2.0 → socha-2.2.2}/Cargo.lock +29 -29
  10. {socha-2.2.0 → socha-2.2.2}/Cargo.toml +1 -1
  11. {socha-2.2.0 → socha-2.2.2}/PKG-INFO +15 -9
  12. {socha-2.2.0 → socha-2.2.2}/README.md +13 -8
  13. {socha-2.2.0 → socha-2.2.2}/pyproject.toml +18 -15
  14. {socha-2.2.0 → socha-2.2.2}/python/socha/_socha.pyi +91 -74
  15. {socha-2.2.0 → socha-2.2.2}/python/socha/api/networking/game_client.py +69 -31
  16. {socha-2.2.0 → socha-2.2.2}/python/socha/api/networking/network_socket.py +2 -1
  17. {socha-2.2.0 → socha-2.2.2}/python/socha/api/networking/utils.py +92 -45
  18. {socha-2.2.0 → socha-2.2.2}/python/socha/api/networking/xml_protocol_interface.py +34 -18
  19. {socha-2.2.0 → socha-2.2.2}/python/socha/api/protocol/protocol.py +122 -215
  20. socha-2.2.2/python/socha/api/protocol/protocol_packet.py +10 -0
  21. {socha-2.2.0 → socha-2.2.2}/python/socha/api/protocol/room_message.py +4 -1
  22. socha-2.2.2/python/socha/starter.py +245 -0
  23. socha-2.2.2/python/socha/utils/package_builder.py +254 -0
  24. socha-2.2.2/requirements.txt +1 -0
  25. {socha-2.2.0 → socha-2.2.2}/src/lib.rs +14 -11
  26. {socha-2.2.0 → socha-2.2.2}/src/plugin/actions/accelerate.rs +58 -29
  27. {socha-2.2.0 → socha-2.2.2}/src/plugin/actions/advance.rs +25 -28
  28. {socha-2.2.0 → socha-2.2.2}/src/plugin/actions/push.rs +42 -49
  29. {socha-2.2.0 → socha-2.2.2}/src/plugin/actions/turn.rs +28 -27
  30. {socha-2.2.0 → socha-2.2.2}/src/plugin/actions.rs +19 -17
  31. {socha-2.2.0 → socha-2.2.2}/src/plugin/board.rs +65 -42
  32. {socha-2.2.0 → socha-2.2.2}/src/plugin/coordinate.rs +169 -107
  33. socha-2.2.2/src/plugin/errors/acceleration_errors.rs +44 -0
  34. socha-2.2.2/src/plugin/errors/advance_errors.rs +38 -0
  35. socha-2.2.2/src/plugin/errors/invalid_move_exception.rs +34 -0
  36. {socha-2.2.0 → socha-2.2.2}/src/plugin/errors/movement_error.rs +8 -7
  37. socha-2.2.2/src/plugin/errors/push_error.rs +34 -0
  38. {socha-2.2.0 → socha-2.2.2}/src/plugin/errors/turn_error.rs +8 -5
  39. socha-2.2.2/src/plugin/errors.rs +59 -0
  40. {socha-2.2.0 → socha-2.2.2}/src/plugin/field.rs +17 -13
  41. {socha-2.2.0 → socha-2.2.2}/src/plugin/game_state.rs +97 -424
  42. {socha-2.2.0 → socha-2.2.2}/src/plugin/move.rs +6 -3
  43. {socha-2.2.0 → socha-2.2.2}/src/plugin/segment.rs +49 -23
  44. {socha-2.2.0 → socha-2.2.2}/src/plugin/ship.rs +23 -10
  45. socha-2.2.2/src/plugin/test/game_state.rs +393 -0
  46. socha-2.2.2/src/plugin/test.rs +1 -0
  47. {socha-2.2.0 → socha-2.2.2}/src/plugin.rs +8 -7
  48. socha-2.2.0/.github/workflows/push.yaml +0 -17
  49. socha-2.2.0/python/socha/api/protocol/protocol_packet.py +0 -14
  50. socha-2.2.0/python/socha/starter.py +0 -148
  51. socha-2.2.0/python/socha/utils/package_builder.py +0 -216
  52. socha-2.2.0/requirements.txt +0 -1
  53. socha-2.2.0/src/plugin/errors/acceleration_errors.rs +0 -37
  54. socha-2.2.0/src/plugin/errors/advance_errors.rs +0 -33
  55. socha-2.2.0/src/plugin/errors/invalid_move_exception.rs +0 -34
  56. socha-2.2.0/src/plugin/errors/push_error.rs +0 -33
  57. socha-2.2.0/src/plugin/errors.rs +0 -60
  58. {socha-2.2.0 → socha-2.2.2}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
  59. {socha-2.2.0 → socha-2.2.2}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
  60. {socha-2.2.0 → socha-2.2.2}/.github/pull_request_template.md +0 -0
  61. {socha-2.2.0 → socha-2.2.2}/LICENSE +0 -0
  62. {socha-2.2.0 → socha-2.2.2}/docs/Makefile +0 -0
  63. {socha-2.2.0 → socha-2.2.2}/docs/appending +0 -0
  64. {socha-2.2.0 → socha-2.2.2}/docs/conf.py +0 -0
  65. {socha-2.2.0 → socha-2.2.2}/docs/index.rst +0 -0
  66. {socha-2.2.0 → socha-2.2.2}/docs/make.bat +0 -0
  67. {socha-2.2.0 → socha-2.2.2}/docs/modules.rst +0 -0
  68. {socha-2.2.0 → socha-2.2.2}/docs/requirements.txt +0 -0
  69. {socha-2.2.0 → socha-2.2.2}/python/socha/__init__.py +0 -0
  70. {socha-2.2.0 → socha-2.2.2}/python/socha/api/__init__.py +0 -0
  71. {socha-2.2.0 → socha-2.2.2}/python/socha/api/networking/__init__.py +0 -0
  72. {socha-2.2.0 → socha-2.2.2}/python/socha/api/protocol/__init__.py +0 -0
  73. {socha-2.2.0 → socha-2.2.2}/python/socha/py.typed +0 -0
  74. {socha-2.2.0 → socha-2.2.2}/src/plugin/constants.rs +0 -0
  75. {socha-2.2.0 → socha-2.2.2}/start.sh +0 -0
  76. {socha-2.2.0 → socha-2.2.2}/tests/test_network.py +0 -0
@@ -0,0 +1,10 @@
1
+ version: 2
2
+ updates:
3
+ - package-ecosystem: cargo
4
+ directory: "/"
5
+ schedule:
6
+ interval: "weekly"
7
+ - package-ecosystem: pip
8
+ directory: "/"
9
+ schedule:
10
+ interval: "weekly"
@@ -1,10 +1,8 @@
1
- name: continuous deployment
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: "startsWith(github.ref, 'refs/tags/')"
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: [ master ]
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
@@ -9,13 +9,14 @@ __pycache__/
9
9
  *.so
10
10
 
11
11
  # Distribution / packaging
12
+ socha_builds/
12
13
  .Python
13
14
  .venv/
14
15
  env/
15
16
  bin/
16
17
  build/
17
18
  develop-eggs/
18
- # dist/
19
+ dist/
19
20
  eggs/
20
21
  lib/
21
22
  lib64/
@@ -28,6 +28,6 @@ sphinx:
28
28
  fail_on_warning: false
29
29
 
30
30
  # Python requirements required to build your docs
31
- python:
32
- install:
33
- - requirements: docs/requirements.txt
31
+ python-requirements:
32
+ install:
33
+ - requirements: docs/requirements.txt
@@ -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
- * 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,
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
- * Focusing on what is best not just for us as individuals, but for the
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
- * The use of sexualized language or imagery, and sexual attention or
30
+ - The use of sexualized language or imagery, and sexual attention or
31
31
  advances of any kind
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
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
- * Other conduct which could reasonably be considered inappropriate in a
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, harassment of an
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 [Documentation]().
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 [documentation](). If you are looking for support, you might want to check [this section](#i-have-a-question)).
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 *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.
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 [documentation]() carefully and find out if the functionality is already covered, maybe by an individual configuration.
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
- The authentication system was failing to properly validate users, causing them to be unable to log in.
208
- This change adds additional checks to the authentication process to ensure that users are correctly validated.
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
- Fixes #123.
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.0"
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.2"
21
+ version = "1.1.3"
22
22
  source = "registry+https://github.com/rust-lang/crates.io-index"
23
- checksum = "b2969dcb958b36655471fc61f7e416fa76033bdd4bfed0678d8fee1e2d07a1f0"
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.0"
30
+ version = "1.7.1"
31
31
  source = "registry+https://github.com/rust-lang/crates.io-index"
32
- checksum = "7b3d0060af21e8d11a926981cc00c6c1541aa91dd64b9f881985c3da1094425f"
32
+ checksum = "69f7f8c3906b62b754cd5326047894316021dcfe5a194c8ea52bdd94934a3457"
33
33
 
34
34
  [[package]]
35
35
  name = "autocfg"
36
- version = "1.1.0"
36
+ version = "1.2.0"
37
37
  source = "registry+https://github.com/rust-lang/crates.io-index"
38
- checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa"
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.4"
66
+ version = "2.0.5"
67
67
  source = "registry+https://github.com/rust-lang/crates.io-index"
68
- checksum = "1e186cfbae8084e513daff4240b4797e342f988cecda4fb6c939150f96315fd8"
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.1"
109
+ version = "2.7.2"
110
110
  source = "registry+https://github.com/rust-lang/crates.io-index"
111
- checksum = "523dc4f511e55ab87b694dc30d0f820d60906ef06413f93d4d7a1385599cc149"
111
+ checksum = "6c8640c5d730cb13ebd907d8d04b52f55ac9a2eec55b440c8892f40d56c76c1d"
112
112
 
113
113
  [[package]]
114
114
  name = "memoffset"
115
- version = "0.9.0"
115
+ version = "0.9.1"
116
116
  source = "registry+https://github.com/rust-lang/crates.io-index"
117
- checksum = "5a634b1c61a95585bd15607c6ab0c4e5b226e695ff2800ba0cdccddf208c406c"
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.79"
159
+ version = "1.0.81"
160
160
  source = "registry+https://github.com/rust-lang/crates.io-index"
161
- checksum = "e835ff2298f5721608eb1a980ecaee1aef2c132bf95ecc026a11b7bf3c01c02e"
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.52",
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.52",
237
+ "syn 2.0.59",
238
238
  ]
239
239
 
240
240
  [[package]]
241
241
  name = "quote"
242
- version = "1.0.35"
242
+ version = "1.0.36"
243
243
  source = "registry+https://github.com/rust-lang/crates.io-index"
244
- checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef"
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.3"
307
+ version = "1.10.4"
308
308
  source = "registry+https://github.com/rust-lang/crates.io-index"
309
- checksum = "b62dbe01f0b06f9d8dc7d49e05a0785f153b00b2c227856282f671e0318c9b15"
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.2"
330
+ version = "0.8.3"
331
331
  source = "registry+https://github.com/rust-lang/crates.io-index"
332
- checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f"
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.1"
342
+ version = "1.13.2"
343
343
  source = "registry+https://github.com/rust-lang/crates.io-index"
344
- checksum = "e6ecd384b10a64542d77071bd64bd7b231f4ed5940fba55e98c3de13824cf3d7"
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.52"
359
+ version = "2.0.59"
360
360
  source = "registry+https://github.com/rust-lang/crates.io-index"
361
- checksum = "b699d15b36d1f02c3e7c69f8ffef53de37aefae075d8488d4ba1a7788d574a07"
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.19"
467
+ version = "0.8.20"
468
468
  source = "registry+https://github.com/rust-lang/crates.io-index"
469
- checksum = "0fcb9cbac069e033553e8bb871be2fbdffcab578eb25bd0f7c508cedc6dcd75a"
469
+ checksum = "791978798f0597cfc70478424c2b4fdc2b7a8024aaff78497ef00f24ef674193"
470
470
 
471
471
  [[package]]
472
472
  name = "yaserde"
@@ -1,6 +1,6 @@
1
1
  [package]
2
2
  name = "_socha"
3
- version = "2.2.0"
3
+ version = "2.2.2"
4
4
  edition = "2021"
5
5
 
6
6
  [lib]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: socha
3
- Version: 2.2.0
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 2023. This Season the game will be 'Hey, danke für den Fisch' a.k.a. 'Penguins' in short.
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
  [![Discord](https://img.shields.io/discord/233577109363097601?color=blue&label=Discord)](https://discord.gg/ARZamDptG5)
33
34
  [![Documentation](https://img.shields.io/badge/Software--Challenge%20-Documentation-%234299e1)](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 xsdata==22.7 -d dependencies` in the directory.
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
+