mapFolding 0.10.0__py3-none-any.whl → 0.11.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.
Files changed (27) hide show
  1. mapFolding/__init__.py +12 -27
  2. mapFolding/someAssemblyRequired/Z0Z_makeSomeModules.py +9 -11
  3. mapFolding/someAssemblyRequired/__init__.py +20 -24
  4. mapFolding/someAssemblyRequired/_toolIfThis.py +5 -139
  5. mapFolding/someAssemblyRequired/_toolboxContainers.py +20 -293
  6. mapFolding/someAssemblyRequired/makeJobTheorem2Numba.py +6 -6
  7. mapFolding/someAssemblyRequired/synthesizeNumbaJob.py +7 -6
  8. mapFolding/someAssemblyRequired/toolboxNumba.py +2 -2
  9. mapFolding/someAssemblyRequired/transformationTools.py +9 -216
  10. {mapfolding-0.10.0.dist-info → mapfolding-0.11.1.dist-info}/METADATA +2 -1
  11. {mapfolding-0.10.0.dist-info → mapfolding-0.11.1.dist-info}/RECORD +15 -27
  12. {mapfolding-0.10.0.dist-info → mapfolding-0.11.1.dist-info}/WHEEL +1 -1
  13. mapFolding/someAssemblyRequired/_astTypes.py +0 -117
  14. mapFolding/someAssemblyRequired/_theTypes.py +0 -34
  15. mapFolding/someAssemblyRequired/_toolBe.py +0 -524
  16. mapFolding/someAssemblyRequired/_toolDOT.py +0 -493
  17. mapFolding/someAssemblyRequired/_toolGrab.py +0 -653
  18. mapFolding/someAssemblyRequired/_toolMake.py +0 -339
  19. mapFolding/someAssemblyRequired/_toolThen.py +0 -63
  20. mapFolding/someAssemblyRequired/_toolboxAST.py +0 -57
  21. mapFolding/someAssemblyRequired/_toolboxPython.py +0 -188
  22. mapFolding/toolFactory/astFactory.py +0 -493
  23. mapFolding/toolFactory/astFactory_annex.py +0 -63
  24. mapFolding/toolFactory/astFactory_docstrings.py +0 -63
  25. {mapfolding-0.10.0.dist-info → mapfolding-0.11.1.dist-info}/entry_points.txt +0 -0
  26. {mapfolding-0.10.0.dist-info → mapfolding-0.11.1.dist-info}/licenses/LICENSE +0 -0
  27. {mapfolding-0.10.0.dist-info → mapfolding-0.11.1.dist-info}/top_level.txt +0 -0
@@ -18,129 +18,40 @@ readable, maintainable implementations to highly optimized versions while preser
18
18
  logical structure and correctness.
19
19
  """
20
20
 
21
- from autoflake import fix_code as autoflake_fix_code
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,
27
25
  astModuleToIngredientsFunction,
28
26
  Be,
29
27
  DeReConstructField2ast,
30
- DOT,
31
28
  extractClassDef,
32
29
  Grab,
33
30
  IfThis,
34
31
  importLogicalPath2Callable,
35
32
  IngredientsFunction,
36
33
  IngredientsModule,
34
+ inlineFunctionDef,
37
35
  LedgerOfImports,
38
36
  Make,
39
37
  NodeChanger,
40
38
  NodeTourist,
41
39
  parseLogicalPath2astModule,
42
40
  RecipeSynthesizeFlow,
41
+ removeUnusedParameters,
43
42
  ShatteredDataclass,
44
43
  str_nameDOTname,
45
44
  Then,
46
- 个,
45
+ unparseFindReplace,
47
46
  )
48
- from mapFolding.theSSOT import ComputationState, raiseIfNoneGitHubIssueNumber3, The
49
- from mapFolding.toolboxFilesystem import getPathFilenameFoldsTotal, writeStringToHere
47
+ from mapFolding.theSSOT import ComputationState, The
48
+ from mapFolding.toolboxFilesystem import getPathFilenameFoldsTotal
50
49
  from os import PathLike
51
50
  from pathlib import Path, PurePath
52
51
  from typing import Any, Literal, overload
53
52
  import ast
54
53
  import dataclasses
55
54
  import pickle
56
- import python_minifier
57
-
58
- def makeDictionaryFunctionDef(module: ast.Module) -> dict[ast_Identifier, ast.FunctionDef]:
59
- """
60
- Create a dictionary mapping function names to their AST definitions.
61
-
62
- This function creates a dictionary that maps function names to their AST function
63
- definition nodes for all functions defined in the given module.
64
-
65
- Parameters:
66
- module: The AST module to extract function definitions from.
67
-
68
- Returns:
69
- A dictionary mapping function identifiers to their AST function definition nodes.
70
- """
71
- dictionaryIdentifier2FunctionDef: dict[ast_Identifier, ast.FunctionDef] = {}
72
- NodeTourist(Be.FunctionDef, Then.updateKeyValueIn(DOT.name, Then.extractIt, dictionaryIdentifier2FunctionDef)).visit(module)
73
- return dictionaryIdentifier2FunctionDef
74
-
75
- def inlineFunctionDef(identifierToInline: ast_Identifier, module: ast.Module) -> ast.FunctionDef:
76
- """
77
- Inline function calls within a function definition to create a self-contained function.
78
-
79
- This function takes a function identifier and a module, finds the function definition,
80
- and then recursively inlines all function calls within that function with their
81
- implementation bodies. This produces a fully inlined function that doesn't depend
82
- on other function definitions from the module.
83
-
84
- Parameters:
85
- identifierToInline: The name of the function to inline.
86
- module: The AST module containing the function and its dependencies.
87
-
88
- Returns:
89
- A modified function definition with all function calls inlined.
90
-
91
- Raises:
92
- ValueError: If the function to inline is not found in the module.
93
- """
94
- dictionaryFunctionDef: dict[ast_Identifier, ast.FunctionDef] = makeDictionaryFunctionDef(module)
95
- try:
96
- FunctionDefToInline = dictionaryFunctionDef[identifierToInline]
97
- except KeyError as ERRORmessage:
98
- raise ValueError(f"FunctionDefToInline not found in dictionaryIdentifier2FunctionDef: {identifierToInline = }") from ERRORmessage
99
-
100
- listIdentifiersCalledFunctions: list[ast_Identifier] = []
101
- findIdentifiersToInline = NodeTourist(findThis = IfThis.isCallToName, doThat = Grab.funcDOTidAttribute(Then.appendTo(listIdentifiersCalledFunctions)))
102
- findIdentifiersToInline.visit(FunctionDefToInline)
103
-
104
- dictionary4Inlining: dict[ast_Identifier, ast.FunctionDef] = {}
105
- for identifier in sorted(set(listIdentifiersCalledFunctions).intersection(dictionaryFunctionDef.keys())):
106
- if NodeTourist(IfThis.matchesMeButNotAnyDescendant(IfThis.isCall_Identifier(identifier)), Then.extractIt).captureLastMatch(module) is not None:
107
- dictionary4Inlining[identifier] = dictionaryFunctionDef[identifier]
108
-
109
- keepGoing = True
110
- while keepGoing:
111
- keepGoing = False
112
- listIdentifiersCalledFunctions.clear()
113
- findIdentifiersToInline.visit(Make.Module(list(dictionary4Inlining.values())))
114
-
115
- listIdentifiersCalledFunctions = sorted((set(listIdentifiersCalledFunctions).difference(dictionary4Inlining.keys())).intersection(dictionaryFunctionDef.keys()))
116
- if len(listIdentifiersCalledFunctions) > 0:
117
- keepGoing = True
118
- for identifier in listIdentifiersCalledFunctions:
119
- if NodeTourist(IfThis.matchesMeButNotAnyDescendant(IfThis.isCall_Identifier(identifier)), Then.extractIt).captureLastMatch(module) is not None:
120
- FunctionDefTarget = dictionaryFunctionDef[identifier]
121
- if len(FunctionDefTarget.body) == 1:
122
- replacement = NodeTourist(Be.Return, Then.extractIt(DOT.value)).captureLastMatch(FunctionDefTarget)
123
-
124
- findThis = IfThis.isCall_Identifier(identifier)
125
- doThat = Then.replaceWith(replacement)
126
- inliner = NodeChanger(findThis, doThat)
127
- for astFunctionDef in dictionary4Inlining.values():
128
- inliner.visit(astFunctionDef)
129
- else:
130
- inliner = NodeChanger(IfThis.isAssignAndValueIs(IfThis.isCall_Identifier(identifier)),Then.replaceWith(FunctionDefTarget.body[0:-1]))
131
- for astFunctionDef in dictionary4Inlining.values():
132
- inliner.visit(astFunctionDef)
133
-
134
- for identifier, FunctionDefTarget in dictionary4Inlining.items():
135
- if len(FunctionDefTarget.body) == 1:
136
- replacement = NodeTourist(Be.Return, Then.extractIt(DOT.value)).captureLastMatch(FunctionDefTarget)
137
- inliner = NodeChanger(IfThis.isCall_Identifier(identifier), Then.replaceWith(replacement))
138
- inliner.visit(FunctionDefToInline)
139
- else:
140
- inliner = NodeChanger(IfThis.isAssignAndValueIs(IfThis.isCall_Identifier(identifier)),Then.replaceWith(FunctionDefTarget.body[0:-1]))
141
- inliner.visit(FunctionDefToInline)
142
- ast.fix_missing_locations(FunctionDefToInline)
143
- return FunctionDefToInline
144
55
 
145
56
  @overload
146
57
  def makeInitializedComputationState(mapShape: tuple[int, ...], writeJob: Literal[True], *, pathFilename: PathLike[str] | PurePath | None = None, **keywordArguments: Any) -> Path: ...
@@ -248,91 +159,7 @@ def shatter_dataclassesDOTdataclass(logicalPathModule: str_nameDOTname, dataclas
248
159
 
249
160
  return shatteredDataclass
250
161
 
251
- def write_astModule(ingredients: IngredientsModule, pathFilename: PathLike[Any] | PurePath, packageName: ast_Identifier | None = None) -> None:
252
- """
253
- Convert an IngredientsModule to Python source code and write it to a file.
254
-
255
- This function renders an IngredientsModule into executable Python code,
256
- applies code quality improvements like import organization via autoflake,
257
- and writes the result to the specified file path.
258
-
259
- The function performs several key steps:
260
- 1. Converts the AST module structure to a valid Python AST
261
- 2. Fixes location attributes in the AST for proper formatting
262
- 3. Converts the AST to Python source code
263
- 4. Optimizes imports using autoflake
264
- 5. Writes the final source code to the specified file location
265
-
266
- This is typically the final step in the code generation assembly line,
267
- producing optimized Python modules ready for execution.
268
-
269
- Parameters:
270
- ingredients: The IngredientsModule containing the module definition.
271
- pathFilename: The file path where the module should be written.
272
- packageName: Optional package name to preserve in import optimization.
273
-
274
- Raises:
275
- raiseIfNoneGitHubIssueNumber3: If the generated source code is empty.
276
- """
277
- astModule = Make.Module(ingredients.body, ingredients.type_ignores)
278
- ast.fix_missing_locations(astModule)
279
- pythonSource: str = ast.unparse(astModule)
280
- if not pythonSource: raise raiseIfNoneGitHubIssueNumber3
281
- autoflake_additional_imports: list[str] = ingredients.imports.exportListModuleIdentifiers()
282
- if packageName:
283
- autoflake_additional_imports.append(packageName)
284
- pythonSource = autoflake_fix_code(pythonSource, autoflake_additional_imports, expand_star_imports=False, remove_all_unused_imports=True, remove_duplicate_keys = False, remove_unused_variables = False)
285
- # pythonSource = python_minifier.minify(pythonSource, remove_annotations=False, hoist_literals=False)
286
- writeStringToHere(pythonSource, pathFilename)
287
-
288
162
  # END of acceptable classes and functions ======================================================
289
- def removeUnusedParameters(ingredientsFunction: IngredientsFunction) -> IngredientsFunction:
290
- """
291
- Removes unused parameters from a function's AST definition, return statement, and annotation.
292
-
293
- This function analyzes the Abstract Syntax Tree (AST) of a given function and removes
294
- any parameters that are not referenced within the function body. It updates the
295
- function signature, the return statement (if it's a tuple containing unused variables),
296
- and the return type annotation accordingly.
297
-
298
- Parameters
299
- ----------
300
- ingredientsFunction : IngredientsFunction
301
- An object containing the AST representation of a function to be processed.
302
-
303
- Returns
304
- -------
305
- IngredientsFunction
306
- The modified IngredientsFunction object with unused parameters and corresponding
307
- return elements/annotations removed from its AST.
308
-
309
- The modification is done in-place on the original AST nodes within the IngredientsFunction object.
310
- """
311
- list_argCuzMyBrainRefusesToThink = ingredientsFunction.astFunctionDef.args.args + ingredientsFunction.astFunctionDef.args.posonlyargs + ingredientsFunction.astFunctionDef.args.kwonlyargs
312
- list_arg_arg: list[ast_Identifier] = [ast_arg.arg for ast_arg in list_argCuzMyBrainRefusesToThink]
313
- listName: list[ast.Name] = []
314
- fauxFunctionDef = deepcopy(ingredientsFunction.astFunctionDef)
315
- NodeChanger(Be.Return, Then.removeIt).visit(fauxFunctionDef)
316
- NodeTourist(Be.Name, Then.appendTo(listName)).visit(fauxFunctionDef)
317
- list_Identifiers: list[ast_Identifier] = [astName.id for astName in listName]
318
- list_IdentifiersNotUsed: list[ast_Identifier] = list(set(list_arg_arg) - set(list_Identifiers))
319
- for arg_Identifier in list_IdentifiersNotUsed:
320
- remove_arg = NodeChanger(IfThis.is_arg_Identifier(arg_Identifier), Then.removeIt)
321
- remove_arg.visit(ingredientsFunction.astFunctionDef)
322
-
323
- list_argCuzMyBrainRefusesToThink = ingredientsFunction.astFunctionDef.args.args + ingredientsFunction.astFunctionDef.args.posonlyargs + ingredientsFunction.astFunctionDef.args.kwonlyargs
324
-
325
- listName: list[ast.Name] = [Make.Name(ast_arg.arg) for ast_arg in list_argCuzMyBrainRefusesToThink]
326
- replaceReturn = NodeChanger(Be.Return, Then.replaceWith(Make.Return(Make.Tuple(listName))))
327
- replaceReturn.visit(ingredientsFunction.astFunctionDef)
328
-
329
- list_annotation: list[ast.expr] = [ast_arg.annotation for ast_arg in list_argCuzMyBrainRefusesToThink if ast_arg.annotation is not None]
330
- ingredientsFunction.astFunctionDef.returns = Make.Subscript(Make.Name('tuple'), Make.Tuple(list_annotation))
331
-
332
- ast.fix_missing_locations(ingredientsFunction.astFunctionDef)
333
-
334
- return ingredientsFunction
335
-
336
163
  def makeNewFlow(recipeFlow: RecipeSynthesizeFlow) -> IngredientsModule:
337
164
  # Figure out dynamic flow control to synthesized modules https://github.com/hunterhogan/mapFolding/issues/4
338
165
  listAllIngredientsFunctions = [
@@ -374,7 +201,7 @@ def makeNewFlow(recipeFlow: RecipeSynthesizeFlow) -> IngredientsModule:
374
201
  for ingredients in listAllIngredientsFunctions:
375
202
  for source_Identifier, recipe_Identifier in listFindReplace:
376
203
  updateName = NodeChanger(IfThis.isName_Identifier(source_Identifier) , Grab.idAttribute(Then.replaceWith(recipe_Identifier)))
377
- update_arg = NodeChanger(IfThis.isArgument_Identifier(source_Identifier), Grab.argAttribute(Then.replaceWith(recipe_Identifier))) # type: ignore
204
+ update_arg = NodeChanger(IfThis.isArgument_Identifier(source_Identifier), Grab.argAttribute(Then.replaceWith(recipe_Identifier)))
378
205
  updateName.visit(ingredients.astFunctionDef)
379
206
  update_arg.visit(ingredients.astFunctionDef)
380
207
 
@@ -403,7 +230,7 @@ def makeNewFlow(recipeFlow: RecipeSynthesizeFlow) -> IngredientsModule:
403
230
  if recipeFlow.removeDataclassParallel:
404
231
  ingredientsParallel.astFunctionDef.args = Make.arguments(args=shatteredDataclass.list_argAnnotated4ArgumentsSpecification)
405
232
 
406
- ingredientsParallel.astFunctionDef = Z0Z_lameFindReplace(ingredientsParallel.astFunctionDef, shatteredDataclass.map_stateDOTfield2Name)
233
+ ingredientsParallel.astFunctionDef = unparseFindReplace(ingredientsParallel.astFunctionDef, shatteredDataclass.map_stateDOTfield2Name)
407
234
 
408
235
  ingredientsParallel = removeUnusedParameters(ingredientsParallel)
409
236
 
@@ -447,7 +274,7 @@ def removeDataclassFromFunction(ingredientsTarget: IngredientsFunction, shattere
447
274
  ingredientsTarget.astFunctionDef.returns = shatteredDataclass.signatureReturnAnnotation
448
275
  changeReturnCallable = NodeChanger(Be.Return, Then.replaceWith(Make.Return(shatteredDataclass.fragments4AssignmentOrParameters)))
449
276
  changeReturnCallable.visit(ingredientsTarget.astFunctionDef)
450
- ingredientsTarget.astFunctionDef = Z0Z_lameFindReplace(ingredientsTarget.astFunctionDef, shatteredDataclass.map_stateDOTfield2Name)
277
+ ingredientsTarget.astFunctionDef = unparseFindReplace(ingredientsTarget.astFunctionDef, shatteredDataclass.map_stateDOTfield2Name)
451
278
  return ingredientsTarget
452
279
 
453
280
  def unpackDataclassCallFunctionRepackDataclass(ingredientsCaller: IngredientsFunction, targetCallableIdentifier: ast_Identifier, shatteredDataclass: ShatteredDataclass) -> IngredientsFunction:
@@ -467,37 +294,3 @@ dictionaryEstimates: dict[tuple[int, ...], int] = {
467
294
  (3,3,3,3): 85109616000000000000000000000000,
468
295
  (8,8): 791274195985524900,
469
296
  }
470
-
471
- # END of marginal classes and functions ======================================================
472
- def Z0Z_lameFindReplace(astTree: 个, mappingFindReplaceNodes: Mapping[ast.AST, ast.AST]) -> 个:
473
- """
474
- Recursively replace AST nodes based on a mapping of find-replace pairs.
475
-
476
- This function applies brute-force node replacement throughout an AST tree
477
- by comparing textual representations of nodes. While not the most efficient
478
- approach, it provides a reliable way to replace complex nested structures
479
- when more precise targeting methods are difficult to implement.
480
-
481
- The function continues replacing nodes until no more changes are detected
482
- in the AST's textual representation, ensuring complete replacement throughout
483
- the tree structure.
484
-
485
- Parameters:
486
- astTree: The AST structure to modify.
487
- mappingFindReplaceNodes: A mapping from source nodes to replacement nodes.
488
-
489
- Returns:
490
- The modified AST structure with all matching nodes replaced.
491
- """
492
- keepGoing = True
493
- newTree = deepcopy(astTree)
494
-
495
- while keepGoing:
496
- for nodeFind, nodeReplace in mappingFindReplaceNodes.items():
497
- NodeChanger(IfThis.Z0Z_unparseIs(nodeFind), Then.replaceWith(nodeReplace)).visit(newTree)
498
-
499
- if ast.unparse(newTree) == ast.unparse(astTree):
500
- keepGoing = False
501
- else:
502
- astTree = deepcopy(newTree)
503
- return newTree
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: mapFolding
3
- Version: 0.10.0
3
+ Version: 0.11.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
@@ -31,6 +31,7 @@ Classifier: Typing :: Typed
31
31
  Requires-Python: >=3.10
32
32
  Description-Content-Type: text/markdown
33
33
  License-File: LICENSE
34
+ Requires-Dist: astToolkit
34
35
  Requires-Dist: autoflake
35
36
  Requires-Dist: cytoolz
36
37
  Requires-Dist: more_itertools
@@ -1,4 +1,4 @@
1
- mapFolding/__init__.py,sha256=vIUZ4w4Hr12xPhSXIrnoG7-jg59VeEl5KbaOfmMRjTA,5403
1
+ mapFolding/__init__.py,sha256=P2guQYFN19PSAl8yd9NQjIapMvZnZlasPOvKJ1KUGvA,4883
2
2
  mapFolding/basecamp.py,sha256=hs7hlTmbX7KTjI_eIRVU4xn7HR4l448SIpHk1cKDwRk,8071
3
3
  mapFolding/beDRY.py,sha256=JQ7T9v4aKzweGjvpzyghyq4N9l3Wf9HZco_K_DWoiW0,15368
4
4
  mapFolding/daoOfMapFolding.py,sha256=ncTIiBfTsM8SNVx9qefZ0bBcBtviWLSk4iPv3Z9nGiE,5442
@@ -22,24 +22,15 @@ mapFolding/reference/jobsCompleted/__init__.py,sha256=TU93ZGUW1xEkT6d9mQFn_rp5Dv
22
22
  mapFolding/reference/jobsCompleted/[2x19]/p2x19.py,sha256=_tvYtfzMWVo2VtUbIAieoscb4N8FFflgTdW4-ljBUuA,19626
23
23
  mapFolding/reference/jobsCompleted/p2x19/p2x19.py,sha256=eZEw4Me4ocTt6VXoK2-Sbd5SowZtxRIbN9dZmc7OCVg,6395
24
24
  mapFolding/someAssemblyRequired/RecipeJob.py,sha256=6RD4F4Yde7K-Rz0F4IokQ62BVzRSx4vCCYY4H-Dfug4,10190
25
- mapFolding/someAssemblyRequired/Z0Z_makeSomeModules.py,sha256=ni7twaO2Pkrhg-BXuxysF-reNLb79_jcpQp6AcHJ98E,15770
26
- mapFolding/someAssemblyRequired/__init__.py,sha256=4PIwIa8iAX3h3O2_bdWjsfiFtHwnXCY85x6EdJrmh0g,3882
27
- mapFolding/someAssemblyRequired/_astTypes.py,sha256=EwLxEtbZwUtaRlt4tWwiTvaoeGR4_V3hdX8Xi3Z8w1E,7809
28
- mapFolding/someAssemblyRequired/_theTypes.py,sha256=8Ako7EVwciwdNoXLTpAQaOgMTgQv2HysXzPPYMwBv68,3107
29
- mapFolding/someAssemblyRequired/_toolBe.py,sha256=bT64xwj_lGJZZB6FyY46alFZENZ2LlJdb2kO47L643Q,16400
30
- mapFolding/someAssemblyRequired/_toolDOT.py,sha256=JpEpW0mZRFFYzlIhQQtD15rKSzEESXfzX6i0aH95YK0,12727
31
- mapFolding/someAssemblyRequired/_toolGrab.py,sha256=oMrTMVky5BIEo9GEXA3AVlElGtPd10gIR6jIEWWsFV8,25327
32
- mapFolding/someAssemblyRequired/_toolIfThis.py,sha256=DsvXHvi27YGC8TZMm6WlV6YsK0ruVPVPQRip0wrpvlk,10223
33
- mapFolding/someAssemblyRequired/_toolMake.py,sha256=X54TBZysYEcVOmtBSTZoW80kmJJS-yYFwRvN_19uU_8,18282
34
- mapFolding/someAssemblyRequired/_toolThen.py,sha256=RFp1h8FQroBIR3F-TtXJo3j7wS_XKFAvLWly93PkZiE,2584
35
- mapFolding/someAssemblyRequired/_toolboxAST.py,sha256=-hlKH0gYCY4Srx1azL8SK2RLbYYRw0a0i3qaYcnx8L0,2376
36
- mapFolding/someAssemblyRequired/_toolboxContainers.py,sha256=5Y9-X-SyCkrxpn164PICvcimPE89Tgcnksm7N5wqOnU,30117
37
- mapFolding/someAssemblyRequired/_toolboxPython.py,sha256=1K7IzqzmHNTaPA6qTo73GZYHCIQRYI2Rn8aYJ3VelqY,7873
25
+ mapFolding/someAssemblyRequired/Z0Z_makeSomeModules.py,sha256=Ss9YlFAAodsydiYWz9TrcTneeYn_IUR2iQfEPjFf3IY,15805
26
+ mapFolding/someAssemblyRequired/__init__.py,sha256=p2mbSsdEefBu0Hnwuis91cnSr0i49ZV9_bhfncGLxls,3571
27
+ mapFolding/someAssemblyRequired/_toolIfThis.py,sha256=Ey6byfbpzRmgrnuOVIA9M068Lo7S1Jk6wzNgBMPci3A,3140
28
+ mapFolding/someAssemblyRequired/_toolboxContainers.py,sha256=DZDFfCcRsCY0wFlkoZ9l8Ozw7bsT5OA3qMcG2KnABGI,16003
38
29
  mapFolding/someAssemblyRequired/getLLVMforNoReason.py,sha256=9RPU6vK_eUg64GtVFI_nZnvUryXw8gfHJs9NyDYHIvg,2745
39
- mapFolding/someAssemblyRequired/makeJobTheorem2Numba.py,sha256=5j3fLdiVHv7OlH-RR-fjeevRXnLrmUJpeXleHytDoF4,13830
40
- mapFolding/someAssemblyRequired/synthesizeNumbaJob.py,sha256=9D0VLOAttfyTcf8GFko_QhRS5steSQo6FvWHD5xQLGc,15597
41
- mapFolding/someAssemblyRequired/toolboxNumba.py,sha256=QIpYCf1IFfgrQ5GVA0ON0ymn324iBfkyHVSfBW5CqOY,8961
42
- mapFolding/someAssemblyRequired/transformationTools.py,sha256=Kd_eVIgBHMdsZwOIe9hxST0x1JfqgCR26OyNBYjDSY0,29307
30
+ mapFolding/someAssemblyRequired/makeJobTheorem2Numba.py,sha256=zZFfHhNG0VWaCigeHID-eAWQBRbYmo_59JycdstxJTc,13784
31
+ mapFolding/someAssemblyRequired/synthesizeNumbaJob.py,sha256=4ZwOQA4FWrILYe5eiawTZgeTiJ7RRUUCpI0Th5Mezso,15668
32
+ mapFolding/someAssemblyRequired/toolboxNumba.py,sha256=LZdosArlkNzFUwy8BMhswivW5xfhREAPyx2ApNOuse8,8961
33
+ mapFolding/someAssemblyRequired/transformationTools.py,sha256=o4gORDvDuTnTPofeDLwfZItW5MFJljNcHagVprJeBU4,18966
43
34
  mapFolding/syntheticModules/__init__.py,sha256=evVFqhCGa-WZKDiLcnQWjs-Bj34eRnfSLqz_d7dFYZY,83
44
35
  mapFolding/syntheticModules/daoOfMapFolding.py,sha256=cfWPABtXyCxJ0BwPI7rhfLh_2UYV_XKAL8lJ4GLNXaQ,5896
45
36
  mapFolding/syntheticModules/dataPacking.py,sha256=J4WLJzQTOAm2d8itzWWSixTUcCGQl4KuEfqrzkb2tJQ,2294
@@ -48,10 +39,7 @@ mapFolding/syntheticModules/numbaCount.py,sha256=zM-bp07c9tEDdvidwzZ_bJTd0JC0VUk
48
39
  mapFolding/syntheticModules/theorem2.py,sha256=9jrbZNNX4BWYZW1S0JjvRY2k7RU7I1RNUMV7JdCt1ZY,3017
49
40
  mapFolding/syntheticModules/theorem2Numba.py,sha256=-cKjNyxgUMFhEyFVs0VJ7hw4LfrV0WSNK5tPYbQ1oNU,3369
50
41
  mapFolding/syntheticModules/theorem2Trimmed.py,sha256=DHW3NxBdtABQYBKm2WRvfQ5kzc2_UwGI2h4ePuYEJoM,2685
51
- mapFolding/toolFactory/astFactory.py,sha256=3FJUx_O7L7rM9gyeUvYGB1rRm0gmqiTos4_CjboQ4KI,28777
52
- mapFolding/toolFactory/astFactory_annex.py,sha256=pTULZ8bJ4ioojK2VQ2636rvlHflT0GbSeHYjm2kooqE,5948
53
- mapFolding/toolFactory/astFactory_docstrings.py,sha256=aX2JR5cXMe2znIrvWxLeK74jQebMWwGX4U0sk-iexWQ,3406
54
- mapfolding-0.10.0.dist-info/licenses/LICENSE,sha256=NxH5Y8BdC-gNU-WSMwim3uMbID2iNDXJz7fHtuTdXhk,19346
42
+ mapfolding-0.11.1.dist-info/licenses/LICENSE,sha256=NxH5Y8BdC-gNU-WSMwim3uMbID2iNDXJz7fHtuTdXhk,19346
55
43
  tests/__init__.py,sha256=5VhHf0JJ2_DSh58zJ0rR5UkpoCon-0IkdljspTCzZ04,1950
56
44
  tests/conftest.py,sha256=x8zMZQyTss3sn0GwHm_TSRwD9_LVlR8l_qF8r43Vxl4,14178
57
45
  tests/test_computations.py,sha256=5sg1PpSp6aeOrXZeO5NwWK5ipPAe49wVKC2J7yT5MFg,6524
@@ -59,8 +47,8 @@ tests/test_filesystem.py,sha256=T2DkjBoI3lW6tCxd5BilPmUFrVukNKLjOOZVZxLM560,3004
59
47
  tests/test_oeis.py,sha256=uxvwmgbnylSDdsVJfuAT0LuYLbIVFwSgdLxHm-xUGBM,5043
60
48
  tests/test_other.py,sha256=UMlK4JPInalpOZuPvTnUrgXWCJOxAw-OsPs6CxMR254,3753
61
49
  tests/test_tasks.py,sha256=tOQc4uomKXGwWnENfbcThaVa1XofwXNCkGZbg4yS6VI,2833
62
- mapfolding-0.10.0.dist-info/METADATA,sha256=jcIwCSmk1EYzJDUvvQ3BE5-VYswynF9onfnMS7Humlg,7534
63
- mapfolding-0.10.0.dist-info/WHEEL,sha256=SmOxYU7pzNKBqASvQJ7DjX3XGUF92lrGhMb3R6_iiqI,91
64
- mapfolding-0.10.0.dist-info/entry_points.txt,sha256=F3OUeZR1XDTpoH7k3wXuRb3KF_kXTTeYhu5AGK1SiOQ,146
65
- mapfolding-0.10.0.dist-info/top_level.txt,sha256=1gP2vFaqPwHujGwb3UjtMlLEGN-943VSYFR7V4gDqW8,17
66
- mapfolding-0.10.0.dist-info/RECORD,,
50
+ mapfolding-0.11.1.dist-info/METADATA,sha256=z1Z2MfDiXFSxbortwiHbjCex9X3zD9RvC7qWYs4l50g,7560
51
+ mapfolding-0.11.1.dist-info/WHEEL,sha256=ck4Vq1_RXyvS4Jt6SI0Vz6fyVs4GWg7AINwpsaGEgPE,91
52
+ mapfolding-0.11.1.dist-info/entry_points.txt,sha256=F3OUeZR1XDTpoH7k3wXuRb3KF_kXTTeYhu5AGK1SiOQ,146
53
+ mapfolding-0.11.1.dist-info/top_level.txt,sha256=1gP2vFaqPwHujGwb3UjtMlLEGN-943VSYFR7V4gDqW8,17
54
+ mapfolding-0.11.1.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (79.0.1)
2
+ Generator: setuptools (80.0.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
@@ -1,117 +0,0 @@
1
- """This file is generated automatically, so changes to this file will be lost."""
2
- from mapFolding import astDOTParamSpec, astDOTTryStar, astDOTTypeAlias, astDOTTypeVar, astDOTTypeVarTuple, astDOTtype_param
3
- from typing import Any, TypeAlias as typing_TypeAlias
4
- import ast
5
- intORstr: typing_TypeAlias = Any
6
- intORstrORtype_params: typing_TypeAlias = Any
7
- intORtype_params: typing_TypeAlias = Any
8
- hasDOTannotation_expr: typing_TypeAlias = ast.AnnAssign
9
- hasDOTannotation_exprOrNone: typing_TypeAlias = ast.arg
10
- hasDOTannotation: typing_TypeAlias = hasDOTannotation_expr | hasDOTannotation_exprOrNone
11
- hasDOTarg_Identifier: typing_TypeAlias = ast.arg
12
- hasDOTarg_IdentifierOrNone: typing_TypeAlias = ast.keyword
13
- hasDOTarg: typing_TypeAlias = hasDOTarg_Identifier | hasDOTarg_IdentifierOrNone
14
- hasDOTargs_arguments: typing_TypeAlias = ast.FunctionDef | ast.AsyncFunctionDef | ast.Lambda
15
- hasDOTargs_list_expr: typing_TypeAlias = ast.Call
16
- hasDOTargs_list_arg: typing_TypeAlias = ast.arguments
17
- hasDOTargs: typing_TypeAlias = hasDOTargs_arguments | hasDOTargs_list_expr | hasDOTargs_list_arg
18
- hasDOTargtypes: typing_TypeAlias = ast.FunctionType
19
- hasDOTasname: typing_TypeAlias = ast.alias
20
- hasDOTattr: typing_TypeAlias = ast.Attribute
21
- hasDOTbases: typing_TypeAlias = ast.ClassDef
22
- hasDOTbody_list_stmt: typing_TypeAlias = ast.Module | ast.Interactive | ast.FunctionDef | ast.AsyncFunctionDef | ast.ClassDef | ast.For | ast.AsyncFor | ast.While | ast.If | ast.With | ast.AsyncWith | ast.Try | ast.ExceptHandler | astDOTTryStar | ast.match_case
23
- hasDOTbody_expr: typing_TypeAlias = ast.Expression | ast.Lambda | ast.IfExp
24
- hasDOTbody: typing_TypeAlias = hasDOTbody_list_stmt | hasDOTbody_expr
25
- hasDOTbound: typing_TypeAlias = astDOTTypeVar
26
- hasDOTcases: typing_TypeAlias = ast.Match
27
- hasDOTcause: typing_TypeAlias = ast.Raise
28
- hasDOTcls: typing_TypeAlias = ast.MatchClass
29
- hasDOTcomparators: typing_TypeAlias = ast.Compare
30
- hasDOTcontext_expr: typing_TypeAlias = ast.withitem
31
- hasDOTconversion: typing_TypeAlias = ast.FormattedValue
32
- hasDOTctx: typing_TypeAlias = ast.Attribute | ast.Subscript | ast.Starred | ast.Name | ast.List | ast.Tuple
33
- hasDOTdecorator_list: typing_TypeAlias = ast.FunctionDef | ast.AsyncFunctionDef | ast.ClassDef
34
- hasDOTdefault_value: typing_TypeAlias = astDOTTypeVar | astDOTParamSpec | astDOTTypeVarTuple
35
- hasDOTdefaults: typing_TypeAlias = ast.arguments
36
- hasDOTelt: typing_TypeAlias = ast.ListComp | ast.SetComp | ast.GeneratorExp
37
- hasDOTelts: typing_TypeAlias = ast.Set | ast.List | ast.Tuple
38
- hasDOTexc: typing_TypeAlias = ast.Raise
39
- hasDOTfinalbody: typing_TypeAlias = ast.Try | astDOTTryStar
40
- hasDOTformat_spec: typing_TypeAlias = ast.FormattedValue
41
- hasDOTfunc: typing_TypeAlias = ast.Call
42
- hasDOTgenerators: typing_TypeAlias = ast.ListComp | ast.SetComp | ast.DictComp | ast.GeneratorExp
43
- hasDOTguard: typing_TypeAlias = ast.match_case
44
- hasDOThandlers: typing_TypeAlias = ast.Try | astDOTTryStar
45
- hasDOTid: typing_TypeAlias = ast.Name
46
- hasDOTifs: typing_TypeAlias = ast.comprehension
47
- hasDOTis_async: typing_TypeAlias = ast.comprehension
48
- hasDOTitems: typing_TypeAlias = ast.With | ast.AsyncWith
49
- hasDOTiter: typing_TypeAlias = ast.For | ast.AsyncFor | ast.comprehension
50
- hasDOTkey: typing_TypeAlias = ast.DictComp
51
- hasDOTkeys_list_exprOrNone: typing_TypeAlias = ast.Dict
52
- hasDOTkeys_list_expr: typing_TypeAlias = ast.MatchMapping
53
- hasDOTkeys: typing_TypeAlias = hasDOTkeys_list_exprOrNone | hasDOTkeys_list_expr
54
- hasDOTkeywords: typing_TypeAlias = ast.ClassDef | ast.Call
55
- hasDOTkind: typing_TypeAlias = ast.Constant
56
- hasDOTkw_defaults: typing_TypeAlias = ast.arguments
57
- hasDOTkwarg: typing_TypeAlias = ast.arguments
58
- hasDOTkwd_attrs: typing_TypeAlias = ast.MatchClass
59
- hasDOTkwd_patterns: typing_TypeAlias = ast.MatchClass
60
- hasDOTkwonlyargs: typing_TypeAlias = ast.arguments
61
- hasDOTleft: typing_TypeAlias = ast.BinOp | ast.Compare
62
- hasDOTlevel: typing_TypeAlias = ast.ImportFrom
63
- hasDOTlineno: typing_TypeAlias = ast.TypeIgnore
64
- hasDOTlower: typing_TypeAlias = ast.Slice
65
- hasDOTmodule: typing_TypeAlias = ast.ImportFrom
66
- hasDOTmsg: typing_TypeAlias = ast.Assert
67
- hasDOTname_Identifier: typing_TypeAlias = ast.FunctionDef | ast.AsyncFunctionDef | ast.ClassDef | astDOTTypeVar | astDOTParamSpec | astDOTTypeVarTuple
68
- hasDOTname_IdentifierOrNone: typing_TypeAlias = ast.ExceptHandler | ast.MatchStar | ast.MatchAs
69
- hasDOTname_str: typing_TypeAlias = ast.alias
70
- hasDOTname_Name: typing_TypeAlias = astDOTTypeAlias
71
- hasDOTname: typing_TypeAlias = hasDOTname_Identifier | hasDOTname_IdentifierOrNone | hasDOTname_str | hasDOTname_Name
72
- hasDOTnames_list_alias: typing_TypeAlias = ast.Import | ast.ImportFrom
73
- hasDOTnames_list_Identifier: typing_TypeAlias = ast.Global | ast.Nonlocal
74
- hasDOTnames: typing_TypeAlias = hasDOTnames_list_alias | hasDOTnames_list_Identifier
75
- hasDOTop_operator: typing_TypeAlias = ast.AugAssign | ast.BinOp
76
- hasDOTop_boolop: typing_TypeAlias = ast.BoolOp
77
- hasDOTop_unaryop: typing_TypeAlias = ast.UnaryOp
78
- hasDOTop: typing_TypeAlias = hasDOTop_operator | hasDOTop_boolop | hasDOTop_unaryop
79
- hasDOToperand: typing_TypeAlias = ast.UnaryOp
80
- hasDOTops: typing_TypeAlias = ast.Compare
81
- hasDOToptional_vars: typing_TypeAlias = ast.withitem
82
- hasDOTorelse_list_stmt: typing_TypeAlias = ast.For | ast.AsyncFor | ast.While | ast.If | ast.Try | astDOTTryStar
83
- hasDOTorelse_expr: typing_TypeAlias = ast.IfExp
84
- hasDOTorelse: typing_TypeAlias = hasDOTorelse_list_stmt | hasDOTorelse_expr
85
- hasDOTpattern_pattern: typing_TypeAlias = ast.match_case
86
- hasDOTpattern_patternOrNone: typing_TypeAlias = ast.MatchAs
87
- hasDOTpattern: typing_TypeAlias = hasDOTpattern_pattern | hasDOTpattern_patternOrNone
88
- hasDOTpatterns: typing_TypeAlias = ast.MatchSequence | ast.MatchMapping | ast.MatchClass | ast.MatchOr
89
- hasDOTposonlyargs: typing_TypeAlias = ast.arguments
90
- hasDOTrest: typing_TypeAlias = ast.MatchMapping
91
- hasDOTreturns_expr: typing_TypeAlias = ast.FunctionType
92
- hasDOTreturns_exprOrNone: typing_TypeAlias = ast.FunctionDef | ast.AsyncFunctionDef
93
- hasDOTreturns: typing_TypeAlias = hasDOTreturns_expr | hasDOTreturns_exprOrNone
94
- hasDOTright: typing_TypeAlias = ast.BinOp
95
- hasDOTsimple: typing_TypeAlias = ast.AnnAssign
96
- hasDOTslice: typing_TypeAlias = ast.Subscript
97
- hasDOTstep: typing_TypeAlias = ast.Slice
98
- hasDOTsubject: typing_TypeAlias = ast.Match
99
- hasDOTtag: typing_TypeAlias = ast.TypeIgnore
100
- hasDOTtarget_NameOrAttributeOrSubscript: typing_TypeAlias = ast.AugAssign | ast.AnnAssign
101
- hasDOTtarget_expr: typing_TypeAlias = ast.For | ast.AsyncFor | ast.comprehension
102
- hasDOTtarget_Name: typing_TypeAlias = ast.NamedExpr
103
- hasDOTtarget: typing_TypeAlias = hasDOTtarget_NameOrAttributeOrSubscript | hasDOTtarget_expr | hasDOTtarget_Name
104
- hasDOTtargets: typing_TypeAlias = ast.Delete | ast.Assign
105
- hasDOTtest: typing_TypeAlias = ast.While | ast.If | ast.Assert | ast.IfExp
106
- hasDOTtype: typing_TypeAlias = ast.ExceptHandler
107
- hasDOTtype_comment: typing_TypeAlias = ast.FunctionDef | ast.AsyncFunctionDef | ast.Assign | ast.For | ast.AsyncFor | ast.With | ast.AsyncWith | ast.arg
108
- hasDOTtype_ignores: typing_TypeAlias = ast.Module
109
- hasDOTtype_params: typing_TypeAlias = ast.FunctionDef | ast.AsyncFunctionDef | ast.ClassDef | astDOTTypeAlias
110
- hasDOTupper: typing_TypeAlias = ast.Slice
111
- hasDOTvalue_exprOrNone: typing_TypeAlias = ast.Return | ast.AnnAssign | ast.Yield
112
- hasDOTvalue_expr: typing_TypeAlias = ast.Assign | ast.AugAssign | ast.Expr | ast.NamedExpr | ast.DictComp | ast.Await | ast.YieldFrom | ast.FormattedValue | ast.Attribute | ast.Subscript | ast.Starred | ast.keyword | astDOTTypeAlias | ast.MatchValue
113
- hasDOTvalue_Any: typing_TypeAlias = ast.Constant
114
- hasDOTvalue_LiteralTrueFalseOrNone: typing_TypeAlias = ast.MatchSingleton
115
- hasDOTvalue: typing_TypeAlias = hasDOTvalue_exprOrNone | hasDOTvalue_expr | hasDOTvalue_Any | hasDOTvalue_LiteralTrueFalseOrNone
116
- hasDOTvalues: typing_TypeAlias = ast.BoolOp | ast.Dict | ast.JoinedStr
117
- hasDOTvararg: typing_TypeAlias = ast.arguments
@@ -1,34 +0,0 @@
1
- from mapFolding import astDOTParamSpec, astDOTTryStar, astDOTtype_param, astDOTTypeAlias, astDOTTypeVar, astDOTTypeVarTuple
2
- from typing import Any, TypeAlias as typing_TypeAlias, TypeVar as typing_TypeVar
3
- import ast
4
-
5
- # TODO understand typing.
6
-
7
- # NOTE Prototype of an idea to subclass composable methods so that typing information
8
- # can extend beyond the top level of the ast node.
9
- class ImaCallToName(ast.Call):
10
- func: ast.Name # pyright: ignore[reportIncompatibleVariableOverride]
11
-
12
- # Type hints through TypeAlias or type "hints" through the identifier name.
13
- ast_expr_Slice: typing_TypeAlias = ast.expr
14
- ast_Identifier: typing_TypeAlias = str
15
- str_nameDOTname: typing_TypeAlias = str
16
-
17
- # Limited success with TypeVar.
18
- 个 = typing_TypeVar('个', bound = ast.AST, covariant = True)
19
- NodeORattribute = typing_TypeVar('NodeORattribute', bound = ast.AST | ast_expr_Slice | ast_Identifier | str_nameDOTname | bool | Any | None, covariant = True)
20
-
21
- # For my reference, all ast classes by subgroup:
22
- Ima_ast_boolop: typing_TypeAlias = ast.boolop | ast.And | ast.Or
23
- Ima_ast_cmpop: typing_TypeAlias = ast.cmpop | ast.Eq | ast.NotEq | ast.Lt | ast.LtE | ast.Gt | ast.GtE | ast.Is | ast.IsNot | ast.In | ast.NotIn
24
- Ima_ast_excepthandler: typing_TypeAlias = ast.excepthandler | ast.ExceptHandler
25
- Ima_ast_expr_context: typing_TypeAlias = ast.expr_context | ast.Load | ast.Store | ast.Del
26
- Ima_ast_expr: typing_TypeAlias = ast.expr | ast.Attribute | ast.Await | ast.BinOp | ast.BoolOp | ast.Call | ast.Compare | ast.Constant | ast.Dict | ast.DictComp | ast.FormattedValue | ast.GeneratorExp | ast.IfExp | ast.JoinedStr | ast.Lambda | ast.List | ast.ListComp | ast.Name | ast.NamedExpr | ast.Set | ast.SetComp | ast.Slice | ast.Starred | ast.Subscript | ast.Tuple | ast.UnaryOp | ast.Yield | ast.YieldFrom
27
- Ima_ast_mod: typing_TypeAlias = ast.mod | ast.Expression | ast.FunctionType | ast.Interactive | ast.Module
28
- Ima_ast_operator: typing_TypeAlias = ast.operator | ast.Add | ast.Sub | ast.Mult | ast.MatMult | ast.Div | ast.Mod | ast.Pow | ast.LShift | ast.RShift | ast.BitOr | ast.BitXor | ast.BitAnd | ast.FloorDiv
29
- Ima_ast_orphan = ast.alias | ast.arg | ast.arguments | ast.comprehension | ast.keyword | ast.match_case | ast.withitem
30
- iMa_ast_pattern: typing_TypeAlias = ast.pattern | ast.MatchAs | ast.MatchClass | ast.MatchMapping | ast.MatchOr | ast.MatchSequence | ast.MatchSingleton | ast.MatchStar | ast.MatchValue
31
- Ima_ast_stmt: typing_TypeAlias = ast.stmt | ast.AnnAssign | ast.Assert | ast.Assign | ast.AsyncFor | ast.AsyncFunctionDef | ast.AsyncWith | ast.AugAssign | ast.Break | ast.ClassDef | ast.Continue | ast.Delete | ast.Expr | ast.For | ast.FunctionDef | ast.Global | ast.If | ast.Import | ast.ImportFrom | ast.Match | ast.Nonlocal | ast.Pass | ast.Raise | ast.Return | ast.Try | astDOTTryStar | astDOTTypeAlias | ast.While | ast.With
32
- Ima_ast_type_ignore: typing_TypeAlias = ast.type_ignore | ast.TypeIgnore
33
- Ima_ast_type_param: typing_TypeAlias = astDOTtype_param | astDOTParamSpec | astDOTTypeVar | astDOTTypeVarTuple
34
- Ima_ast_unaryop: typing_TypeAlias = ast.unaryop | ast.Invert | ast.Not | ast.UAdd | ast.USub