mapFolding 0.12.3__py3-none-any.whl → 0.13.1__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.
- mapFolding/basecamp.py +6 -6
- mapFolding/dataBaskets.py +38 -51
- mapFolding/oeis.py +1 -1
- mapFolding/someAssemblyRequired/RecipeJob.py +82 -82
- mapFolding/someAssemblyRequired/_toolkitContainers.py +3 -3
- mapFolding/someAssemblyRequired/makeAllModules.py +8 -11
- mapFolding/someAssemblyRequired/makeJobTheorem2Numba.py +10 -35
- mapFolding/someAssemblyRequired/makeJobTheorem2codon.py +196 -0
- mapFolding/someAssemblyRequired/toolkitNumba.py +10 -8
- {tests → mapFolding/tests}/__init__.py +2 -2
- {tests → mapFolding/tests}/conftest.py +232 -63
- {tests → mapFolding/tests}/test_computations.py +36 -14
- {tests → mapFolding/tests}/test_filesystem.py +10 -13
- {tests → mapFolding/tests}/test_oeis.py +5 -19
- {tests → mapFolding/tests}/test_other.py +6 -6
- {tests → mapFolding/tests}/test_tasks.py +5 -5
- {mapfolding-0.12.3.dist-info → mapfolding-0.13.1.dist-info}/METADATA +18 -27
- {mapfolding-0.12.3.dist-info → mapfolding-0.13.1.dist-info}/RECORD +22 -21
- {mapfolding-0.12.3.dist-info → mapfolding-0.13.1.dist-info}/top_level.txt +0 -1
- {mapfolding-0.12.3.dist-info → mapfolding-0.13.1.dist-info}/WHEEL +0 -0
- {mapfolding-0.12.3.dist-info → mapfolding-0.13.1.dist-info}/entry_points.txt +0 -0
- {mapfolding-0.12.3.dist-info → mapfolding-0.13.1.dist-info}/licenses/LICENSE +0 -0
|
@@ -29,7 +29,7 @@ from collections.abc import Callable
|
|
|
29
29
|
from hunterMakesPy.pytestForYourUse import PytestFor_defineConcurrencyLimit
|
|
30
30
|
from mapFolding import (
|
|
31
31
|
countFolds, getFoldsTotalKnown, getLeavesTotal, getTaskDivisions, setProcessorLimit, validateListDimensions)
|
|
32
|
-
from tests.conftest import standardizedEqualToCallableReturn
|
|
32
|
+
from mapFolding.tests.conftest import standardizedEqualToCallableReturn
|
|
33
33
|
from typing import Literal
|
|
34
34
|
import multiprocessing
|
|
35
35
|
import pytest
|
|
@@ -60,10 +60,10 @@ def test_countFolds_cpuLimitOopsie(mapShapeTestFunctionality: tuple[int, ...], C
|
|
|
60
60
|
(["invalid"], 4, [19, 23], ValueError),
|
|
61
61
|
(20, 4, [3,5], ValueError)
|
|
62
62
|
])
|
|
63
|
-
def test_getTaskDivisions(computationDivisions:
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
63
|
+
def test_getTaskDivisions(computationDivisions: Literal['maximum', 'cpu', 20] | None | list[str]
|
|
64
|
+
, concurrencyLimit: Literal[4]
|
|
65
|
+
, listDimensions: list[int]
|
|
66
|
+
, expectedTaskDivisions: Literal[0, 77, 4] | type[ValueError]) -> None:
|
|
67
67
|
mapShape = validateListDimensions(listDimensions)
|
|
68
68
|
leavesTotal = getLeavesTotal(mapShape)
|
|
69
69
|
standardizedEqualToCallableReturn(expectedTaskDivisions, getTaskDivisions, computationDivisions, concurrencyLimit, leavesTotal)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: mapFolding
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.13.1
|
|
4
4
|
Summary: Map folding algorithm with code transformation framework for optimizing numerical computations.
|
|
5
5
|
Author-email: Hunter Hogan <HunterHogan@pm.me>
|
|
6
6
|
License: CC-BY-NC-4.0
|
|
@@ -8,42 +8,49 @@ Project-URL: Donate, https://www.patreon.com/integrated
|
|
|
8
8
|
Project-URL: Homepage, https://github.com/hunterhogan/mapFolding
|
|
9
9
|
Project-URL: Issues, https://github.com/hunterhogan/mapFolding/issues
|
|
10
10
|
Project-URL: Repository, https://github.com/hunterhogan/mapFolding.git
|
|
11
|
-
Keywords: A000136,A001415,A001416,A001417,A001418,A195646,AST manipulation,Numba optimization,OEIS,algorithmic optimization,code generation,code transformation,combinatorics,computational geometry,dataclass transformation,folding pattern enumeration,just-in-time compilation,map folding,performance optimization,source code analysis,stamp folding
|
|
11
|
+
Keywords: A000136,A001415,A001416,A001417,A001418,A195646,AST manipulation,Numba optimization,OEIS,algorithmic optimization,code generation,code transformation,codon optimization,combinatorics,computational geometry,dataclass transformation,folding pattern enumeration,just-in-time compilation,map folding,performance optimization,source code analysis,stamp folding
|
|
12
12
|
Classifier: Development Status :: 4 - Beta
|
|
13
13
|
Classifier: Environment :: Console
|
|
14
14
|
Classifier: Intended Audience :: Developers
|
|
15
15
|
Classifier: Intended Audience :: Education
|
|
16
16
|
Classifier: Intended Audience :: Science/Research
|
|
17
17
|
Classifier: Natural Language :: English
|
|
18
|
+
Classifier: Operating System :: MacOS
|
|
18
19
|
Classifier: Operating System :: OS Independent
|
|
19
|
-
Classifier:
|
|
20
|
-
Classifier: Programming Language :: Python :: 3
|
|
20
|
+
Classifier: Operating System :: POSIX :: Linux
|
|
21
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
21
22
|
Classifier: Programming Language :: Python :: 3.12
|
|
22
23
|
Classifier: Programming Language :: Python :: 3.13
|
|
24
|
+
Classifier: Programming Language :: Python :: 3
|
|
25
|
+
Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
26
|
+
Classifier: Programming Language :: Python
|
|
23
27
|
Classifier: Topic :: Scientific/Engineering :: Information Analysis
|
|
24
28
|
Classifier: Topic :: Scientific/Engineering :: Mathematics
|
|
25
29
|
Classifier: Topic :: Software Development :: Code Generators
|
|
26
30
|
Classifier: Topic :: Software Development :: Compilers
|
|
27
31
|
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
32
|
+
Classifier: Topic :: Software Development :: Pre-processors
|
|
28
33
|
Classifier: Typing :: Typed
|
|
29
34
|
Requires-Python: >=3.12
|
|
30
35
|
Description-Content-Type: text/markdown
|
|
31
36
|
License-File: LICENSE
|
|
32
|
-
Requires-Dist: astToolkit
|
|
37
|
+
Requires-Dist: astToolkit
|
|
33
38
|
Requires-Dist: hunterMakesPy
|
|
34
|
-
Requires-Dist: numba
|
|
35
|
-
Requires-Dist: numba_progress
|
|
36
39
|
Requires-Dist: numpy
|
|
37
40
|
Requires-Dist: platformdirs
|
|
38
41
|
Provides-Extra: development
|
|
39
42
|
Requires-Dist: mypy; extra == "development"
|
|
40
43
|
Requires-Dist: pyupgrade; extra == "development"
|
|
41
44
|
Requires-Dist: setuptools-scm; extra == "development"
|
|
45
|
+
Provides-Extra: numba
|
|
46
|
+
Requires-Dist: numba; extra == "numba"
|
|
47
|
+
Requires-Dist: numba_progress; extra == "numba"
|
|
42
48
|
Provides-Extra: testing
|
|
43
|
-
Requires-Dist:
|
|
49
|
+
Requires-Dist: numba; extra == "testing"
|
|
44
50
|
Requires-Dist: pytest-cov; extra == "testing"
|
|
45
51
|
Requires-Dist: pytest-env; extra == "testing"
|
|
46
52
|
Requires-Dist: pytest-xdist; extra == "testing"
|
|
53
|
+
Requires-Dist: pytest; extra == "testing"
|
|
47
54
|
Dynamic: license-file
|
|
48
55
|
|
|
49
56
|
# mapFolding
|
|
@@ -94,6 +101,7 @@ For larger maps, these calculations require hours or days to complete. A 2×20 s
|
|
|
94
101
|
- **Automatic code generation** that produces standalone, highly optimized computation modules
|
|
95
102
|
- **Dataclass decomposition** to enable Numba compatibility while preserving readable source code
|
|
96
103
|
- **Comprehensive optimization** including dead code elimination, static value embedding, and aggressive compilation settings
|
|
104
|
+
- **codon code generation**: compile map folding computation modules using [Codon](https://docs.exaloop.io/start/install/), enabling high-performance native binaries from Python source code.
|
|
97
105
|
|
|
98
106
|
### Educational Resources
|
|
99
107
|
|
|
@@ -106,35 +114,18 @@ For larger maps, these calculations require hours or days to complete. A 2×20 s
|
|
|
106
114
|
|
|
107
115
|
**Mathematical Research**: Explore folding pattern properties, extend known sequences, or validate theoretical results against computed values.
|
|
108
116
|
|
|
109
|
-
**Algorithm Optimization Learning**: Study a complete transformation
|
|
117
|
+
**Algorithm Optimization Learning**: Study a complete transformation assembly line that converts high-level algorithms into production-ready optimized code.
|
|
110
118
|
|
|
111
119
|
**Performance Computing Education**: Examine techniques for achieving maximum Python performance through Numba integration, AST manipulation, and specialized code generation.
|
|
112
120
|
|
|
113
121
|
**Combinatorial Problem Solving**: Use the framework as a template for optimizing other recursive combinatorial algorithms.
|
|
114
122
|
|
|
115
|
-
## Example Usage
|
|
116
|
-
|
|
117
|
-
```python
|
|
118
|
-
from mapFolding import countFolds
|
|
119
|
-
|
|
120
|
-
# Count folding patterns for a 3×3 square
|
|
121
|
-
result = countFolds([3, 3])
|
|
122
|
-
|
|
123
|
-
# Access OEIS sequences directly
|
|
124
|
-
from mapFolding import oeisIDfor_n
|
|
125
|
-
strip_foldings = oeisIDfor_n('A001415', 6) # 2×6 strip
|
|
126
|
-
|
|
127
|
-
# Generate optimized code for specific dimensions
|
|
128
|
-
from mapFolding.someAssemblyRequired import makeJobTheorem2Numba
|
|
129
|
-
# Creates specialized modules for maximum performance
|
|
130
|
-
```
|
|
131
|
-
|
|
132
123
|
## Repository Structure
|
|
133
124
|
|
|
134
125
|
- `mapFolding/`: Core implementation with modular architecture
|
|
135
126
|
- `reference/`: Historical algorithm implementations and performance studies
|
|
136
127
|
- `someAssemblyRequired/`: AST transformation framework
|
|
137
|
-
- `tests/`: Comprehensive validation suite
|
|
128
|
+
- `mapFolding/tests/`: Comprehensive validation suite
|
|
138
129
|
- `jobs/`: Generated optimized modules for specific calculations
|
|
139
130
|
|
|
140
131
|
## Performance Characteristics
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
mapFolding/__init__.py,sha256=dl3HR2zoipFo0UstEJn3iWTkXlA_XeCQw_zfw2fk4qE,3643
|
|
2
2
|
mapFolding/_theSSOT.py,sha256=dloMAsIOhUnIE7-SFJbQYyl6IYo7CdCAyBZPqMuckko,3380
|
|
3
3
|
mapFolding/_theTypes.py,sha256=rT8UTm-I_haMQlUGaJ4yvqIMt6FUOvWH-VUYNud6UN4,5495
|
|
4
|
-
mapFolding/basecamp.py,sha256=
|
|
4
|
+
mapFolding/basecamp.py,sha256=K-h8rBb-lREOe8DAdWLx5Uqbl5eaPjj8lRLk5HIVw40,9454
|
|
5
5
|
mapFolding/beDRY.py,sha256=Iikg3U4zQjx6JOKL62R7Tb0CpOm3JkPSIewAByco9GA,14777
|
|
6
6
|
mapFolding/daoOfMapFolding.py,sha256=ncTIiBfTsM8SNVx9qefZ0bBcBtviWLSk4iPv3Z9nGiE,5442
|
|
7
|
-
mapFolding/dataBaskets.py,sha256=
|
|
7
|
+
mapFolding/dataBaskets.py,sha256=zTpRoGDEysq7ekmgiKCtCV6NOBGzfgs_XMjVngvg3ic,14566
|
|
8
8
|
mapFolding/filesystemToolkit.py,sha256=Ex5tyugRQurXIgUNVtkQYfWMq8fM4e-izX01MBXU5_8,11006
|
|
9
|
-
mapFolding/oeis.py,sha256=
|
|
9
|
+
mapFolding/oeis.py,sha256=jJjTsngcUNTY0M8et1InbnpP2csglQilFidyVCCm0Ts,23031
|
|
10
10
|
mapFolding/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
11
11
|
mapFolding/reference/__init__.py,sha256=GKcSgYE49NcTISx-JZbELXyq-eRkMeTL5g4DXInWFw0,2206
|
|
12
12
|
mapFolding/reference/flattened.py,sha256=0eHgLFIeIeVUsI5zF5oSy5iWYrjOMzxr7KjDxiTe01k,16078
|
|
@@ -20,15 +20,16 @@ mapFolding/reference/total_countPlus1vsPlusN.py,sha256=yJZAVLVdoXqHag2_N6_6CT-Q6
|
|
|
20
20
|
mapFolding/reference/jobsCompleted/__init__.py,sha256=TU93ZGUW1xEkT6d9mQFn_rp5DvRy0ZslEB2Q6MF5ZDc,2596
|
|
21
21
|
mapFolding/reference/jobsCompleted/[2x19]/p2x19.py,sha256=_tvYtfzMWVo2VtUbIAieoscb4N8FFflgTdW4-ljBUuA,19626
|
|
22
22
|
mapFolding/reference/jobsCompleted/p2x19/p2x19.py,sha256=eZEw4Me4ocTt6VXoK2-Sbd5SowZtxRIbN9dZmc7OCVg,6395
|
|
23
|
-
mapFolding/someAssemblyRequired/RecipeJob.py,sha256=
|
|
23
|
+
mapFolding/someAssemblyRequired/RecipeJob.py,sha256=yGGPHq9JX-Gf7QlJz50EPpkO7sADwGvSZNA1aC_F_PQ,9866
|
|
24
24
|
mapFolding/someAssemblyRequired/__init__.py,sha256=UNDh6O86jT5ywlw9LgeWsUHwOfNvoMJRDAzYXbwCbeM,5779
|
|
25
25
|
mapFolding/someAssemblyRequired/_toolIfThis.py,sha256=VDZC10Xo3E1Y5n6FmaBBbOBR-rinV9DFkpgw8zrDyzg,6339
|
|
26
|
-
mapFolding/someAssemblyRequired/_toolkitContainers.py,sha256=
|
|
26
|
+
mapFolding/someAssemblyRequired/_toolkitContainers.py,sha256=vRmetlZI1Kxhe6qjw7ysHeARn5e6F5hmB6ib2BCRxtE,13614
|
|
27
27
|
mapFolding/someAssemblyRequired/getLLVMforNoReason.py,sha256=tY0-2K0BFkwLAAjSrFJLPoG8CevDHOFc3OH3TxXANzg,2806
|
|
28
28
|
mapFolding/someAssemblyRequired/infoBooth.py,sha256=GWiqnHbqk7te_pvVuk4G_gbFa_W2aeSx19w4pakvqfM,2300
|
|
29
|
-
mapFolding/someAssemblyRequired/makeAllModules.py,sha256=
|
|
30
|
-
mapFolding/someAssemblyRequired/makeJobTheorem2Numba.py,sha256=
|
|
31
|
-
mapFolding/someAssemblyRequired/
|
|
29
|
+
mapFolding/someAssemblyRequired/makeAllModules.py,sha256=o22qQ35N9M3N3kra16IayOpXMI1bkwVNQ5c04_rxMGw,44295
|
|
30
|
+
mapFolding/someAssemblyRequired/makeJobTheorem2Numba.py,sha256=ZSplXKPwRAbvMA2bvEGcXFdgvuYGBk3Ncxajzk-Zy0A,17170
|
|
31
|
+
mapFolding/someAssemblyRequired/makeJobTheorem2codon.py,sha256=06FfCgHJDmNFv8li0v0O82Te8FvlFIOCm4OEMZ1EiRM,10160
|
|
32
|
+
mapFolding/someAssemblyRequired/toolkitNumba.py,sha256=nCCVsGidAlcKRVAvA__hu4bXtat3B-cO9YloKtqOAc4,14919
|
|
32
33
|
mapFolding/someAssemblyRequired/transformationTools.py,sha256=nPGZsvb5GquaCCxdDh_XzNIZYSiVJpWKd7wfhfRvxnk,11512
|
|
33
34
|
mapFolding/syntheticModules/__init__.py,sha256=evVFqhCGa-WZKDiLcnQWjs-Bj34eRnfSLqz_d7dFYZY,83
|
|
34
35
|
mapFolding/syntheticModules/countParallel.py,sha256=OK_IB9w4yy9MMAiGvkei5ezPm_00v2nYjPrQZ_IlELg,7733
|
|
@@ -38,16 +39,16 @@ mapFolding/syntheticModules/initializeCount.py,sha256=nWSlJMMfIM3DvZxMn6ISQusUJq
|
|
|
38
39
|
mapFolding/syntheticModules/theorem2.py,sha256=9jrbZNNX4BWYZW1S0JjvRY2k7RU7I1RNUMV7JdCt1ZY,3017
|
|
39
40
|
mapFolding/syntheticModules/theorem2Numba.py,sha256=-cKjNyxgUMFhEyFVs0VJ7hw4LfrV0WSNK5tPYbQ1oNU,3369
|
|
40
41
|
mapFolding/syntheticModules/theorem2Trimmed.py,sha256=DHW3NxBdtABQYBKm2WRvfQ5kzc2_UwGI2h4ePuYEJoM,2685
|
|
41
|
-
|
|
42
|
-
tests/
|
|
43
|
-
tests/
|
|
44
|
-
tests/
|
|
45
|
-
tests/
|
|
46
|
-
tests/
|
|
47
|
-
tests/
|
|
48
|
-
|
|
49
|
-
mapfolding-0.
|
|
50
|
-
mapfolding-0.
|
|
51
|
-
mapfolding-0.
|
|
52
|
-
mapfolding-0.
|
|
53
|
-
mapfolding-0.
|
|
42
|
+
mapFolding/tests/__init__.py,sha256=QVCHSMFVvTxV3mAyYOLkMFAFyBJ514zdoVnDmpBJnTo,1336
|
|
43
|
+
mapFolding/tests/conftest.py,sha256=f0JB_e5zbpusGLWVJbtYKug9oRm0M8c-GFAp9mhhs9Q,14590
|
|
44
|
+
mapFolding/tests/test_computations.py,sha256=7avZjmYjsgJAcTEzQFj3Td1N9q75ANdCRnNvOesFjiw,6535
|
|
45
|
+
mapFolding/tests/test_filesystem.py,sha256=0rYQ62f4e3HOoymXrxDWbqNEBJQ7DGN8RUOMI84tE2Q,3892
|
|
46
|
+
mapFolding/tests/test_oeis.py,sha256=Sn3jpg6YQJMtAAc1W8Ic2PTbTwSckzBdJnkN1rz_O6w,5834
|
|
47
|
+
mapFolding/tests/test_other.py,sha256=ScBiJ78LnyAaW-RhxcouX6Xw10wgpSdqfvT4LO3WjnQ,4766
|
|
48
|
+
mapFolding/tests/test_tasks.py,sha256=_pr9JRWjjNKA7sww70XvkJJdGPruBVzubM63RmD_Du0,4013
|
|
49
|
+
mapfolding-0.13.1.dist-info/licenses/LICENSE,sha256=NxH5Y8BdC-gNU-WSMwim3uMbID2iNDXJz7fHtuTdXhk,19346
|
|
50
|
+
mapfolding-0.13.1.dist-info/METADATA,sha256=mBuToDW06Q7w6hF6KNus2yvB9FQ-V7Lsd958OEXcYrk,8040
|
|
51
|
+
mapfolding-0.13.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
52
|
+
mapfolding-0.13.1.dist-info/entry_points.txt,sha256=F3OUeZR1XDTpoH7k3wXuRb3KF_kXTTeYhu5AGK1SiOQ,146
|
|
53
|
+
mapfolding-0.13.1.dist-info/top_level.txt,sha256=aG3bjFBoxxuaV3Iu1wZAd241Ubs3cdaJtKYBQBDIjsg,11
|
|
54
|
+
mapfolding-0.13.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|