mapFolding 0.9.0__py3-none-any.whl → 0.9.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/beDRY.py +1 -2
- mapFolding/oeis.py +20 -14
- mapFolding/someAssemblyRequired/RecipeJob.py +103 -0
- mapFolding/someAssemblyRequired/__init__.py +29 -29
- mapFolding/someAssemblyRequired/_tool_Make.py +1 -1
- mapFolding/someAssemblyRequired/_toolboxAntecedents.py +12 -0
- mapFolding/someAssemblyRequired/_toolboxContainers.py +27 -27
- mapFolding/someAssemblyRequired/_toolboxPython.py +3 -0
- mapFolding/someAssemblyRequired/synthesizeNumbaJob.py +58 -26
- mapFolding/someAssemblyRequired/toolboxNumba.py +19 -212
- mapFolding/someAssemblyRequired/transformationTools.py +154 -7
- mapFolding/syntheticModules/{numbaCount_doTheNeedful.py → numbaCount.py} +7 -4
- mapFolding/theDao.py +19 -16
- mapFolding/theSSOT.py +19 -9
- {mapfolding-0.9.0.dist-info → mapfolding-0.9.1.dist-info}/METADATA +1 -1
- {mapfolding-0.9.0.dist-info → mapfolding-0.9.1.dist-info}/RECORD +21 -20
- tests/test_computations.py +2 -1
- {mapfolding-0.9.0.dist-info → mapfolding-0.9.1.dist-info}/WHEEL +0 -0
- {mapfolding-0.9.0.dist-info → mapfolding-0.9.1.dist-info}/entry_points.txt +0 -0
- {mapfolding-0.9.0.dist-info → mapfolding-0.9.1.dist-info}/licenses/LICENSE +0 -0
- {mapfolding-0.9.0.dist-info → mapfolding-0.9.1.dist-info}/top_level.txt +0 -0
mapFolding/theSSOT.py
CHANGED
|
@@ -19,12 +19,13 @@ to avoid namespace collisions when transforming algorithms.
|
|
|
19
19
|
from collections.abc import Callable
|
|
20
20
|
from importlib import import_module as importlib_import_module
|
|
21
21
|
from inspect import getfile as inspect_getfile
|
|
22
|
-
from numpy import dtype, int64 as numpy_int64, int16 as numpy_int16, integer, ndarray
|
|
22
|
+
from numpy import dtype, int64 as numpy_int64, int16 as numpy_int16, integer, ndarray, uint8 as numpy_uint8
|
|
23
23
|
from pathlib import Path
|
|
24
24
|
from tomli import load as tomli_load
|
|
25
25
|
from types import ModuleType
|
|
26
26
|
from typing import Any, TypeAlias, TypeVar
|
|
27
27
|
import dataclasses
|
|
28
|
+
from numba import int64, uint8
|
|
28
29
|
|
|
29
30
|
# Evaluate When Packaging https://github.com/hunterhogan/mapFolding/issues/18
|
|
30
31
|
try:
|
|
@@ -42,10 +43,10 @@ def getPathPackageINSTALLING() -> Path:
|
|
|
42
43
|
# I believe these values should be dynamically determined, so I have conspicuously marked them "HARDCODED"
|
|
43
44
|
# and created downstream logic that assumes the values were dynamically determined.
|
|
44
45
|
# Figure out dynamic flow control to synthesized modules https://github.com/hunterhogan/mapFolding/issues/4
|
|
45
|
-
logicalPathModuleDispatcherHARDCODED: str = 'mapFolding.syntheticModules.
|
|
46
|
+
logicalPathModuleDispatcherHARDCODED: str = 'mapFolding.syntheticModules.numbaCount'
|
|
46
47
|
callableDispatcherHARDCODED: str = 'doTheNeedful'
|
|
47
48
|
concurrencyPackageHARDCODED = 'multiprocessing'
|
|
48
|
-
# from mapFolding.someAssemblyRequired.
|
|
49
|
+
# from mapFolding.someAssemblyRequired.toolboxNumba.theNumbaFlow
|
|
49
50
|
|
|
50
51
|
# PackageSettings in theSSOT.py and immutability https://github.com/hunterhogan/mapFolding/issues/11
|
|
51
52
|
@dataclasses.dataclass
|
|
@@ -150,15 +151,21 @@ The = PackageSettings(logicalPathModuleDispatcher=logicalPathModuleDispatcherHAR
|
|
|
150
151
|
|
|
151
152
|
NumPyIntegerType = TypeVar('NumPyIntegerType', bound=integer[Any], covariant=True)
|
|
152
153
|
|
|
153
|
-
DatatypeLeavesTotal: TypeAlias = int
|
|
154
|
-
NumPyLeavesTotal: TypeAlias =
|
|
154
|
+
# DatatypeLeavesTotal: TypeAlias = int
|
|
155
|
+
NumPyLeavesTotal: TypeAlias = numpy_uint8
|
|
156
|
+
# NumPyLeavesTotal: TypeAlias = numpy_int16 # this would be uint8, but mapShape (2,2,2,2, 2,2,2,2) has 256 leaves, so generic containers must accommodate at least 256 leaves
|
|
155
157
|
|
|
156
|
-
DatatypeElephino: TypeAlias = int
|
|
157
|
-
NumPyElephino: TypeAlias =
|
|
158
|
+
# DatatypeElephino: TypeAlias = int
|
|
159
|
+
NumPyElephino: TypeAlias = numpy_uint8
|
|
160
|
+
# NumPyElephino: TypeAlias = numpy_int16
|
|
158
161
|
|
|
159
|
-
DatatypeFoldsTotal: TypeAlias = int
|
|
162
|
+
# DatatypeFoldsTotal: TypeAlias = int
|
|
160
163
|
NumPyFoldsTotal: TypeAlias = numpy_int64
|
|
161
164
|
|
|
165
|
+
DatatypeLeavesTotal = uint8
|
|
166
|
+
DatatypeElephino = uint8
|
|
167
|
+
DatatypeFoldsTotal = int64
|
|
168
|
+
|
|
162
169
|
Array3D: TypeAlias = ndarray[tuple[int, int, int], dtype[NumPyLeavesTotal]]
|
|
163
170
|
Array1DLeavesTotal: TypeAlias = ndarray[tuple[int], dtype[NumPyLeavesTotal]]
|
|
164
171
|
Array1DElephino: TypeAlias = ndarray[tuple[int], dtype[NumPyElephino]]
|
|
@@ -244,16 +251,19 @@ class ComputationState:
|
|
|
244
251
|
indexMiniGap: DatatypeElephino = DatatypeElephino(0)
|
|
245
252
|
"""Index used when filtering common gaps."""
|
|
246
253
|
|
|
247
|
-
leaf1ndex:
|
|
254
|
+
leaf1ndex: DatatypeLeavesTotal = DatatypeLeavesTotal(1)
|
|
248
255
|
"""Active leaf being processed in the folding algorithm. Starts at 1, not 0."""
|
|
249
256
|
|
|
250
257
|
leafConnectee: DatatypeElephino = DatatypeElephino(0)
|
|
251
258
|
"""Leaf that is being connected to the active leaf."""
|
|
252
259
|
|
|
260
|
+
# leafSequence: list[DatatypeLeavesTotal] = dataclasses.field(default_factory=list, metadata={'elementConstructor': 'DatatypeLeavesTotal'})
|
|
261
|
+
|
|
253
262
|
taskIndex: DatatypeLeavesTotal = DatatypeLeavesTotal(0)
|
|
254
263
|
"""Index of the current parallel task when using task divisions."""
|
|
255
264
|
|
|
256
265
|
def __post_init__(self) -> None:
|
|
266
|
+
# self.leafSequence = [self.leaf1ndex]
|
|
257
267
|
from mapFolding.beDRY import getConnectionGraph, makeDataContainer
|
|
258
268
|
self.dimensionsTotal = DatatypeLeavesTotal(len(self.mapShape))
|
|
259
269
|
leavesTotalAsInt = int(self.leavesTotal)
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
mapFolding/__init__.py,sha256=TXCWanI9snueVZMTtjLNpvG4um7vyPXmJeIvvrBuJCA,3887
|
|
2
2
|
mapFolding/basecamp.py,sha256=L0eduDE8-5SnEYpnI-GHs-am4ico9kEn75SuOUgibZ8,4770
|
|
3
|
-
mapFolding/beDRY.py,sha256=
|
|
4
|
-
mapFolding/oeis.py,sha256=
|
|
3
|
+
mapFolding/beDRY.py,sha256=6E7fLwBK5E7vnI4mHJK6EmxU2Vmxk5d8yBip45uuuyw,15213
|
|
4
|
+
mapFolding/oeis.py,sha256=kVBIYUx4AvGGCqKBvtvSZvq1B6oLPw24wCHNZIOtiTc,17170
|
|
5
5
|
mapFolding/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
6
|
-
mapFolding/theDao.py,sha256=
|
|
7
|
-
mapFolding/theSSOT.py,sha256=
|
|
6
|
+
mapFolding/theDao.py,sha256=oj-NKxFVsfMUTQomQDK6Xh6GmKbE9gLqMWEyPStzIj0,10022
|
|
7
|
+
mapFolding/theSSOT.py,sha256=fG0WuZrCx77qgJmjZSFLmY03_oQzhh1Xr70-0pNLRe4,17223
|
|
8
8
|
mapFolding/toolboxFilesystem.py,sha256=5RZ9CshZwgjejH_sMG4_Kk4JX3QJLkK30OqFeL5jFWg,9974
|
|
9
9
|
mapFolding/reference/__init__.py,sha256=UIEU8BJR_YDzjFQcLel3XtHzOCJiOUGlGiWzOzbvhik,2206
|
|
10
10
|
mapFolding/reference/flattened.py,sha256=QK1xG9SllqCoi68e86Hyl9d9ATUAAFNpTQI-3zmcp5I,16072
|
|
@@ -18,29 +18,30 @@ mapFolding/reference/total_countPlus1vsPlusN.py,sha256=yJZAVLVdoXqHag2_N6_6CT-Q6
|
|
|
18
18
|
mapFolding/reference/jobsCompleted/__init__.py,sha256=TU93ZGUW1xEkT6d9mQFn_rp5DvRy0ZslEB2Q6MF5ZDc,2596
|
|
19
19
|
mapFolding/reference/jobsCompleted/[2x19]/p2x19.py,sha256=_tvYtfzMWVo2VtUbIAieoscb4N8FFflgTdW4-ljBUuA,19626
|
|
20
20
|
mapFolding/reference/jobsCompleted/p2x19/p2x19.py,sha256=eZEw4Me4ocTt6VXoK2-Sbd5SowZtxRIbN9dZmc7OCVg,6395
|
|
21
|
-
mapFolding/someAssemblyRequired/
|
|
21
|
+
mapFolding/someAssemblyRequired/RecipeJob.py,sha256=JL5Xkmp8ritVMhL1pGhX7eEw5fde3FVD8-9-vZOZwWI,5399
|
|
22
|
+
mapFolding/someAssemblyRequired/__init__.py,sha256=JLccUsx6FnBn1W2XbaBfVD3KNGmfw0HoO0NwxbzF3uA,4036
|
|
22
23
|
mapFolding/someAssemblyRequired/_theTypes.py,sha256=YFiQI6zsrFNruvqGDXHJVH0OWXsOj9EwDrt4G59OVHA,3995
|
|
23
|
-
mapFolding/someAssemblyRequired/_tool_Make.py,sha256
|
|
24
|
+
mapFolding/someAssemblyRequired/_tool_Make.py,sha256=GQDt6LXGJ1QLVQTGdEu-GJH7y4I2rO60sIBVS5p2Rjk,7384
|
|
24
25
|
mapFolding/someAssemblyRequired/_tool_Then.py,sha256=uc1of9ZPCp5Vrh5Qg80giatGHwT9wRzW3dWaKxGYQsg,4125
|
|
25
|
-
mapFolding/someAssemblyRequired/_toolboxAntecedents.py,sha256=
|
|
26
|
-
mapFolding/someAssemblyRequired/_toolboxContainers.py,sha256
|
|
27
|
-
mapFolding/someAssemblyRequired/_toolboxPython.py,sha256=
|
|
26
|
+
mapFolding/someAssemblyRequired/_toolboxAntecedents.py,sha256=9RWpbKkf90ApmUPckLqJLhjK6Iasq8Txsa9IOYwTbgw,10909
|
|
27
|
+
mapFolding/someAssemblyRequired/_toolboxContainers.py,sha256=-ImBTd0IlgmHwL9VrUarykOeSmmdLOrRiISoel5vizA,23794
|
|
28
|
+
mapFolding/someAssemblyRequired/_toolboxPython.py,sha256=TuRC5CD_6tTjjLuvGgPbnqCSvIP3Vp2k2r592Dcpff4,7642
|
|
28
29
|
mapFolding/someAssemblyRequired/getLLVMforNoReason.py,sha256=9RPU6vK_eUg64GtVFI_nZnvUryXw8gfHJs9NyDYHIvg,2745
|
|
29
|
-
mapFolding/someAssemblyRequired/synthesizeNumbaJob.py,sha256=
|
|
30
|
-
mapFolding/someAssemblyRequired/toolboxNumba.py,sha256=
|
|
31
|
-
mapFolding/someAssemblyRequired/transformationTools.py,sha256=
|
|
30
|
+
mapFolding/someAssemblyRequired/synthesizeNumbaJob.py,sha256=N5rl_YbiK0YTRv3V27tRrrwVxpEbSe6sxZJBMtLNlco,15587
|
|
31
|
+
mapFolding/someAssemblyRequired/toolboxNumba.py,sha256=3Saast4QvugNwluc4CLMfelZG2sKdZO74z_8p2LkG_k,10972
|
|
32
|
+
mapFolding/someAssemblyRequired/transformationTools.py,sha256=M5cDR1_jPOs92XoPd8Mbcxc5fTWW2YwaG4HGcSJQUeY,34238
|
|
32
33
|
mapFolding/syntheticModules/__init__.py,sha256=evVFqhCGa-WZKDiLcnQWjs-Bj34eRnfSLqz_d7dFYZY,83
|
|
33
|
-
mapFolding/syntheticModules/
|
|
34
|
-
mapfolding-0.9.
|
|
34
|
+
mapFolding/syntheticModules/numbaCount.py,sha256=hQPPLKZi99Sayny1Gp3Y9Jv_XLSwozIiUmOrHVaaQ2Q,15768
|
|
35
|
+
mapfolding-0.9.1.dist-info/licenses/LICENSE,sha256=NxH5Y8BdC-gNU-WSMwim3uMbID2iNDXJz7fHtuTdXhk,19346
|
|
35
36
|
tests/__init__.py,sha256=UIvSWWz_anRXBELKPOdhfRoZ4hArHQTvghHrRquDHHw,1940
|
|
36
37
|
tests/conftest.py,sha256=G8vhDSTdTbYZUFBUKLFOUOzDL1Ja6NVZmICCh4biZas,14298
|
|
37
|
-
tests/test_computations.py,sha256=
|
|
38
|
+
tests/test_computations.py,sha256=MbnK9kRRwH3UI7aVMreNuEbzNVC2hP0Gq2mR-xjuxrI,6205
|
|
38
39
|
tests/test_filesystem.py,sha256=T2DkjBoI3lW6tCxd5BilPmUFrVukNKLjOOZVZxLM560,3004
|
|
39
40
|
tests/test_oeis.py,sha256=uxvwmgbnylSDdsVJfuAT0LuYLbIVFwSgdLxHm-xUGBM,5043
|
|
40
41
|
tests/test_other.py,sha256=zZmSZpcNsk4oeD4EHNLMNtmiz9hnwwoV62DFSQrLKwo,4258
|
|
41
42
|
tests/test_tasks.py,sha256=yrExYvFP23TEA3ta0IotMNmi59rwQ3Y9hA3fwvIhxTE,2851
|
|
42
|
-
mapfolding-0.9.
|
|
43
|
-
mapfolding-0.9.
|
|
44
|
-
mapfolding-0.9.
|
|
45
|
-
mapfolding-0.9.
|
|
46
|
-
mapfolding-0.9.
|
|
43
|
+
mapfolding-0.9.1.dist-info/METADATA,sha256=UQmPj1bF5CjCNrNSwfemNPHz80PPRqKr63EbE5rdMzI,7445
|
|
44
|
+
mapfolding-0.9.1.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
|
|
45
|
+
mapfolding-0.9.1.dist-info/entry_points.txt,sha256=F3OUeZR1XDTpoH7k3wXuRb3KF_kXTTeYhu5AGK1SiOQ,146
|
|
46
|
+
mapfolding-0.9.1.dist-info/top_level.txt,sha256=1gP2vFaqPwHujGwb3UjtMlLEGN-943VSYFR7V4gDqW8,17
|
|
47
|
+
mapfolding-0.9.1.dist-info/RECORD,,
|
tests/test_computations.py
CHANGED
|
@@ -87,6 +87,7 @@ that provide consistent, informative error messages and simplify test validation
|
|
|
87
87
|
|
|
88
88
|
from mapFolding import countFolds, getFoldsTotalKnown, oeisIDfor_n, validateListDimensions
|
|
89
89
|
from mapFolding.oeis import settingsOEIS
|
|
90
|
+
from mapFolding.someAssemblyRequired.RecipeJob import RecipeJob
|
|
90
91
|
from mapFolding.someAssemblyRequired.transformationTools import makeInitializedComputationState
|
|
91
92
|
from pathlib import Path, PurePosixPath
|
|
92
93
|
from tests.conftest import standardizedEqualToCallableReturn, registrarRecordsTmpObject
|
|
@@ -115,7 +116,7 @@ def test_syntheticSequential(syntheticDispatcherFixture: None, listDimensionsTes
|
|
|
115
116
|
|
|
116
117
|
@pytest.mark.parametrize('pathFilenameTmpTesting', ['.py'], indirect=True)
|
|
117
118
|
def test_writeJobNumba(oneTestCuzTestsOverwritingTests: list[int], pathFilenameTmpTesting: Path) -> None:
|
|
118
|
-
from mapFolding.someAssemblyRequired.toolboxNumba import
|
|
119
|
+
from mapFolding.someAssemblyRequired.toolboxNumba import SpicesJobNumba
|
|
119
120
|
from mapFolding.someAssemblyRequired.synthesizeNumbaJob import makeJobNumba
|
|
120
121
|
mapShape = validateListDimensions(oneTestCuzTestsOverwritingTests)
|
|
121
122
|
state = makeInitializedComputationState(mapShape)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|