cube-python 0.4.0__tar.gz → 0.5.0__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.
@@ -1,10 +1,10 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cube-python
3
- Version: 0.4.0
3
+ Version: 0.5.0
4
4
  Summary: Python binding for Cube C++ library
5
5
  Author-email: coshz <fsinhx@gmail.com>
6
6
  License: MIT
7
- Project-URL: Documentation, https://github.com/coshz/cube/tree/master/bindings/python#readme
7
+ Project-URL: Documentation, https://github.com/coshz/cube/tree/HEAD/bindings/python#readme
8
8
  Project-URL: Source, https://github.com/coshz/cube
9
9
  Project-URL: Bug Tracker, https://github.com/coshz/cube/issues
10
10
  Keywords: game,rubiks-cube,bindings
@@ -20,8 +20,8 @@ Dynamic: license-file
20
20
  # cube-python
21
21
 
22
22
  [![PyPI version](https://img.shields.io/pypi/v/cube-python.svg)](https://pypi.org/project/cube-python/)
23
- [![License](https://img.shields.io/github/license/yourusername/cube)](https://github.com/yourusername/cube/blob/main/LICENSE)
24
- [![GitHub](https://img.shields.io/badge/github-coshz%2Fcube-blue?logo=github)](https://github.com/coshz/cube/tree/master/bindings/python)
23
+ [![PyPI License](https://img.shields.io/pypi/l/cube-python.svg)](https://pypi.org/project/cube-python/)
24
+ [![GitHub](https://img.shields.io/badge/github-coshz%2Fcube-blue?logo=github)](https://github.com/coshz/cube/tree/HEAD/bindings/python)
25
25
 
26
26
 
27
27
  High-performance Rubik's Cube solver Python bindings powered by C/C++ FFI.
@@ -37,7 +37,7 @@ pip install cube-python
37
37
  ## Quickstart
38
38
 
39
39
  ```python
40
- iimport pycube
40
+ import pycube
41
41
  from pycube import SolveError
42
42
 
43
43
  # Default solved cube string representation
@@ -49,7 +49,7 @@ scrambled = pycube.facecube("U F U' L2 R L' D2 B")
49
49
  if pycube.solvable(scrambled):
50
50
  try:
51
51
  # Find solution sequence
52
- solution = pycube.solve(scrambled, step=30, best=True)
52
+ solution = pycube.solve(scrambled,good=22)
53
53
  print(f"Solution: {solution}")
54
54
 
55
55
  # Apply solution to verify end state
@@ -64,24 +64,25 @@ if pycube.solvable(scrambled):
64
64
 
65
65
  ```python
66
66
  import pycube
67
- from pycube import SolveError, CUBE_ID
67
+ from pycube import SolveError, CUBE_ID, PermFormat
68
68
  ```
69
69
 
70
70
  ### Functions
71
71
 
72
72
  | Function | Description |
73
73
  | :--- | :--- |
74
- | `solve(src, tgt=CUBE_ID, step=30, best=False)` | Solves the cube state string `src`. Returns solution string or raises `SolveError`. |
75
- | `facecube(maneuver, cube=CUBE_ID)` | Applies move sequence (e.g., `"U F U' L2"`) to a cube state and returns the new state. |
74
+ | `solve(src,tgt=CUBE_ID,good=22)` | Solve cube state `src`; stops as soon as a solution <= `good` moves is found. Returns solution string or raises `SolveError`. |
75
+ | `facecube(maneuver,cube=CUBE_ID)` | Applies move sequence (e.g., `"U F U' L2"`) to a cube state and returns the new state. |
76
76
  | `solvable(cube)` | Returns `True` if the 54-character state string is physically solvable. |
77
- | `permutation(ms, fmt=2)` | Returns a permutation representation for a move sequence or state. |
77
+ | `permutation(ms_or_cube,fmt=PermFormat.Cycle)` | Returns a permutation representation for a move sequence or state. |
78
78
 
79
79
  ### Constants & Exceptions
80
80
 
81
81
  | Name | Type | Description |
82
82
  | :--- | :--- | :--- |
83
- | `CUBE_ID` | `str` | Constant representing the standard solved state (`"UUUUUUUUURRRRRRRRRFFFFFFFFFDDDDDDDDDLLLLLLLLLBBBBBBBBB"`). |
84
- | `SolveError` | `Exception` | Raised when the state is invalid, unsolvable, or exceeds search step limits. |
83
+ | `CUBE_ID` | `str` | Constant representing the standard solved state `UUUUUUUUURRRRRRRRRFFFFFFFFFDDDDDDDDDLLLLLLLLLBBBBBBBBB`. |
84
+ | `PermFormat` | `IntEnum` | Permutation output format. Members: `Face`,`Cubie`,`Cycle`. Defaults to `Cycle`. |
85
+ | `SolveError` | `Exception` | Raised when the state is invalid or unsolvable. |
85
86
 
86
87
  ## 📄 License
87
88
 
@@ -1,8 +1,8 @@
1
1
  # cube-python
2
2
 
3
3
  [![PyPI version](https://img.shields.io/pypi/v/cube-python.svg)](https://pypi.org/project/cube-python/)
4
- [![License](https://img.shields.io/github/license/yourusername/cube)](https://github.com/yourusername/cube/blob/main/LICENSE)
5
- [![GitHub](https://img.shields.io/badge/github-coshz%2Fcube-blue?logo=github)](https://github.com/coshz/cube/tree/master/bindings/python)
4
+ [![PyPI License](https://img.shields.io/pypi/l/cube-python.svg)](https://pypi.org/project/cube-python/)
5
+ [![GitHub](https://img.shields.io/badge/github-coshz%2Fcube-blue?logo=github)](https://github.com/coshz/cube/tree/HEAD/bindings/python)
6
6
 
7
7
 
8
8
  High-performance Rubik's Cube solver Python bindings powered by C/C++ FFI.
@@ -18,7 +18,7 @@ pip install cube-python
18
18
  ## Quickstart
19
19
 
20
20
  ```python
21
- iimport pycube
21
+ import pycube
22
22
  from pycube import SolveError
23
23
 
24
24
  # Default solved cube string representation
@@ -30,7 +30,7 @@ scrambled = pycube.facecube("U F U' L2 R L' D2 B")
30
30
  if pycube.solvable(scrambled):
31
31
  try:
32
32
  # Find solution sequence
33
- solution = pycube.solve(scrambled, step=30, best=True)
33
+ solution = pycube.solve(scrambled,good=22)
34
34
  print(f"Solution: {solution}")
35
35
 
36
36
  # Apply solution to verify end state
@@ -45,24 +45,25 @@ if pycube.solvable(scrambled):
45
45
 
46
46
  ```python
47
47
  import pycube
48
- from pycube import SolveError, CUBE_ID
48
+ from pycube import SolveError, CUBE_ID, PermFormat
49
49
  ```
50
50
 
51
51
  ### Functions
52
52
 
53
53
  | Function | Description |
54
54
  | :--- | :--- |
55
- | `solve(src, tgt=CUBE_ID, step=30, best=False)` | Solves the cube state string `src`. Returns solution string or raises `SolveError`. |
56
- | `facecube(maneuver, cube=CUBE_ID)` | Applies move sequence (e.g., `"U F U' L2"`) to a cube state and returns the new state. |
55
+ | `solve(src,tgt=CUBE_ID,good=22)` | Solve cube state `src`; stops as soon as a solution <= `good` moves is found. Returns solution string or raises `SolveError`. |
56
+ | `facecube(maneuver,cube=CUBE_ID)` | Applies move sequence (e.g., `"U F U' L2"`) to a cube state and returns the new state. |
57
57
  | `solvable(cube)` | Returns `True` if the 54-character state string is physically solvable. |
58
- | `permutation(ms, fmt=2)` | Returns a permutation representation for a move sequence or state. |
58
+ | `permutation(ms_or_cube,fmt=PermFormat.Cycle)` | Returns a permutation representation for a move sequence or state. |
59
59
 
60
60
  ### Constants & Exceptions
61
61
 
62
62
  | Name | Type | Description |
63
63
  | :--- | :--- | :--- |
64
- | `CUBE_ID` | `str` | Constant representing the standard solved state (`"UUUUUUUUURRRRRRRRRFFFFFFFFFDDDDDDDDDLLLLLLLLLBBBBBBBBB"`). |
65
- | `SolveError` | `Exception` | Raised when the state is invalid, unsolvable, or exceeds search step limits. |
64
+ | `CUBE_ID` | `str` | Constant representing the standard solved state `UUUUUUUUURRRRRRRRRFFFFFFFFFDDDDDDDDDLLLLLLLLLBBBBBBBBB`. |
65
+ | `PermFormat` | `IntEnum` | Permutation output format. Members: `Face`,`Cubie`,`Cycle`. Defaults to `Cycle`. |
66
+ | `SolveError` | `Exception` | Raised when the state is invalid or unsolvable. |
66
67
 
67
68
  ## 📄 License
68
69
 
@@ -1,10 +1,10 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cube-python
3
- Version: 0.4.0
3
+ Version: 0.5.0
4
4
  Summary: Python binding for Cube C++ library
5
5
  Author-email: coshz <fsinhx@gmail.com>
6
6
  License: MIT
7
- Project-URL: Documentation, https://github.com/coshz/cube/tree/master/bindings/python#readme
7
+ Project-URL: Documentation, https://github.com/coshz/cube/tree/HEAD/bindings/python#readme
8
8
  Project-URL: Source, https://github.com/coshz/cube
9
9
  Project-URL: Bug Tracker, https://github.com/coshz/cube/issues
10
10
  Keywords: game,rubiks-cube,bindings
@@ -20,8 +20,8 @@ Dynamic: license-file
20
20
  # cube-python
21
21
 
22
22
  [![PyPI version](https://img.shields.io/pypi/v/cube-python.svg)](https://pypi.org/project/cube-python/)
23
- [![License](https://img.shields.io/github/license/yourusername/cube)](https://github.com/yourusername/cube/blob/main/LICENSE)
24
- [![GitHub](https://img.shields.io/badge/github-coshz%2Fcube-blue?logo=github)](https://github.com/coshz/cube/tree/master/bindings/python)
23
+ [![PyPI License](https://img.shields.io/pypi/l/cube-python.svg)](https://pypi.org/project/cube-python/)
24
+ [![GitHub](https://img.shields.io/badge/github-coshz%2Fcube-blue?logo=github)](https://github.com/coshz/cube/tree/HEAD/bindings/python)
25
25
 
26
26
 
27
27
  High-performance Rubik's Cube solver Python bindings powered by C/C++ FFI.
@@ -37,7 +37,7 @@ pip install cube-python
37
37
  ## Quickstart
38
38
 
39
39
  ```python
40
- iimport pycube
40
+ import pycube
41
41
  from pycube import SolveError
42
42
 
43
43
  # Default solved cube string representation
@@ -49,7 +49,7 @@ scrambled = pycube.facecube("U F U' L2 R L' D2 B")
49
49
  if pycube.solvable(scrambled):
50
50
  try:
51
51
  # Find solution sequence
52
- solution = pycube.solve(scrambled, step=30, best=True)
52
+ solution = pycube.solve(scrambled,good=22)
53
53
  print(f"Solution: {solution}")
54
54
 
55
55
  # Apply solution to verify end state
@@ -64,24 +64,25 @@ if pycube.solvable(scrambled):
64
64
 
65
65
  ```python
66
66
  import pycube
67
- from pycube import SolveError, CUBE_ID
67
+ from pycube import SolveError, CUBE_ID, PermFormat
68
68
  ```
69
69
 
70
70
  ### Functions
71
71
 
72
72
  | Function | Description |
73
73
  | :--- | :--- |
74
- | `solve(src, tgt=CUBE_ID, step=30, best=False)` | Solves the cube state string `src`. Returns solution string or raises `SolveError`. |
75
- | `facecube(maneuver, cube=CUBE_ID)` | Applies move sequence (e.g., `"U F U' L2"`) to a cube state and returns the new state. |
74
+ | `solve(src,tgt=CUBE_ID,good=22)` | Solve cube state `src`; stops as soon as a solution <= `good` moves is found. Returns solution string or raises `SolveError`. |
75
+ | `facecube(maneuver,cube=CUBE_ID)` | Applies move sequence (e.g., `"U F U' L2"`) to a cube state and returns the new state. |
76
76
  | `solvable(cube)` | Returns `True` if the 54-character state string is physically solvable. |
77
- | `permutation(ms, fmt=2)` | Returns a permutation representation for a move sequence or state. |
77
+ | `permutation(ms_or_cube,fmt=PermFormat.Cycle)` | Returns a permutation representation for a move sequence or state. |
78
78
 
79
79
  ### Constants & Exceptions
80
80
 
81
81
  | Name | Type | Description |
82
82
  | :--- | :--- | :--- |
83
- | `CUBE_ID` | `str` | Constant representing the standard solved state (`"UUUUUUUUURRRRRRRRRFFFFFFFFFDDDDDDDDDLLLLLLLLLBBBBBBBBB"`). |
84
- | `SolveError` | `Exception` | Raised when the state is invalid, unsolvable, or exceeds search step limits. |
83
+ | `CUBE_ID` | `str` | Constant representing the standard solved state `UUUUUUUUURRRRRRRRRFFFFFFFFFDDDDDDDDDLLLLLLLLLBBBBBBBBB`. |
84
+ | `PermFormat` | `IntEnum` | Permutation output format. Members: `Face`,`Cubie`,`Cycle`. Defaults to `Cycle`. |
85
+ | `SolveError` | `Exception` | Raised when the state is invalid or unsolvable. |
85
86
 
86
87
  ## 📄 License
87
88
 
@@ -10,5 +10,4 @@ cxx/cube_amalg.min.cpp
10
10
  pycube/__init__.py
11
11
  pycube/_exceptions.py
12
12
  pycube/_ffi.py
13
- test/test.2.py
14
- test/test_cube.py
13
+ test/test.2.py