wzrdbrain 0.1.0__py3-none-any.whl

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.
wzrdbrain/__init__.py ADDED
@@ -0,0 +1,10 @@
1
+ from .wzrdbrain import generate_combo, generate_trick
2
+
3
+ """
4
+ wzrdbrain: Basic APIs to generate tricks for wizard skating.
5
+ """
6
+
7
+
8
+ __all__ = ["generate_trick", "generate_combo"]
9
+
10
+ __version__ = "0.1.0"
wzrdbrain/wzrdbrain.py ADDED
@@ -0,0 +1,93 @@
1
+ import random
2
+ from typing import Optional
3
+
4
+ # Trick data definitions
5
+ direction = ["front", "back"]
6
+ stance = ["open", "closed"]
7
+ move = [
8
+ "predator",
9
+ "predator one",
10
+ "parallel",
11
+ "tree",
12
+ "gazelle",
13
+ "gazelle s",
14
+ "lion",
15
+ "lion s",
16
+ "toe press",
17
+ "heel press",
18
+ "toe roll",
19
+ "heel roll",
20
+ "360",
21
+ "180",
22
+ "parallel slide",
23
+ "soul slide",
24
+ "acid slide",
25
+ "mizu slide",
26
+ "star slide",
27
+ "fast slide",
28
+ "back slide",
29
+ ]
30
+ exclude_stance = [
31
+ "predator",
32
+ "predator one",
33
+ "toe press",
34
+ "toe roll",
35
+ "heel press",
36
+ "heel roll",
37
+ "360",
38
+ "180",
39
+ "parallel slide",
40
+ "soul slide",
41
+ "acid slide",
42
+ "mizu slide",
43
+ "star slide",
44
+ "fast slide",
45
+ "back slide",
46
+ ]
47
+ use_fakie = [
48
+ "toe press",
49
+ "toe roll",
50
+ "heel press",
51
+ "heel roll",
52
+ "360",
53
+ "180",
54
+ "parallel slide",
55
+ "soul slide",
56
+ "acid slide",
57
+ "mizu slide",
58
+ "star slide",
59
+ "fast slide",
60
+ "back slide",
61
+ ]
62
+
63
+
64
+ # Generate a trick
65
+ def generate_trick() -> list[str]:
66
+ selected_move = random.choice(move)
67
+ trick = [random.choice(direction)]
68
+
69
+ if selected_move not in exclude_stance:
70
+ trick.append(random.choice(stance))
71
+
72
+ trick.append(selected_move)
73
+ return trick
74
+
75
+
76
+ # Generate a combination of tricks. Default setting is random, between 1-5 tricks.
77
+ def generate_combo(num_of_tricks: Optional[int] = None) -> list[str]:
78
+ if num_of_tricks is None:
79
+ num_of_tricks = random.randint(1, 5)
80
+
81
+ trick_line: list[str] = []
82
+ for i in range(num_of_tricks):
83
+ trick_parts = generate_trick()
84
+ # If the move uses the fakie semantics, convert the direction "front"/"back" to "forward"/"fakie"
85
+ if trick_parts:
86
+ move_name = trick_parts[-1]
87
+ if move_name in use_fakie:
88
+ if trick_parts[0] == "back":
89
+ trick_parts[0] = "fakie"
90
+ elif trick_parts[0] == "front":
91
+ trick_parts[0] = "forward"
92
+ trick_line.append(" ".join(trick_parts))
93
+ return trick_line
@@ -0,0 +1,107 @@
1
+ Metadata-Version: 2.4
2
+ Name: wzrdbrain
3
+ Version: 0.1.0
4
+ Summary: Basic APIs to generate tricks for wizard skating.
5
+ Project-URL: Homepage, https://github.com/nazroll/wzrdbrain
6
+ Project-URL: Documentation, https://github.com/nazroll/wzrdbrain#readme
7
+ Project-URL: Repository, https://github.com/nazroll/wzrdbrain
8
+ Project-URL: Issues, https://github.com/nazroll/wzrdbrain/issues
9
+ Author: nazroll
10
+ License: MIT License
11
+
12
+ Copyright (c) 2025 Nazrul Kamaruddin
13
+
14
+ Permission is hereby granted, free of charge, to any person obtaining a copy
15
+ of this software and associated documentation files (the "Software"), to deal
16
+ in the Software without restriction, including without limitation the rights
17
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
18
+ copies of the Software, and to permit persons to whom the Software is
19
+ furnished to do so, subject to the following conditions:
20
+
21
+ The above copyright notice and this permission notice shall be included in
22
+ all copies or substantial portions of the Software.
23
+
24
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
25
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
26
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
27
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
28
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
29
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
30
+ THE SOFTWARE.
31
+ License-File: LICENSE
32
+ Keywords: generator,inline skating,random,tricks,wizard skating
33
+ Classifier: Development Status :: 3 - Alpha
34
+ Classifier: Intended Audience :: Developers
35
+ Classifier: License :: OSI Approved :: MIT License
36
+ Classifier: Programming Language :: Python
37
+ Classifier: Programming Language :: Python :: 3
38
+ Classifier: Programming Language :: Python :: 3 :: Only
39
+ Classifier: Programming Language :: Python :: 3.9
40
+ Classifier: Programming Language :: Python :: 3.10
41
+ Classifier: Programming Language :: Python :: 3.11
42
+ Classifier: Programming Language :: Python :: 3.12
43
+ Classifier: Programming Language :: Python :: 3.13
44
+ Classifier: Topic :: Games/Entertainment
45
+ Classifier: Topic :: Software Development :: Libraries
46
+ Classifier: Typing :: Typed
47
+ Requires-Python: >=3.9
48
+ Provides-Extra: dev
49
+ Requires-Dist: black>=24.3; extra == 'dev'
50
+ Requires-Dist: build>=1.2; extra == 'dev'
51
+ Requires-Dist: mypy>=1.10; extra == 'dev'
52
+ Requires-Dist: pytest>=8; extra == 'dev'
53
+ Requires-Dist: ruff>=0.5; extra == 'dev'
54
+ Description-Content-Type: text/markdown
55
+
56
+ # wzrdbrain
57
+
58
+ Basic APIs to generate tricks for wizard skating.
59
+
60
+ ## Installation
61
+
62
+ ```bash
63
+ pip install wzrdbrain
64
+ ```
65
+
66
+ ## Usage
67
+
68
+ ```python
69
+ from wzrdbrain import generate_trick, generate_tricks
70
+
71
+ # Single trick (random)
72
+ print(generate_trick()) # e.g., "Front Open Lion"
73
+
74
+ # Multiple tricks
75
+ print(generate_combo(5)) # Maximum of 5 tricks in a combo (duplicates allowed)
76
+ ```
77
+
78
+ ## Development
79
+
80
+ ```bash
81
+ # clone your repo
82
+ python -m venv .venv
83
+ source .venv/bin/activate # on Windows: .venv\Scripts\activate
84
+ pip install -e ".[dev]"
85
+
86
+ # lint + format
87
+ ruff check .
88
+ black .
89
+
90
+ # type-check
91
+ mypy .
92
+
93
+ # tests
94
+ pytest
95
+ ```
96
+
97
+ ## Release
98
+
99
+ 1. Update version in `pyproject.toml` and `src/wzrdbrain/__init__.py`.
100
+ 2. Create a Git tag and GitHub Release, e.g. `v0.1.0`.
101
+ 3. The release workflow will build and publish to PyPI via Trusted Publishing.
102
+
103
+ ## Notes
104
+
105
+ - Reproducibility: Set `seed` to get the same result across runs.
106
+ - Categories: Use `categories()` to see available groups and restrict generation.
107
+ - Typing: This library ships `py.typed` for type checkers.
@@ -0,0 +1,6 @@
1
+ wzrdbrain/__init__.py,sha256=trIv6PSyva-qbi3Qjyzu7PAvkZoFT33709p47wHFXFg,196
2
+ wzrdbrain/wzrdbrain.py,sha256=VeVdgaGD62kRz8qv3vFlpNMKd87X6di4oWXVAJxujP4,2067
3
+ wzrdbrain-0.1.0.dist-info/METADATA,sha256=nrpSLlJHxEuaVHAe-AfMOaBZG6JNahsZz_NR9HQdAeU,3708
4
+ wzrdbrain-0.1.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
5
+ wzrdbrain-0.1.0.dist-info/licenses/LICENSE,sha256=Hy5x7SjmbSRYLupIQI0bKAlfdZadCRV6Ka3XCXQrbAo,1073
6
+ wzrdbrain-0.1.0.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: hatchling 1.27.0
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Nazrul Kamaruddin
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.