mapFolding 0.11.0__tar.gz → 0.11.1__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.
- {mapfolding-0.11.0 → mapfolding-0.11.1}/PKG-INFO +1 -1
- {mapfolding-0.11.0 → mapfolding-0.11.1}/mapFolding/__init__.py +0 -17
- {mapfolding-0.11.0 → mapfolding-0.11.1}/mapFolding/someAssemblyRequired/Z0Z_makeSomeModules.py +5 -5
- {mapfolding-0.11.0 → mapfolding-0.11.1}/mapFolding/someAssemblyRequired/__init__.py +7 -2
- {mapfolding-0.11.0 → mapfolding-0.11.1}/mapFolding/someAssemblyRequired/_toolIfThis.py +6 -0
- {mapfolding-0.11.0 → mapfolding-0.11.1}/mapFolding/someAssemblyRequired/_toolboxContainers.py +9 -10
- {mapfolding-0.11.0 → mapfolding-0.11.1}/mapFolding/someAssemblyRequired/makeJobTheorem2Numba.py +1 -1
- {mapfolding-0.11.0 → mapfolding-0.11.1}/mapFolding/someAssemblyRequired/synthesizeNumbaJob.py +2 -1
- {mapfolding-0.11.0 → mapfolding-0.11.1}/mapFolding/someAssemblyRequired/toolboxNumba.py +2 -2
- {mapfolding-0.11.0 → mapfolding-0.11.1}/mapFolding/someAssemblyRequired/transformationTools.py +6 -40
- {mapfolding-0.11.0 → mapfolding-0.11.1}/mapFolding.egg-info/PKG-INFO +1 -1
- {mapfolding-0.11.0 → mapfolding-0.11.1}/pyproject.toml +1 -1
- {mapfolding-0.11.0 → mapfolding-0.11.1}/LICENSE +0 -0
- {mapfolding-0.11.0 → mapfolding-0.11.1}/README.md +0 -0
- {mapfolding-0.11.0 → mapfolding-0.11.1}/mapFolding/basecamp.py +0 -0
- {mapfolding-0.11.0 → mapfolding-0.11.1}/mapFolding/beDRY.py +0 -0
- {mapfolding-0.11.0 → mapfolding-0.11.1}/mapFolding/daoOfMapFolding.py +0 -0
- {mapfolding-0.11.0 → mapfolding-0.11.1}/mapFolding/dataBaskets.py +0 -0
- {mapfolding-0.11.0 → mapfolding-0.11.1}/mapFolding/datatypes.py +0 -0
- {mapfolding-0.11.0 → mapfolding-0.11.1}/mapFolding/oeis.py +0 -0
- {mapfolding-0.11.0 → mapfolding-0.11.1}/mapFolding/py.typed +0 -0
- {mapfolding-0.11.0 → mapfolding-0.11.1}/mapFolding/reference/__init__.py +0 -0
- {mapfolding-0.11.0 → mapfolding-0.11.1}/mapFolding/reference/flattened.py +0 -0
- {mapfolding-0.11.0 → mapfolding-0.11.1}/mapFolding/reference/hunterNumba.py +0 -0
- {mapfolding-0.11.0 → mapfolding-0.11.1}/mapFolding/reference/irvineJavaPort.py +0 -0
- {mapfolding-0.11.0 → mapfolding-0.11.1}/mapFolding/reference/jaxCount.py +0 -0
- {mapfolding-0.11.0 → mapfolding-0.11.1}/mapFolding/reference/jobsCompleted/[2x19]/p2x19.py +0 -0
- {mapfolding-0.11.0 → mapfolding-0.11.1}/mapFolding/reference/jobsCompleted/__init__.py +0 -0
- {mapfolding-0.11.0 → mapfolding-0.11.1}/mapFolding/reference/jobsCompleted/p2x19/p2x19.py +0 -0
- {mapfolding-0.11.0 → mapfolding-0.11.1}/mapFolding/reference/lunnonNumpy.py +0 -0
- {mapfolding-0.11.0 → mapfolding-0.11.1}/mapFolding/reference/lunnonWhile.py +0 -0
- {mapfolding-0.11.0 → mapfolding-0.11.1}/mapFolding/reference/rotatedEntryPoint.py +0 -0
- {mapfolding-0.11.0 → mapfolding-0.11.1}/mapFolding/reference/total_countPlus1vsPlusN.py +0 -0
- {mapfolding-0.11.0 → mapfolding-0.11.1}/mapFolding/someAssemblyRequired/RecipeJob.py +0 -0
- {mapfolding-0.11.0 → mapfolding-0.11.1}/mapFolding/someAssemblyRequired/getLLVMforNoReason.py +0 -0
- {mapfolding-0.11.0 → mapfolding-0.11.1}/mapFolding/syntheticModules/__init__.py +0 -0
- {mapfolding-0.11.0 → mapfolding-0.11.1}/mapFolding/syntheticModules/daoOfMapFolding.py +0 -0
- {mapfolding-0.11.0 → mapfolding-0.11.1}/mapFolding/syntheticModules/dataPacking.py +0 -0
- {mapfolding-0.11.0 → mapfolding-0.11.1}/mapFolding/syntheticModules/initializeCount.py +0 -0
- {mapfolding-0.11.0 → mapfolding-0.11.1}/mapFolding/syntheticModules/numbaCount.py +0 -0
- {mapfolding-0.11.0 → mapfolding-0.11.1}/mapFolding/syntheticModules/theorem2.py +0 -0
- {mapfolding-0.11.0 → mapfolding-0.11.1}/mapFolding/syntheticModules/theorem2Numba.py +0 -0
- {mapfolding-0.11.0 → mapfolding-0.11.1}/mapFolding/syntheticModules/theorem2Trimmed.py +0 -0
- {mapfolding-0.11.0 → mapfolding-0.11.1}/mapFolding/theDao.py +0 -0
- {mapfolding-0.11.0 → mapfolding-0.11.1}/mapFolding/theSSOT.py +0 -0
- {mapfolding-0.11.0 → mapfolding-0.11.1}/mapFolding/toolboxFilesystem.py +0 -0
- {mapfolding-0.11.0 → mapfolding-0.11.1}/mapFolding.egg-info/SOURCES.txt +0 -0
- {mapfolding-0.11.0 → mapfolding-0.11.1}/mapFolding.egg-info/dependency_links.txt +0 -0
- {mapfolding-0.11.0 → mapfolding-0.11.1}/mapFolding.egg-info/entry_points.txt +0 -0
- {mapfolding-0.11.0 → mapfolding-0.11.1}/mapFolding.egg-info/requires.txt +0 -0
- {mapfolding-0.11.0 → mapfolding-0.11.1}/mapFolding.egg-info/top_level.txt +0 -0
- {mapfolding-0.11.0 → mapfolding-0.11.1}/setup.cfg +0 -0
- {mapfolding-0.11.0 → mapfolding-0.11.1}/tests/__init__.py +0 -0
- {mapfolding-0.11.0 → mapfolding-0.11.1}/tests/conftest.py +0 -0
- {mapfolding-0.11.0 → mapfolding-0.11.1}/tests/test_computations.py +0 -0
- {mapfolding-0.11.0 → mapfolding-0.11.1}/tests/test_filesystem.py +0 -0
- {mapfolding-0.11.0 → mapfolding-0.11.1}/tests/test_oeis.py +0 -0
- {mapfolding-0.11.0 → mapfolding-0.11.1}/tests/test_other.py +0 -0
- {mapfolding-0.11.0 → mapfolding-0.11.1}/tests/test_tasks.py +0 -0
|
@@ -50,27 +50,10 @@ import sys
|
|
|
50
50
|
yourPythonIsOld: TypeAlias = Any
|
|
51
51
|
# ruff: noqa: E402
|
|
52
52
|
|
|
53
|
-
# if sys.version_info >= (3, 12):
|
|
54
|
-
# from ast import (
|
|
55
|
-
# ParamSpec as astDOTParamSpec,
|
|
56
|
-
# type_param as astDOTtype_param,
|
|
57
|
-
# TypeAlias as astDOTTypeAlias,
|
|
58
|
-
# TypeVar as astDOTTypeVar,
|
|
59
|
-
# TypeVarTuple as astDOTTypeVarTuple,
|
|
60
|
-
# )
|
|
61
|
-
# else:
|
|
62
|
-
# astDOTParamSpec: TypeAlias = yourPythonIsOld
|
|
63
|
-
# astDOTtype_param: TypeAlias = yourPythonIsOld
|
|
64
|
-
# astDOTTypeAlias: TypeAlias = yourPythonIsOld
|
|
65
|
-
# astDOTTypeVar: TypeAlias = yourPythonIsOld
|
|
66
|
-
# astDOTTypeVarTuple: TypeAlias = yourPythonIsOld
|
|
67
|
-
|
|
68
53
|
if sys.version_info >= (3, 11):
|
|
69
|
-
# from ast import TryStar as astDOTTryStar
|
|
70
54
|
from typing import TypedDict as TypedDict
|
|
71
55
|
from typing import NotRequired as NotRequired
|
|
72
56
|
else:
|
|
73
|
-
astDOTTryStar: TypeAlias = yourPythonIsOld
|
|
74
57
|
try:
|
|
75
58
|
from typing_extensions import TypedDict as TypedDict
|
|
76
59
|
from typing_extensions import NotRequired as NotRequired
|
{mapfolding-0.11.0 → mapfolding-0.11.1}/mapFolding/someAssemblyRequired/Z0Z_makeSomeModules.py
RENAMED
|
@@ -9,23 +9,23 @@ from mapFolding.someAssemblyRequired import (
|
|
|
9
9
|
IfThis,
|
|
10
10
|
IngredientsFunction,
|
|
11
11
|
IngredientsModule,
|
|
12
|
+
inlineFunctionDef,
|
|
12
13
|
LedgerOfImports,
|
|
13
14
|
Make,
|
|
14
15
|
NodeChanger,
|
|
15
16
|
NodeTourist,
|
|
16
17
|
parseLogicalPath2astModule,
|
|
17
18
|
parsePathFilename2astModule,
|
|
18
|
-
|
|
19
|
+
removeUnusedParameters,
|
|
19
20
|
str_nameDOTname,
|
|
21
|
+
Then,
|
|
22
|
+
write_astModule,
|
|
20
23
|
)
|
|
21
24
|
from mapFolding.someAssemblyRequired.toolboxNumba import decorateCallableWithNumba, parametersNumbaLight
|
|
22
25
|
from mapFolding.someAssemblyRequired.transformationTools import (
|
|
23
|
-
inlineFunctionDef,
|
|
24
26
|
removeDataclassFromFunction,
|
|
25
|
-
removeUnusedParameters,
|
|
26
27
|
shatter_dataclassesDOTdataclass,
|
|
27
28
|
unpackDataclassCallFunctionRepackDataclass,
|
|
28
|
-
write_astModule,
|
|
29
29
|
)
|
|
30
30
|
from pathlib import PurePath
|
|
31
31
|
import ast
|
|
@@ -168,7 +168,7 @@ def makeTheorem2() -> PurePath:
|
|
|
168
168
|
doThat = Then.removeIt
|
|
169
169
|
NodeChanger(findThis, doThat).visit(countTheorem2.astFunctionDef)
|
|
170
170
|
|
|
171
|
-
findThis = IfThis.
|
|
171
|
+
findThis = IfThis.isAttributeNamespace_IdentifierLessThanOrEqual0(dataclassInstanceIdentifier, 'leaf1ndex')
|
|
172
172
|
doThat = Then.removeIt
|
|
173
173
|
NodeChanger(findThis, doThat).visit(countTheorem2.astFunctionDef)
|
|
174
174
|
|
|
@@ -53,7 +53,6 @@ from astToolkit import (
|
|
|
53
53
|
extractClassDef as extractClassDef,
|
|
54
54
|
extractFunctionDef as extractFunctionDef,
|
|
55
55
|
Grab as Grab,
|
|
56
|
-
ImaCallToName as ImaCallToName,
|
|
57
56
|
importLogicalPath2Callable as importLogicalPath2Callable,
|
|
58
57
|
importPathFilename2Callable as importPathFilename2Callable,
|
|
59
58
|
IngredientsFunction as IngredientsFunction,
|
|
@@ -67,7 +66,13 @@ from astToolkit import (
|
|
|
67
66
|
parsePathFilename2astModule as parsePathFilename2astModule,
|
|
68
67
|
str_nameDOTname as str_nameDOTname,
|
|
69
68
|
Then as Then,
|
|
70
|
-
|
|
69
|
+
)
|
|
70
|
+
|
|
71
|
+
from astToolkit.transformationTools import (
|
|
72
|
+
inlineFunctionDef as inlineFunctionDef,
|
|
73
|
+
removeUnusedParameters as removeUnusedParameters,
|
|
74
|
+
unparseFindReplace as unparseFindReplace,
|
|
75
|
+
write_astModule as write_astModule,
|
|
71
76
|
)
|
|
72
77
|
|
|
73
78
|
from mapFolding.someAssemblyRequired._toolIfThis import IfThis as IfThis
|
|
@@ -51,3 +51,9 @@ class IfThis(astToolkit_IfThis):
|
|
|
51
51
|
def isWhileAttributeNamespace_IdentifierGreaterThan0(namespace: ast_Identifier, identifier: ast_Identifier) -> Callable[[ast.AST], TypeGuard[ast.While] | bool]:
|
|
52
52
|
return lambda node: (Be.While(node)
|
|
53
53
|
and IfThis.isAttributeNamespace_IdentifierGreaterThan0(namespace, identifier)(node.test))
|
|
54
|
+
|
|
55
|
+
@staticmethod
|
|
56
|
+
def isAttributeNamespace_IdentifierLessThanOrEqual0(namespace: ast_Identifier, identifier: ast_Identifier) -> Callable[[ast.AST], TypeGuard[ast.Compare] | bool]:
|
|
57
|
+
return lambda node: (Be.Compare(node)
|
|
58
|
+
and IfThis.isAttributeNamespace_Identifier(namespace, identifier)(node.left)
|
|
59
|
+
and Be.LtE(node.ops[0]))
|
{mapfolding-0.11.0 → mapfolding-0.11.1}/mapFolding/someAssemblyRequired/_toolboxContainers.py
RENAMED
|
@@ -18,10 +18,9 @@ The containers work in conjunction with transformation tools that manipulate the
|
|
|
18
18
|
specific optimizations and transformations.
|
|
19
19
|
"""
|
|
20
20
|
|
|
21
|
-
from astToolkit import IngredientsFunction as IngredientsFunction, IngredientsModule as IngredientsModule, LedgerOfImports as LedgerOfImports
|
|
22
21
|
from collections.abc import Callable
|
|
23
22
|
from copy import deepcopy
|
|
24
|
-
from mapFolding.someAssemblyRequired import ast_Identifier, DOT, IfThis, Make, NodeTourist, parseLogicalPath2astModule, str_nameDOTname, Then
|
|
23
|
+
from mapFolding.someAssemblyRequired import ast_Identifier, DOT, IfThis, Make, NodeTourist, parseLogicalPath2astModule, str_nameDOTname, Then, LedgerOfImports
|
|
25
24
|
from mapFolding.theSSOT import raiseIfNoneGitHubIssueNumber3, The
|
|
26
25
|
from pathlib import Path, PurePosixPath
|
|
27
26
|
from typing import Any, cast
|
|
@@ -158,10 +157,10 @@ class ShatteredDataclass:
|
|
|
158
157
|
countingVariableName: ast.Name
|
|
159
158
|
"""AST name node representing the counting variable identifier."""
|
|
160
159
|
|
|
161
|
-
field2AnnAssign: dict[ast_Identifier, ast.AnnAssign | ast.Assign] = dataclasses.field(default_factory=dict)
|
|
160
|
+
field2AnnAssign: dict[ast_Identifier, ast.AnnAssign | ast.Assign] = dataclasses.field(default_factory=lambda: dict[ast_Identifier, ast.AnnAssign | ast.Assign]())
|
|
162
161
|
"""Maps field names to their corresponding AST call expressions."""
|
|
163
162
|
|
|
164
|
-
Z0Z_field2AnnAssign: dict[ast_Identifier, tuple[ast.AnnAssign | ast.Assign, str]] = dataclasses.field(default_factory=dict)
|
|
163
|
+
Z0Z_field2AnnAssign: dict[ast_Identifier, tuple[ast.AnnAssign | ast.Assign, str]] = dataclasses.field(default_factory=lambda: dict[ast_Identifier, tuple[ast.AnnAssign | ast.Assign, str]]())
|
|
165
164
|
|
|
166
165
|
fragments4AssignmentOrParameters: ast.Tuple = dummyTuple
|
|
167
166
|
"""AST tuple used as target for assignment to capture returned fragments."""
|
|
@@ -169,22 +168,22 @@ class ShatteredDataclass:
|
|
|
169
168
|
imports: LedgerOfImports = dataclasses.field(default_factory=LedgerOfImports)
|
|
170
169
|
"""Import records for the dataclass and its constituent parts."""
|
|
171
170
|
|
|
172
|
-
list_argAnnotated4ArgumentsSpecification: list[ast.arg] = dataclasses.field(default_factory=list)
|
|
171
|
+
list_argAnnotated4ArgumentsSpecification: list[ast.arg] = dataclasses.field(default_factory=lambda: list[ast.arg]())
|
|
173
172
|
"""Function argument nodes with annotations for parameter specification."""
|
|
174
173
|
|
|
175
|
-
list_keyword_field__field4init: list[ast.keyword] = dataclasses.field(default_factory=list)
|
|
174
|
+
list_keyword_field__field4init: list[ast.keyword] = dataclasses.field(default_factory=lambda: list[ast.keyword]())
|
|
176
175
|
"""Keyword arguments for dataclass initialization with field=field format."""
|
|
177
176
|
|
|
178
|
-
listAnnotations: list[ast.expr] = dataclasses.field(default_factory=list)
|
|
177
|
+
listAnnotations: list[ast.expr] = dataclasses.field(default_factory=lambda: list[ast.expr]())
|
|
179
178
|
"""Type annotations for each dataclass field."""
|
|
180
179
|
|
|
181
|
-
listName4Parameters: list[ast.Name] = dataclasses.field(default_factory=list)
|
|
180
|
+
listName4Parameters: list[ast.Name] = dataclasses.field(default_factory=lambda: list[ast.Name]())
|
|
182
181
|
"""Name nodes for each dataclass field used as function parameters."""
|
|
183
182
|
|
|
184
|
-
listUnpack: list[ast.AnnAssign] = dataclasses.field(default_factory=list)
|
|
183
|
+
listUnpack: list[ast.AnnAssign] = dataclasses.field(default_factory=lambda: list[ast.AnnAssign]())
|
|
185
184
|
"""Annotated assignment statements to extract fields from dataclass."""
|
|
186
185
|
|
|
187
|
-
map_stateDOTfield2Name: dict[ast.AST, ast.Name] = dataclasses.field(default_factory=dict)
|
|
186
|
+
map_stateDOTfield2Name: dict[ast.AST, ast.Name] = dataclasses.field(default_factory=lambda: dict[ast.AST, ast.Name]())
|
|
188
187
|
"""Maps AST expressions to Name nodes for find-replace operations."""
|
|
189
188
|
|
|
190
189
|
repack: ast.Assign = dummyAssign
|
{mapfolding-0.11.0 → mapfolding-0.11.1}/mapFolding/someAssemblyRequired/makeJobTheorem2Numba.py
RENAMED
|
@@ -12,10 +12,10 @@ from mapFolding.someAssemblyRequired import (
|
|
|
12
12
|
NodeTourist,
|
|
13
13
|
str_nameDOTname,
|
|
14
14
|
Then,
|
|
15
|
+
write_astModule,
|
|
15
16
|
)
|
|
16
17
|
from mapFolding.someAssemblyRequired.RecipeJob import RecipeJobTheorem2Numba
|
|
17
18
|
from mapFolding.someAssemblyRequired.toolboxNumba import parametersNumbaLight, SpicesJobNumba, decorateCallableWithNumba
|
|
18
|
-
from mapFolding.someAssemblyRequired.transformationTools import write_astModule
|
|
19
19
|
from mapFolding.syntheticModules.initializeCount import initializeGroupsOfFolds
|
|
20
20
|
from mapFolding.dataBaskets import MapFoldingState
|
|
21
21
|
from pathlib import PurePosixPath
|
{mapfolding-0.11.0 → mapfolding-0.11.1}/mapFolding/someAssemblyRequired/synthesizeNumbaJob.py
RENAMED
|
@@ -32,10 +32,11 @@ from mapFolding.someAssemblyRequired import (
|
|
|
32
32
|
NodeTourist,
|
|
33
33
|
str_nameDOTname,
|
|
34
34
|
Then,
|
|
35
|
+
write_astModule,
|
|
35
36
|
)
|
|
36
37
|
from mapFolding.someAssemblyRequired.RecipeJob import RecipeJob
|
|
37
38
|
from mapFolding.someAssemblyRequired.toolboxNumba import parametersNumbaLight, SpicesJobNumba, decorateCallableWithNumba
|
|
38
|
-
from mapFolding.someAssemblyRequired.transformationTools import dictionaryEstimates,
|
|
39
|
+
from mapFolding.someAssemblyRequired.transformationTools import dictionaryEstimates, makeInitializedComputationState
|
|
39
40
|
from pathlib import PurePosixPath
|
|
40
41
|
from typing import cast, NamedTuple
|
|
41
42
|
from Z0Z_tools import autoDecodingRLE
|
|
@@ -17,8 +17,8 @@ performance improvements while preserving code semantics and correctness.
|
|
|
17
17
|
|
|
18
18
|
from collections.abc import Callable, Sequence
|
|
19
19
|
from mapFolding import NotRequired, TypedDict
|
|
20
|
-
from mapFolding.someAssemblyRequired import ast_Identifier, IngredientsFunction, Make, RecipeSynthesizeFlow, str_nameDOTname
|
|
21
|
-
from mapFolding.someAssemblyRequired.transformationTools import makeNewFlow
|
|
20
|
+
from mapFolding.someAssemblyRequired import ast_Identifier, IngredientsFunction, Make, RecipeSynthesizeFlow, str_nameDOTname, write_astModule
|
|
21
|
+
from mapFolding.someAssemblyRequired.transformationTools import makeNewFlow
|
|
22
22
|
from numba.core.compiler import CompilerBase as numbaCompilerBase
|
|
23
23
|
from typing import Any, cast, Final
|
|
24
24
|
import ast
|
{mapfolding-0.11.0 → mapfolding-0.11.1}/mapFolding/someAssemblyRequired/transformationTools.py
RENAMED
|
@@ -18,9 +18,7 @@ readable, maintainable implementations to highly optimized versions while preser
|
|
|
18
18
|
logical structure and correctness.
|
|
19
19
|
"""
|
|
20
20
|
|
|
21
|
-
from
|
|
22
|
-
from collections.abc import Callable, Mapping
|
|
23
|
-
from copy import deepcopy
|
|
21
|
+
from collections.abc import Callable
|
|
24
22
|
from mapFolding.beDRY import outfitCountFolds
|
|
25
23
|
from mapFolding.someAssemblyRequired import (
|
|
26
24
|
ast_Identifier,
|
|
@@ -33,16 +31,18 @@ from mapFolding.someAssemblyRequired import (
|
|
|
33
31
|
importLogicalPath2Callable,
|
|
34
32
|
IngredientsFunction,
|
|
35
33
|
IngredientsModule,
|
|
34
|
+
inlineFunctionDef,
|
|
36
35
|
LedgerOfImports,
|
|
37
36
|
Make,
|
|
38
37
|
NodeChanger,
|
|
39
38
|
NodeTourist,
|
|
40
39
|
parseLogicalPath2astModule,
|
|
41
40
|
RecipeSynthesizeFlow,
|
|
41
|
+
removeUnusedParameters,
|
|
42
42
|
ShatteredDataclass,
|
|
43
43
|
str_nameDOTname,
|
|
44
44
|
Then,
|
|
45
|
-
|
|
45
|
+
unparseFindReplace,
|
|
46
46
|
)
|
|
47
47
|
from mapFolding.theSSOT import ComputationState, The
|
|
48
48
|
from mapFolding.toolboxFilesystem import getPathFilenameFoldsTotal
|
|
@@ -230,7 +230,7 @@ def makeNewFlow(recipeFlow: RecipeSynthesizeFlow) -> IngredientsModule:
|
|
|
230
230
|
if recipeFlow.removeDataclassParallel:
|
|
231
231
|
ingredientsParallel.astFunctionDef.args = Make.arguments(args=shatteredDataclass.list_argAnnotated4ArgumentsSpecification)
|
|
232
232
|
|
|
233
|
-
ingredientsParallel.astFunctionDef =
|
|
233
|
+
ingredientsParallel.astFunctionDef = unparseFindReplace(ingredientsParallel.astFunctionDef, shatteredDataclass.map_stateDOTfield2Name)
|
|
234
234
|
|
|
235
235
|
ingredientsParallel = removeUnusedParameters(ingredientsParallel)
|
|
236
236
|
|
|
@@ -274,7 +274,7 @@ def removeDataclassFromFunction(ingredientsTarget: IngredientsFunction, shattere
|
|
|
274
274
|
ingredientsTarget.astFunctionDef.returns = shatteredDataclass.signatureReturnAnnotation
|
|
275
275
|
changeReturnCallable = NodeChanger(Be.Return, Then.replaceWith(Make.Return(shatteredDataclass.fragments4AssignmentOrParameters)))
|
|
276
276
|
changeReturnCallable.visit(ingredientsTarget.astFunctionDef)
|
|
277
|
-
ingredientsTarget.astFunctionDef =
|
|
277
|
+
ingredientsTarget.astFunctionDef = unparseFindReplace(ingredientsTarget.astFunctionDef, shatteredDataclass.map_stateDOTfield2Name)
|
|
278
278
|
return ingredientsTarget
|
|
279
279
|
|
|
280
280
|
def unpackDataclassCallFunctionRepackDataclass(ingredientsCaller: IngredientsFunction, targetCallableIdentifier: ast_Identifier, shatteredDataclass: ShatteredDataclass) -> IngredientsFunction:
|
|
@@ -294,37 +294,3 @@ dictionaryEstimates: dict[tuple[int, ...], int] = {
|
|
|
294
294
|
(3,3,3,3): 85109616000000000000000000000000,
|
|
295
295
|
(8,8): 791274195985524900,
|
|
296
296
|
}
|
|
297
|
-
|
|
298
|
-
# END of marginal classes and functions ======================================================
|
|
299
|
-
def Z0Z_lameFindReplace(astTree: 个, mappingFindReplaceNodes: Mapping[ast.AST, ast.AST]) -> 个:
|
|
300
|
-
"""
|
|
301
|
-
Recursively replace AST nodes based on a mapping of find-replace pairs.
|
|
302
|
-
|
|
303
|
-
This function applies brute-force node replacement throughout an AST tree
|
|
304
|
-
by comparing textual representations of nodes. While not the most efficient
|
|
305
|
-
approach, it provides a reliable way to replace complex nested structures
|
|
306
|
-
when more precise targeting methods are difficult to implement.
|
|
307
|
-
|
|
308
|
-
The function continues replacing nodes until no more changes are detected
|
|
309
|
-
in the AST's textual representation, ensuring complete replacement throughout
|
|
310
|
-
the tree structure.
|
|
311
|
-
|
|
312
|
-
Parameters:
|
|
313
|
-
astTree: The AST structure to modify.
|
|
314
|
-
mappingFindReplaceNodes: A mapping from source nodes to replacement nodes.
|
|
315
|
-
|
|
316
|
-
Returns:
|
|
317
|
-
The modified AST structure with all matching nodes replaced.
|
|
318
|
-
"""
|
|
319
|
-
keepGoing = True
|
|
320
|
-
newTree = deepcopy(astTree)
|
|
321
|
-
|
|
322
|
-
while keepGoing:
|
|
323
|
-
for nodeFind, nodeReplace in mappingFindReplaceNodes.items():
|
|
324
|
-
NodeChanger(IfThis.unparseIs(nodeFind), Then.replaceWith(nodeReplace)).visit(newTree)
|
|
325
|
-
|
|
326
|
-
if ast.unparse(newTree) == ast.unparse(astTree):
|
|
327
|
-
keepGoing = False
|
|
328
|
-
else:
|
|
329
|
-
astTree = deepcopy(newTree)
|
|
330
|
-
return newTree
|
|
@@ -75,7 +75,7 @@ readme = { file = "README.md", content-type = "text/markdown" }
|
|
|
75
75
|
requires-python = ">=3.10"
|
|
76
76
|
scripts = { getOEISids = "mapFolding.oeis:getOEISids", clearOEIScache = "mapFolding.oeis:clearOEIScache", OEIS_for_n = "mapFolding.oeis:OEIS_for_n" }
|
|
77
77
|
urls = { Donate = "https://www.patreon.com/integrated", Homepage = "https://github.com/hunterhogan/mapFolding", Repository = "https://github.com/hunterhogan/mapFolding.git", Issues = "https://github.com/hunterhogan/mapFolding/issues"}
|
|
78
|
-
version = "0.11.
|
|
78
|
+
version = "0.11.1"
|
|
79
79
|
|
|
80
80
|
[tool.coverage]
|
|
81
81
|
report = { exclude_lines = [
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{mapfolding-0.11.0 → mapfolding-0.11.1}/mapFolding/someAssemblyRequired/getLLVMforNoReason.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|