mapFolding 0.17.0__py3-none-any.whl → 0.18.0__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 (245) hide show
  1. easyRun/NOTcountingFolds.py +16 -10
  2. easyRun/__init__.py +1 -0
  3. easyRun/countFolds.py +17 -9
  4. easyRun/meanders.py +6 -8
  5. mapFolding/__init__.py +24 -35
  6. mapFolding/_e/Z0Z_analysisPython/SORTZ0Z_hypothesis.py +189 -0
  7. mapFolding/_e/Z0Z_analysisPython/SORTZ0Z_p2d6.py +143 -0
  8. mapFolding/_e/Z0Z_analysisPython/__init__.py +4 -0
  9. mapFolding/_e/Z0Z_analysisPython/exclusionData/__init__.py +0 -0
  10. mapFolding/_e/Z0Z_analysisPython/exclusionData/aggregated/351/246/226/344/270/200.py +369 -0
  11. mapFolding/_e/Z0Z_analysisPython/exclusionData/aggregated/351/246/226/344/270/2001.py +694 -0
  12. mapFolding/_e/Z0Z_analysisPython/exclusionData/aggregated/351/246/226/344/270/200/344/270/211.py +514 -0
  13. mapFolding/_e/Z0Z_analysisPython/exclusionData/aggregated/351/246/226/344/270/200/344/270/2111.py +480 -0
  14. mapFolding/_e/Z0Z_analysisPython/exclusionData/aggregated/351/246/226/344/270/200/344/272/214.py +511 -0
  15. mapFolding/_e/Z0Z_analysisPython/exclusionData/aggregated/351/246/226/344/270/200/344/272/2141.py +515 -0
  16. mapFolding/_e/Z0Z_analysisPython/exclusionData/aggregated/351/246/226/344/270/200/344/272/214/344/270/211.py +485 -0
  17. mapFolding/_e/Z0Z_analysisPython/exclusionData/aggregated/351/246/226/344/270/200/344/272/214/344/270/2111.py +442 -0
  18. mapFolding/_e/Z0Z_analysisPython/exclusionData/aggregated/351/246/226/344/270/211.py +313 -0
  19. mapFolding/_e/Z0Z_analysisPython/exclusionData/aggregated/351/246/226/344/270/2111.py +343 -0
  20. mapFolding/_e/Z0Z_analysisPython/exclusionData/aggregated/351/246/226/344/272/214.py +400 -0
  21. mapFolding/_e/Z0Z_analysisPython/exclusionData/aggregated/351/246/226/344/272/2141.py +497 -0
  22. mapFolding/_e/Z0Z_analysisPython/exclusionData/aggregated/351/246/226/344/272/214/344/270/211.py +463 -0
  23. mapFolding/_e/Z0Z_analysisPython/exclusionData/aggregated/351/246/226/344/272/214/344/270/2111.py +441 -0
  24. mapFolding/_e/Z0Z_analysisPython/exclusionData/aggregated/351/246/226/351/233/266.py +35 -0
  25. mapFolding/_e/Z0Z_analysisPython/exclusionData/aggregated/351/246/226/351/233/2661.py +35 -0
  26. mapFolding/_e/Z0Z_analysisPython/exclusionData/aggregated/351/246/226/351/233/266/344/270/200.py +382 -0
  27. mapFolding/_e/Z0Z_analysisPython/exclusionData/aggregated/351/246/226/351/233/266/344/270/2001.py +630 -0
  28. mapFolding/_e/Z0Z_analysisPython/exclusionData/aggregated/351/246/226/351/233/266/344/270/200/344/270/211.py +488 -0
  29. mapFolding/_e/Z0Z_analysisPython/exclusionData/aggregated/351/246/226/351/233/266/344/270/200/344/270/2111.py +475 -0
  30. mapFolding/_e/Z0Z_analysisPython/exclusionData/aggregated/351/246/226/351/233/266/344/270/200/344/272/214.py +473 -0
  31. mapFolding/_e/Z0Z_analysisPython/exclusionData/aggregated/351/246/226/351/233/266/344/270/200/344/272/2141.py +500 -0
  32. mapFolding/_e/Z0Z_analysisPython/exclusionData/aggregated/351/246/226/351/233/266/344/270/200/344/272/214/344/270/211.py +465 -0
  33. mapFolding/_e/Z0Z_analysisPython/exclusionData/aggregated/351/246/226/351/233/266/344/270/200/344/272/214/344/270/2111.py +439 -0
  34. mapFolding/_e/Z0Z_analysisPython/exclusionData/aggregated/351/246/226/351/233/266/344/270/211.py +599 -0
  35. mapFolding/_e/Z0Z_analysisPython/exclusionData/aggregated/351/246/226/351/233/266/344/270/2111.py +536 -0
  36. mapFolding/_e/Z0Z_analysisPython/exclusionData/aggregated/351/246/226/351/233/266/344/272/214.py +506 -0
  37. mapFolding/_e/Z0Z_analysisPython/exclusionData/aggregated/351/246/226/351/233/266/344/272/2141.py +533 -0
  38. mapFolding/_e/Z0Z_analysisPython/exclusionData/aggregated/351/246/226/351/233/266/344/272/214/344/270/211.py +489 -0
  39. mapFolding/_e/Z0Z_analysisPython/exclusionData/aggregated/351/246/226/351/233/266/344/272/214/344/270/2111.py +474 -0
  40. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/344/270/200.py +1186 -0
  41. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/344/270/2001.py +2158 -0
  42. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/344/270/2001Negative.py +2158 -0
  43. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/344/270/200Negative.py +1186 -0
  44. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/344/270/200/344/270/211.py +1397 -0
  45. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/344/270/200/344/270/2111.py +1291 -0
  46. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/344/270/200/344/270/2111Negative.py +1291 -0
  47. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/344/270/200/344/270/211Negative.py +1397 -0
  48. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/344/270/200/344/272/214.py +1240 -0
  49. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/344/270/200/344/272/2141.py +1420 -0
  50. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/344/270/200/344/272/2141Negative.py +1420 -0
  51. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/344/270/200/344/272/214Negative.py +1240 -0
  52. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/344/270/200/344/272/214/344/270/211.py +1366 -0
  53. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/344/270/200/344/272/214/344/270/2111.py +1274 -0
  54. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/344/270/200/344/272/214/344/270/2111Negative.py +1274 -0
  55. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/344/270/200/344/272/214/344/270/211Negative.py +1366 -0
  56. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/344/270/211.py +1186 -0
  57. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/344/270/2111.py +1186 -0
  58. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/344/270/2111Negative.py +1186 -0
  59. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/344/270/211Negative.py +1186 -0
  60. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/344/272/214.py +1102 -0
  61. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/344/272/2141.py +1422 -0
  62. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/344/272/2141Negative.py +1422 -0
  63. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/344/272/214Negative.py +1102 -0
  64. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/344/272/214/344/270/211.py +1240 -0
  65. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/344/272/214/344/270/2111.py +1228 -0
  66. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/344/272/214/344/270/2111Negative.py +1228 -0
  67. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/344/272/214/344/270/211Negative.py +1240 -0
  68. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/351/233/266.py +32 -0
  69. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/351/233/2661.py +1162 -0
  70. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/351/233/2661Negative.py +1162 -0
  71. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/351/233/266Negative.py +32 -0
  72. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/351/233/266/344/270/200.py +1186 -0
  73. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/351/233/266/344/270/2001.py +1926 -0
  74. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/351/233/266/344/270/2001Negative.py +1926 -0
  75. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/351/233/266/344/270/200Negative.py +1186 -0
  76. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/351/233/266/344/270/200/344/270/211.py +1291 -0
  77. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/351/233/266/344/270/200/344/270/2111.py +1176 -0
  78. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/351/233/266/344/270/200/344/270/2111Negative.py +1176 -0
  79. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/351/233/266/344/270/200/344/270/211Negative.py +1291 -0
  80. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/351/233/266/344/270/200/344/272/214.py +1228 -0
  81. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/351/233/266/344/270/200/344/272/2141.py +1324 -0
  82. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/351/233/266/344/270/200/344/272/2141Negative.py +1324 -0
  83. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/351/233/266/344/270/200/344/272/214Negative.py +1228 -0
  84. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/351/233/266/344/270/200/344/272/214/344/270/211.py +1274 -0
  85. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/351/233/266/344/270/200/344/272/214/344/270/2111.py +1038 -0
  86. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/351/233/266/344/270/200/344/272/214/344/270/2111Negative.py +1038 -0
  87. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/351/233/266/344/270/200/344/272/214/344/270/211Negative.py +1274 -0
  88. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/351/233/266/344/270/211.py +2158 -0
  89. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/351/233/266/344/270/2111.py +1926 -0
  90. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/351/233/266/344/270/2111Negative.py +1926 -0
  91. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/351/233/266/344/270/211Negative.py +2158 -0
  92. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/351/233/266/344/272/214.py +1422 -0
  93. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/351/233/266/344/272/2141.py +1364 -0
  94. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/351/233/266/344/272/2141Negative.py +1364 -0
  95. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/351/233/266/344/272/214Negative.py +1422 -0
  96. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/351/233/266/344/272/214/344/270/211.py +1420 -0
  97. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/351/233/266/344/272/214/344/270/2111.py +1324 -0
  98. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/351/233/266/344/272/214/344/270/2111Negative.py +1324 -0
  99. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/351/233/266/344/272/214/344/270/211Negative.py +1420 -0
  100. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/344/270/200.py +3133 -0
  101. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/344/270/2001.py +6039 -0
  102. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/344/270/2001Negative.py +6039 -0
  103. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/344/270/200Negative.py +3133 -0
  104. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/344/270/200/344/270/211.py +3527 -0
  105. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/344/270/200/344/270/2111.py +2300 -0
  106. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/344/270/200/344/270/2111Negative.py +2300 -0
  107. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/344/270/200/344/270/211Negative.py +3527 -0
  108. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/344/270/200/344/272/214.py +3597 -0
  109. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/344/270/200/344/272/2141.py +3317 -0
  110. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/344/270/200/344/272/2141Negative.py +3317 -0
  111. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/344/270/200/344/272/214Negative.py +3597 -0
  112. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/344/270/200/344/272/214/344/270/211.py +3161 -0
  113. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/344/270/200/344/272/214/344/270/2111.py +2877 -0
  114. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/344/270/200/344/272/214/344/270/2111Negative.py +2877 -0
  115. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/344/270/200/344/272/214/344/270/211Negative.py +3161 -0
  116. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/344/270/211.py +2981 -0
  117. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/344/270/2111.py +3055 -0
  118. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/344/270/2111Negative.py +3055 -0
  119. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/344/270/211Negative.py +2981 -0
  120. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/344/272/214.py +3221 -0
  121. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/344/272/2141.py +3988 -0
  122. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/344/272/2141Negative.py +3988 -0
  123. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/344/272/214Negative.py +3221 -0
  124. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/344/272/214/344/270/211.py +3652 -0
  125. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/344/272/214/344/270/2111.py +2863 -0
  126. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/344/272/214/344/270/2111Negative.py +2863 -0
  127. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/344/272/214/344/270/211Negative.py +3652 -0
  128. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/351/233/266/344/270/200.py +2485 -0
  129. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/351/233/266/344/270/2001.py +4566 -0
  130. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/351/233/266/344/270/2001Negative.py +4566 -0
  131. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/351/233/266/344/270/200Negative.py +2485 -0
  132. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/351/233/266/344/270/200/344/270/211.py +3006 -0
  133. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/351/233/266/344/270/200/344/270/2111.py +2485 -0
  134. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/351/233/266/344/270/200/344/270/2111Negative.py +2485 -0
  135. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/351/233/266/344/270/200/344/270/211Negative.py +3006 -0
  136. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/351/233/266/344/270/200/344/272/214.py +3304 -0
  137. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/351/233/266/344/270/200/344/272/2141.py +3015 -0
  138. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/351/233/266/344/270/200/344/272/2141Negative.py +3015 -0
  139. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/351/233/266/344/270/200/344/272/214Negative.py +3304 -0
  140. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/351/233/266/344/270/200/344/272/214/344/270/211.py +2939 -0
  141. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/351/233/266/344/270/200/344/272/214/344/270/2111.py +2589 -0
  142. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/351/233/266/344/270/200/344/272/214/344/270/2111Negative.py +2589 -0
  143. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/351/233/266/344/270/200/344/272/214/344/270/211Negative.py +2939 -0
  144. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/351/233/266/344/270/211.py +3899 -0
  145. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/351/233/266/344/270/2111.py +2996 -0
  146. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/351/233/266/344/270/2111Negative.py +2996 -0
  147. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/351/233/266/344/270/211Negative.py +3899 -0
  148. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/351/233/266/344/272/214.py +3223 -0
  149. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/351/233/266/344/272/2141.py +3020 -0
  150. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/351/233/266/344/272/2141Negative.py +3020 -0
  151. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/351/233/266/344/272/214Negative.py +3223 -0
  152. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/351/233/266/344/272/214/344/270/211.py +3250 -0
  153. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/351/233/266/344/272/214/344/270/2111.py +2667 -0
  154. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/351/233/266/344/272/214/344/270/2111Negative.py +2667 -0
  155. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/351/233/266/344/272/214/344/270/211Negative.py +3250 -0
  156. mapFolding/_e/Z0Z_analysisPython/measure.py +162 -0
  157. mapFolding/_e/Z0Z_analysisPython/positionAnalysis.py +403 -0
  158. mapFolding/_e/Z0Z_analysisPython/positionAnalysisPileRanges2d6.py +110 -0
  159. mapFolding/_e/Z0Z_analysisPython/theExcluderBeast.py +640 -0
  160. mapFolding/_e/Z0Z_analysisPython/toolkit.py +166 -0
  161. mapFolding/_e/Z0Z_analysisPython/toolkitCSVsequences.py +188 -0
  162. mapFolding/_e/Z0Z_analysisPython/workBenchPatternFinder.py +284 -0
  163. mapFolding/_e/Z0Z_notes/__init__.py +0 -0
  164. mapFolding/_e/Z0Z_notes/knowledgeDump.py +214 -0
  165. mapFolding/_e/__init__.py +45 -0
  166. mapFolding/_e/_beDRY.py +547 -0
  167. mapFolding/_e/_dataDynamic.py +1164 -0
  168. mapFolding/_e/_measure.py +579 -0
  169. mapFolding/_e/_semiotics.py +363 -0
  170. mapFolding/_e/_theTypes.py +31 -0
  171. mapFolding/_e/algorithms/__init__.py +1 -0
  172. mapFolding/_e/algorithms/constraintPropagation.py +158 -0
  173. mapFolding/_e/algorithms/elimination.py +118 -0
  174. mapFolding/_e/algorithms/eliminationCrease.py +66 -0
  175. mapFolding/_e/algorithms/iff.py +584 -0
  176. mapFolding/_e/basecamp.py +89 -0
  177. mapFolding/_e/dataBaskets.py +123 -0
  178. mapFolding/_e/dataRaw/__init__.py +0 -0
  179. mapFolding/_e/easyRun/__init__.py +0 -0
  180. mapFolding/_e/easyRun/eliminateFolds.py +72 -0
  181. mapFolding/_e/easyRun/pinning.py +62 -0
  182. mapFolding/_e/filters.py +384 -0
  183. mapFolding/_e/pin2/344/270/212nDimensions.py +882 -0
  184. mapFolding/_e/pin2/344/270/212nDimensionsAnnex.py +551 -0
  185. mapFolding/_e/pin2/344/270/212nDimensionsByCrease.py +190 -0
  186. mapFolding/_e/pin2/344/270/212nDimensionsByDomain.py +459 -0
  187. mapFolding/_e/pinIt.py +436 -0
  188. mapFolding/_semiotics.py +42 -0
  189. mapFolding/_theSSOT.py +11 -56
  190. mapFolding/_theTypes.py +52 -68
  191. mapFolding/algorithms/A086345.py +8 -3
  192. mapFolding/algorithms/__init__.py +1 -1
  193. mapFolding/algorithms/matrixMeandersNumPyndas.py +18 -18
  194. mapFolding/algorithms/oeisIDbyFormula.py +4 -4
  195. mapFolding/algorithms/zCuzDocStoopidoeisIDbyFormula.py +3 -3
  196. mapFolding/basecamp.py +13 -28
  197. mapFolding/beDRY.py +108 -99
  198. mapFolding/filesystemToolkit.py +15 -11
  199. mapFolding/oeis.py +17 -16
  200. mapFolding/reference/matrixMeandersAnalysis/prefixNotationNotes.py +2 -2
  201. mapFolding/reference/meandersDumpingGround/matrixMeandersBaselineV2.py +0 -1
  202. mapFolding/reference/meandersDumpingGround/matrixMeandersNumPyV1finalForm.py +8 -10
  203. mapFolding/someAssemblyRequired/RecipeJob.py +5 -5
  204. mapFolding/someAssemblyRequired/makeJobTheorem2Numba.py +5 -2
  205. mapFolding/someAssemblyRequired/makeJobTheorem2codon.py +9 -11
  206. mapFolding/someAssemblyRequired/mapFoldingModules/makeMapFoldingModules.py +2 -1
  207. mapFolding/someAssemblyRequired/transformationTools.py +2 -2
  208. mapFolding/tests/Z0Z_test_e_excluder.py +155 -0
  209. mapFolding/tests/conftest.py +193 -314
  210. mapFolding/tests/dataSamples/A001417.py +455 -0
  211. mapFolding/tests/dataSamples/__init__.py +1 -0
  212. mapFolding/tests/dataSamples/measurementData.py +1818 -0
  213. mapFolding/tests/dataSamples/p2DnDomain3_2_/351/246/226/344/270/200_/351/246/226/351/233/266/344/270/200.py +17 -0
  214. mapFolding/tests/dataSamples/p2DnDomain3_/351/246/226/344/270/200.py +17 -0
  215. mapFolding/tests/dataSamples/p2DnDomain5_4.py +17 -0
  216. mapFolding/tests/dataSamples/p2DnDomain6_5.py +17 -0
  217. mapFolding/tests/dataSamples/p2DnDomain6_7_5_4.py +17 -0
  218. mapFolding/tests/dataSamples/p2DnDomain7_6.py +17 -0
  219. mapFolding/tests/dataSamples/p2DnDomain/351/246/226/344/272/214_/351/246/226/351/233/266/344/270/200/344/272/214.py +17 -0
  220. mapFolding/tests/dataSamples/p2DnDomain/351/246/226/344/272/214_/351/246/226/351/233/266/344/272/214_/351/246/226/351/233/266/344/270/200/344/272/214_/351/246/226/344/270/200/344/272/214.py +17 -0
  221. mapFolding/tests/dataSamples/p2DnDomain/351/246/226/351/233/266/344/270/200/344/272/214_/351/246/226/344/270/200/344/272/214.py +15 -0
  222. mapFolding/tests/dataSamples/p2DnDomain/351/246/226/351/233/266/344/272/214_/351/246/226/344/272/214.py +15 -0
  223. mapFolding/tests/dataSamples/semioticsData.py +135 -0
  224. mapFolding/tests/test_computations.py +133 -88
  225. mapFolding/tests/test_e_computations.py +42 -0
  226. mapFolding/tests/test_e_dataDynamic.py +189 -0
  227. mapFolding/tests/test_e_measurements.py +257 -0
  228. mapFolding/tests/test_e_pinning.py +61 -0
  229. mapFolding/tests/test_e_semiotics.py +128 -0
  230. mapFolding/tests/test_filesystem.py +39 -17
  231. mapFolding/tests/{test_other.py → test_parameterValidation.py} +3 -3
  232. mapFolding/tests/{test_tasks.py → test_taskDivisions.py} +42 -23
  233. mapFolding/zCuzDocStoopid/makeDocstrings.py +3 -2
  234. {mapfolding-0.17.0.dist-info → mapfolding-0.18.0.dist-info}/METADATA +15 -9
  235. mapfolding-0.18.0.dist-info/RECORD +305 -0
  236. {mapfolding-0.17.0.dist-info → mapfolding-0.18.0.dist-info}/WHEEL +1 -1
  237. easyRun/A000682.py +0 -25
  238. easyRun/A005316.py +0 -20
  239. mapFolding/algorithms/A000136constraintPropagation.py +0 -95
  240. mapFolding/algorithms/A000136elimination.py +0 -163
  241. mapFolding/algorithms/A000136eliminationParallel.py +0 -77
  242. mapfolding-0.17.0.dist-info/RECORD +0 -107
  243. {mapfolding-0.17.0.dist-info → mapfolding-0.18.0.dist-info}/entry_points.txt +0 -0
  244. {mapfolding-0.17.0.dist-info → mapfolding-0.18.0.dist-info}/licenses/LICENSE +0 -0
  245. {mapfolding-0.17.0.dist-info → mapfolding-0.18.0.dist-info}/top_level.txt +0 -0
mapFolding/beDRY.py CHANGED
@@ -1,27 +1,103 @@
1
1
  """Oft-needed computations or actions, especially for multi-dimensional map folding."""
2
2
 
3
3
  from collections.abc import Sequence
4
- from hunterMakesPy import defineConcurrencyLimit, intInnit, oopsieKwargsie
5
- from mapFolding import NumPyIntegerType
4
+ from functools import cache
5
+ from hunterMakesPy.parseParameters import defineConcurrencyLimit, intInnit, oopsieKwargsie
6
+ from mapFolding import Array1DLeavesTotal, Array2DLeavesTotal, Array3DLeavesTotal, inclusive, NumPyIntegerType
6
7
  from numpy import dtype as numpy_dtype, int64 as numpy_int64, ndarray
7
8
  from sys import maxsize as sysMaxsize
8
9
  from typing import Any
9
10
  import numpy
10
11
 
11
- def getLeavesTotal(mapShape: tuple[int, ...]) -> int:
12
- """Calculate the total number of leaves in a map with the given dimensions.
12
+ #======== Flow control ======================================
13
+
14
+ def defineProcessorLimit(CPUlimit: Any | None, concurrencyPackage: str | None = None) -> int:
15
+ """Compute the CPU usage limit for concurrent operations; for `numba` managed concurrency, set the global limit.
16
+
17
+ Parameters
18
+ ----------
19
+ CPUlimit : Any | None
20
+ Please see the documentation in `countFolds` for details. I know it is annoying, but I want to be sure you
21
+ have the most accurate information.
22
+ concurrencyPackage : str | None = None
23
+ Specifies which concurrency package to use.
24
+ - `None` or `'multiprocessing'`: Uses standard `multiprocessing`.
25
+ - `'numba'`: Uses Numba's threading system.
26
+
27
+ Returns
28
+ -------
29
+ concurrencyLimit : int
30
+ The actual concurrency limit that was set.
31
+
32
+ Raises
33
+ ------
34
+ TypeError
35
+ If `CPUlimit` is not of the expected types.
36
+ NotImplementedError
37
+ If `concurrencyPackage` is not supported.
38
+
39
+ Notes
40
+ -----
41
+ If using `'numba'` as the concurrency package, the maximum number of processors is retrieved from
42
+ `numba.get_num_threads()` rather than by polling the hardware. If Numba environment variables limit available
43
+ processors, that will affect this function.
44
+
45
+ When using Numba, this function must be called before importing any Numba-jitted function for this processor limit
46
+ to affect the Numba-jitted function.
47
+
48
+ """
49
+ # TODO How do I clarify the type and sanitize the value of CPUlimit?
50
+ if not (CPUlimit is None or isinstance(CPUlimit, (bool, int, float))):
51
+ CPUlimit = oopsieKwargsie(CPUlimit)
52
+
53
+ match concurrencyPackage:
54
+ case 'numba':
55
+ from numba import get_num_threads, set_num_threads # noqa: PLC0415
56
+ concurrencyLimit: int = defineConcurrencyLimit(limit=CPUlimit, cpuTotal=get_num_threads())
57
+ set_num_threads(concurrencyLimit)
58
+ concurrencyLimit = get_num_threads()
59
+ case 'multiprocessing' | None | _:
60
+ concurrencyLimit = defineConcurrencyLimit(limit=CPUlimit)
61
+ return concurrencyLimit
13
62
 
14
- The total number of leaves is the product of all dimensions in the map shape.
63
+ #======== map folding ===================================
64
+
65
+ def getConnectionGraph(mapShape: tuple[int, ...], leavesTotal: int, datatype: type[NumPyIntegerType]) -> ndarray[tuple[int, int, int], numpy_dtype[NumPyIntegerType]]:
66
+ """Create a properly typed connection graph for the map folding algorithm.
15
67
 
16
68
  Parameters
17
69
  ----------
18
70
  mapShape : tuple[int, ...]
19
71
  A tuple of integers representing the dimensions of the map.
72
+ leavesTotal : int
73
+ The total number of leaves in the map.
74
+ datatype : type[NumPyIntegerType]
75
+ The NumPy integer type to use for the array elements, ensuring proper memory usage and compatibility with the
76
+ computation state.
77
+
78
+ Returns
79
+ -------
80
+ connectionGraph : ndarray[tuple[int, int, int], numpy_dtype[NumPyIntegerType]]
81
+ A 3D NumPy array with shape (`dimensionsTotal`, `leavesTotal`+1, `leavesTotal`+1) with the specified `datatype`,
82
+ representing all possible connections between leaves.
83
+
84
+ """
85
+ connectionGraph: Array3DLeavesTotal = _makeConnectionGraph(mapShape, leavesTotal)
86
+ return connectionGraph.astype(datatype)
87
+
88
+ @cache
89
+ def getLeavesTotal(mapShape: tuple[int, ...]) -> int:
90
+ """The definitive calculation of the total number of leaves in a map with the given dimensions.
91
+
92
+ Parameters
93
+ ----------
94
+ mapShape : tuple[int, ...]
95
+ A tuple of integers with the length of each dimension of the map.
20
96
 
21
97
  Returns
22
98
  -------
23
99
  leavesTotal : int
24
- The total number of leaves in the map, calculated as the product of all dimensions.
100
+ The definitive total number of leaves in the map.
25
101
 
26
102
  Raises
27
103
  ------
@@ -29,12 +105,18 @@ def getLeavesTotal(mapShape: tuple[int, ...]) -> int:
29
105
  If the product of dimensions would exceed the system's maximum integer size. This check prevents silent numeric
30
106
  overflow issues that could lead to incorrect results.
31
107
 
108
+ Notes
109
+ -----
110
+ It is impossible to overstate the importance of `leavesTotal` in every algorithm for counting folds. Therefore, in this
111
+ package, this function is the ***only*** permissible way to compute `leavesTotal`.
112
+
113
+ The total number of leaves is the product of all dimensions in `mapShape`.
32
114
  """
33
115
  productDimensions = 1
34
116
  for dimension in mapShape:
35
117
  # NOTE this check is one-degree short of absurd, but three lines of early absurdity is better than invalid output later. I'd add more checks if I could think of more.
36
118
  if dimension > sysMaxsize // productDimensions:
37
- message = f"I received `{dimension = }` in `{mapShape = }`, but the product of the dimensions exceeds the maximum size of an integer on this system."
119
+ message: str = f"I received `{dimension = }` in `{mapShape = }`, but the product of the dimensions exceeds the maximum size of an integer on this system."
38
120
  raise OverflowError(message)
39
121
  productDimensions *= dimension
40
122
  return productDimensions
@@ -77,18 +159,18 @@ def getTaskDivisions(computationDivisions: int | str | None, concurrencyLimit: i
77
159
  strComputationDivisions = strComputationDivisions.lower()
78
160
  match strComputationDivisions:
79
161
  case 'maximum':
80
- taskDivisions = leavesTotal
162
+ taskDivisions: int = leavesTotal
81
163
  case 'cpu':
82
164
  taskDivisions = min(concurrencyLimit, leavesTotal)
83
165
  case _:
84
- message = f"I received '{strComputationDivisions}' for the parameter, `computationDivisions`, but the string value is not supported."
166
+ message: str = f"I received '{strComputationDivisions}' for the parameter, `computationDivisions`, but the string value is not supported."
85
167
  raise ValueError(message)
86
168
  case _:
87
169
  message = f"I received {computationDivisions} for the parameter, `computationDivisions`, but the type {type(computationDivisions).__name__} is not supported."
88
170
  raise ValueError(message)
89
171
 
90
172
  if taskDivisions > leavesTotal:
91
- message = f"Problem: `{taskDivisions = }`, is greater than `{leavesTotal = }`, which will cause duplicate counting of the folds.\n\nChallenge: you cannot directly set `taskDivisions` or `leavesTotal`: they are derived from parameters that may or may not be named `computationDivisions`, `CPUlimit` , and `listDimensions` and from my dubious-quality Python code." # noqa: E501
173
+ message = f"Problem: `{taskDivisions = }`, is greater than `{leavesTotal = }`, which will cause duplicate counting of the folds.\n\nChallenge: you cannot directly set `taskDivisions` or `leavesTotal`: they are derived from parameters that may or may not be named `computationDivisions`, `CPUlimit` , and `listDimensions` and from my dubious-quality Python code."
92
174
  raise ValueError(message)
93
175
  return int(max(0, taskDivisions))
94
176
 
@@ -117,22 +199,22 @@ def _makeConnectionGraph(mapShape: tuple[int, ...], leavesTotal: int) -> ndarray
117
199
  conditions, and dimensional constraints.
118
200
 
119
201
  """
120
- dimensionsTotal = len(mapShape)
121
- cumulativeProduct = numpy.multiply.accumulate([1, *list(mapShape)], dtype=numpy_int64)
122
- arrayDimensions = numpy.array(mapShape, dtype=numpy_int64)
123
- coordinateSystem = numpy.zeros((dimensionsTotal, leavesTotal + 1), dtype=numpy_int64)
202
+ dimensionsTotal: int = len(mapShape)
203
+ cumulativeProduct: Array1DLeavesTotal = numpy.multiply.accumulate([1, *list(mapShape)], dtype=numpy_int64)
204
+ arrayDimensions: Array1DLeavesTotal = numpy.array(mapShape, dtype=numpy_int64)
205
+ coordinateSystem: Array2DLeavesTotal = numpy.zeros((dimensionsTotal, leavesTotal + 1), dtype=numpy_int64)
124
206
  for indexDimension in range(dimensionsTotal):
125
- for leaf1ndex in range(1, leavesTotal + 1):
207
+ for leaf1ndex in range(1, leavesTotal + inclusive):
126
208
  coordinateSystem[indexDimension, leaf1ndex] = (((leaf1ndex - 1) // cumulativeProduct[indexDimension]) % arrayDimensions[indexDimension] + 1)
127
209
 
128
- connectionGraph = numpy.zeros((dimensionsTotal, leavesTotal + 1, leavesTotal + 1), dtype=numpy_int64)
210
+ connectionGraph: Array3DLeavesTotal = numpy.zeros((dimensionsTotal, leavesTotal + 1, leavesTotal + 1), dtype=numpy_int64)
129
211
  for indexDimension in range(dimensionsTotal):
130
- for activeLeaf1ndex in range(1, leavesTotal + 1):
131
- for connectee1ndex in range(1, activeLeaf1ndex + 1):
132
- isFirstCoord = coordinateSystem[indexDimension, connectee1ndex] == 1
133
- isLastCoord = coordinateSystem[indexDimension, connectee1ndex] == arrayDimensions[indexDimension]
134
- exceedsActive = connectee1ndex + cumulativeProduct[indexDimension] > activeLeaf1ndex
135
- isEvenParity = (coordinateSystem[indexDimension, activeLeaf1ndex] & 1) == (coordinateSystem[indexDimension, connectee1ndex] & 1)
212
+ for activeLeaf1ndex in range(1, leavesTotal + inclusive):
213
+ for connectee1ndex in range(1, activeLeaf1ndex + inclusive):
214
+ isFirstCoord: bool = coordinateSystem[indexDimension, connectee1ndex] == 1
215
+ isLastCoord: bool = coordinateSystem[indexDimension, connectee1ndex] == arrayDimensions[indexDimension]
216
+ exceedsActive: bool = connectee1ndex + cumulativeProduct[indexDimension] > activeLeaf1ndex
217
+ isEvenParity: bool = (coordinateSystem[indexDimension, activeLeaf1ndex] & 1) == (coordinateSystem[indexDimension, connectee1ndex] & 1)
136
218
 
137
219
  if (isEvenParity and isFirstCoord) or (not isEvenParity and (isLastCoord or exceedsActive)):
138
220
  connectionGraph[indexDimension, activeLeaf1ndex, connectee1ndex] = connectee1ndex
@@ -142,29 +224,6 @@ def _makeConnectionGraph(mapShape: tuple[int, ...], leavesTotal: int) -> ndarray
142
224
  connectionGraph[indexDimension, activeLeaf1ndex, connectee1ndex] = connectee1ndex + cumulativeProduct[indexDimension]
143
225
  return connectionGraph
144
226
 
145
- def getConnectionGraph(mapShape: tuple[int, ...], leavesTotal: int, datatype: type[NumPyIntegerType]) -> ndarray[tuple[int, int, int], numpy_dtype[NumPyIntegerType]]:
146
- """Create a properly typed connection graph for the map folding algorithm.
147
-
148
- Parameters
149
- ----------
150
- mapShape : tuple[int, ...]
151
- A tuple of integers representing the dimensions of the map.
152
- leavesTotal : int
153
- The total number of leaves in the map.
154
- datatype : type[NumPyIntegerType]
155
- The NumPy integer type to use for the array elements, ensuring proper memory usage and compatibility with the
156
- computation state.
157
-
158
- Returns
159
- -------
160
- connectionGraph : ndarray[tuple[int, int, int], numpy_dtype[NumPyIntegerType]]
161
- A 3D NumPy array with shape (`dimensionsTotal`, `leavesTotal`+1, `leavesTotal`+1) with the specified `datatype`,
162
- representing all possible connections between leaves.
163
-
164
- """
165
- connectionGraph = _makeConnectionGraph(mapShape, leavesTotal)
166
- return connectionGraph.astype(datatype)
167
-
168
227
  def makeDataContainer(shape: int | tuple[int, ...], datatype: type[NumPyIntegerType]) -> ndarray[Any, numpy_dtype[NumPyIntegerType]]:
169
228
  """Create any data container as long as it is a `numpy.ndarray` full of zeroes of type `numpy.integer`.
170
229
 
@@ -185,59 +244,6 @@ def makeDataContainer(shape: int | tuple[int, ...], datatype: type[NumPyIntegerT
185
244
  """
186
245
  return numpy.zeros(shape, dtype=datatype)
187
246
 
188
- def setProcessorLimit(CPUlimit: Any | None, concurrencyPackage: str | None = None) -> int:
189
- """Set the CPU usage limit for concurrent operations.
190
-
191
- Parameters
192
- ----------
193
- CPUlimit : Any | None
194
- Please see the documentation in `countFolds` for details. I know it is annoying, but I want to be sure you
195
- have the most accurate information.
196
- concurrencyPackage : str | None = None
197
- Specifies which concurrency package to use.
198
- - `None` or `'multiprocessing'`: Uses standard `multiprocessing`.
199
- - `'numba'`: Uses Numba's threading system.
200
-
201
- Returns
202
- -------
203
- concurrencyLimit : int
204
- The actual concurrency limit that was set.
205
-
206
- Raises
207
- ------
208
- TypeError
209
- If `CPUlimit` is not of the expected types.
210
- NotImplementedError
211
- If `concurrencyPackage` is not supported.
212
-
213
- Notes
214
- -----
215
- If using `'numba'` as the concurrency package, the maximum number of processors is retrieved from
216
- `numba.get_num_threads()` rather than by polling the hardware. If Numba environment variables limit available
217
- processors, that will affect this function.
218
-
219
- When using Numba, this function must be called before importing any Numba-jitted function for this processor limit
220
- to affect the Numba-jitted function.
221
-
222
- """
223
- if not (CPUlimit is None or isinstance(CPUlimit, (bool, int, float))):
224
- CPUlimit = oopsieKwargsie(CPUlimit)
225
-
226
- match concurrencyPackage:
227
- case 'multiprocessing' | None:
228
- # When to use multiprocessing.set_start_method
229
- # https://github.com/hunterhogan/mapFolding/issues/6 # noqa: ERA001
230
- concurrencyLimit: int = defineConcurrencyLimit(limit=CPUlimit)
231
- case 'numba':
232
- from numba import get_num_threads, set_num_threads # noqa: PLC0415
233
- concurrencyLimit = defineConcurrencyLimit(limit=CPUlimit, cpuTotal=get_num_threads())
234
- set_num_threads(concurrencyLimit)
235
- concurrencyLimit = get_num_threads()
236
- case _:
237
- message = f"I received `{concurrencyPackage = }` but I don't know what to do with that."
238
- raise NotImplementedError(message)
239
- return concurrencyLimit
240
-
241
247
  def validateListDimensions(listDimensions: Sequence[int]) -> tuple[int, ...]:
242
248
  """Validate and normalize dimensions for a map folding problem.
243
249
 
@@ -266,7 +272,7 @@ def validateListDimensions(listDimensions: Sequence[int]) -> tuple[int, ...]:
266
272
 
267
273
  """
268
274
  if not listDimensions:
269
- message = "`listDimensions` is a required parameter."
275
+ message: str = "`listDimensions` is a required parameter."
270
276
  raise ValueError(message)
271
277
  listOFint: list[int] = intInnit(listDimensions, 'listDimensions')
272
278
  mapDimensions: list[int] = []
@@ -294,3 +300,6 @@ def validateListDimensions(listDimensions: Sequence[int]) -> tuple[int, ...]:
294
300
  """
295
301
  # NOTE Do NOT sort the dimensions.
296
302
  return tuple(mapDimensions)
303
+
304
+
305
+
@@ -24,10 +24,14 @@ solutions to their map folding challenges.
24
24
  from mapFolding import packageSettings
25
25
  from os import PathLike
26
26
  from pathlib import Path, PurePath
27
- from sys import modules as sysModules
27
+ from sys import modules as sysModules, stdout
28
+ from typing import TYPE_CHECKING
28
29
  import os
29
30
  import platformdirs
30
31
 
32
+ if TYPE_CHECKING:
33
+ from io import TextIOWrapper
34
+
31
35
  def getFilenameFoldsTotal(mapShape: tuple[int, ...]) -> str:
32
36
  """Create a standardized filename for a computed `foldsTotal` value.
33
37
 
@@ -173,18 +177,18 @@ def saveFoldsTotal(pathFilename: PathLike[str] | PurePath, foldsTotal: int) -> N
173
177
  _saveFoldsTotal(pathFilename, foldsTotal)
174
178
  except Exception as ERRORmessage: # noqa: BLE001
175
179
  try:
176
- print(f"\nfoldsTotal foldsTotal foldsTotal foldsTotal foldsTotal\n\n{foldsTotal = }\n\nfoldsTotal foldsTotal foldsTotal foldsTotal foldsTotal\n") # noqa: T201
177
- print(ERRORmessage) # noqa: T201
178
- print(f"\nfoldsTotal foldsTotal foldsTotal foldsTotal foldsTotal\n\n{foldsTotal = }\n\nfoldsTotal foldsTotal foldsTotal foldsTotal foldsTotal\n") # noqa: T201
179
- randomnessPlanB = (int(str(foldsTotal).strip()[-1]) + 1) * ['YO_']
180
- filenameInfixUnique = ''.join(randomnessPlanB)
181
- pathFilenamePlanB = os.path.join(os.getcwd(), 'foldsTotal' + filenameInfixUnique + '.txt') # noqa: PTH109, PTH118
182
- writeStreamFallback = open(pathFilenamePlanB, 'w') # noqa: PTH123, SIM115
180
+ stdout.write(f"\nfoldsTotal foldsTotal foldsTotal foldsTotal foldsTotal\n\n{foldsTotal = }\n\nfoldsTotal foldsTotal foldsTotal foldsTotal foldsTotal\n")
181
+ stdout.writelines(str(ERRORmessage))
182
+ stdout.write(f"\nfoldsTotal foldsTotal foldsTotal foldsTotal foldsTotal\n\n{foldsTotal = }\n\nfoldsTotal foldsTotal foldsTotal foldsTotal foldsTotal\n")
183
+ randomnessPlanB: list[str] = (int(str(foldsTotal).strip()[-1]) + 1) * ['YO_']
184
+ filenameInfixUnique: str = ''.join(randomnessPlanB)
185
+ pathFilenamePlanB: str = os.path.join(os.getcwd(), 'foldsTotal' + filenameInfixUnique + '.txt') # noqa: PTH109, PTH118
186
+ writeStreamFallback: TextIOWrapper = open(pathFilenamePlanB, 'w') # noqa: PTH123, SIM115
183
187
  writeStreamFallback.write(str(foldsTotal))
184
188
  writeStreamFallback.close()
185
- print(str(pathFilenamePlanB)) # noqa: T201
189
+ stdout.write(str(pathFilenamePlanB))
186
190
  except Exception: # noqa: BLE001
187
- print(foldsTotal) # noqa: T201
191
+ stdout.write(str(foldsTotal))
188
192
 
189
193
  def saveFoldsTotalFAILearly(pathFilename: PathLike[str] | PurePath) -> None:
190
194
  """Preemptively test file write capabilities before beginning computation.
@@ -220,7 +224,7 @@ def saveFoldsTotalFAILearly(pathFilename: PathLike[str] | PurePath) -> None:
220
224
 
221
225
  """
222
226
  if Path(pathFilename).exists():
223
- message = f"`{pathFilename = }` exists: a battle of overwriting might cause tears."
227
+ message: str = f"`{pathFilename = }` exists: a battle of overwriting might cause tears."
224
228
  raise FileExistsError(message)
225
229
  if not Path(pathFilename).parent.exists():
226
230
  message = f"I received `{pathFilename = }` 0.000139 seconds ago from a function that promised it created the parent directory, but the parent directory does not exist. Fix that now, so your computation doesn't get deleted later. And be compassionate to others."
mapFolding/oeis.py CHANGED
@@ -25,21 +25,20 @@ completes the journey from configuration foundation to mathematical discovery.
25
25
  """
26
26
 
27
27
  from datetime import datetime, timedelta, UTC
28
- from hunterMakesPy import writeStringToHere
28
+ from hunterMakesPy.filesystemToolkit import writeStringToHere
29
29
  from itertools import chain
30
- from mapFolding import countFolds, MetadataOEISid, MetadataOEISidMapFolding, packageSettings
30
+ from mapFolding import MetadataOEISid, MetadataOEISidMapFolding, packageSettings
31
31
  from mapFolding._theSSOT import pathCache
32
+ from mapFolding.basecamp import countFolds
32
33
  from pathlib import Path
33
34
  from typing import Final
35
+ from urllib.error import HTTPError, URLError
34
36
  from urllib.request import urlopen
35
37
  import argparse
36
38
  import sys
37
39
  import time
38
40
  import warnings
39
41
 
40
- oeisIDsImplemented: Final[list[str]] = sorted([oeisID.upper().strip() for oeisID in packageSettings.OEISidMapFoldingManuallySet])
41
- """Directly implemented OEIS IDs; standardized, e.g., 'A001415'."""
42
-
43
42
  def _standardizeOEISid(oeisID: str) -> str:
44
43
  """Standardize an OEIS sequence ID to uppercase and without whitespace.
45
44
 
@@ -56,6 +55,9 @@ def _standardizeOEISid(oeisID: str) -> str:
56
55
  """
57
56
  return str(oeisID).upper().strip()
58
57
 
58
+ oeisIDsImplemented: Final[list[str]] = sorted(map(_standardizeOEISid, packageSettings.OEISidMapFoldingManuallySet))
59
+ """Directly implemented OEIS IDs; standardized, e.g., 'A001415'."""
60
+
59
61
  def _getFilenameOEISbFile(oeisID: str) -> str:
60
62
  """Generate the filename for an OEIS b-file given a sequence ID.
61
63
 
@@ -145,10 +147,13 @@ def _getOEISofficial(pathFilenameCache: Path, url: str) -> None | str:
145
147
  message = "URL must start with 'http:' or 'https:'"
146
148
  raise ValueError(message)
147
149
 
148
- with urlopen(url) as response: # noqa: S310
149
- oeisInformationRaw = response.read().decode('utf-8')
150
- oeisInformation = str(oeisInformationRaw)
151
- writeStringToHere(oeisInformation, pathFilenameCache)
150
+ try:
151
+ with urlopen(url) as response: # noqa: S310
152
+ oeisInformationRaw = response.read().decode('utf-8')
153
+ oeisInformation = str(oeisInformationRaw)
154
+ writeStringToHere(oeisInformation, pathFilenameCache)
155
+ except (HTTPError, URLError):
156
+ oeisInformation = pathFilenameCache.read_text(encoding="utf-8")
152
157
 
153
158
  if not oeisInformation:
154
159
  warnings.warn(f"Failed to retrieve OEIS sequence information for {pathFilenameCache.stem}.", stacklevel=2)
@@ -230,7 +235,7 @@ def getOEISidInformation(oeisID: str) -> tuple[str, int]:
230
235
  listDescriptionDeconstructed: list[str] = []
231
236
  offset = None
232
237
  for lineOEIS in oeisInformation.splitlines():
233
- lineOEIS = lineOEIS.strip() # noqa: PLW2901
238
+ lineOEIS = lineOEIS.strip()
234
239
  if not lineOEIS or len(lineOEIS.split()) < 3:
235
240
  continue
236
241
  fieldCode, sequenceID, fieldData = lineOEIS.split(maxsplit=2)
@@ -279,9 +284,6 @@ def _makeDictionaryOEISMapFolding() -> dict[str, MetadataOEISidMapFolding]:
279
284
  description=descriptionSherpa,
280
285
  offset=offsetSherpa,
281
286
  getMapShape=packageSettings.OEISidMapFoldingManuallySet[oeisID]['getMapShape'],
282
- valuesBenchmark=packageSettings.OEISidMapFoldingManuallySet[oeisID]['valuesBenchmark'],
283
- valuesTestParallelization=packageSettings.OEISidMapFoldingManuallySet[oeisID]['valuesTestParallelization'],
284
- valuesTestValidation=packageSettings.OEISidMapFoldingManuallySet[oeisID]['valuesTestValidation'] + list(range(offsetSherpa, 2)),
285
287
  valuesKnown=valuesKnownSherpa,
286
288
  valueUnknown=max(valuesKnownSherpa.keys(), default=0) + 1
287
289
  )
@@ -339,8 +341,8 @@ def _formatHelpText() -> str:
339
341
  A formatted string containing complete usage information and examples.
340
342
 
341
343
  """
342
- exampleOEISid: str = oeisIDsImplemented[0]
343
- exampleN: int = dictionaryOEISMapFolding[exampleOEISid]['valuesTestValidation'][-1]
344
+ exampleOEISid: str = 'A001415'
345
+ exampleN: int = 6
344
346
 
345
347
  return (
346
348
  "\nAvailable OEIS sequences:\n"
@@ -485,7 +487,6 @@ def _makeDictionaryOEIS() -> dict[str, MetadataOEISid]:
485
487
  description=descriptionSherpa,
486
488
  offset=offsetSherpa,
487
489
  valuesKnown=valuesKnownSherpa,
488
- valuesTestValidation=[*(packageSettings.OEISidManuallySet[oeisID]['valuesTestValidation']), offsetSherpa],
489
490
  valueUnknown=max(valuesKnownSherpa.keys(), default=0) + 1,
490
491
  )
491
492
  return dictionary
@@ -1,6 +1,6 @@
1
1
  # ruff: noqa
2
- # ================= analyze aligned ===================================================================================
3
- # ======= if bitsAlpha > 1 and bitsZulu > 1 and (bitsAlphaIsEven or bitsZuluIsEven) =====
2
+ #================== analyze aligned ===================================================================================
3
+ #======== if bitsAlpha > 1 and bitsZulu > 1 and (bitsAlphaIsEven or bitsZuluIsEven) =====
4
4
  """NOTE find `bitsAlpha > 1 and bitsZulu > 1 and (bitsAlphaIsEven or bitsZuluIsEven)` without bitsAlpha or bitsZulu.
5
5
  - `bitsAlpha` is even IFF `arcCode` is even.
6
6
  - `bitsAlpha` > 1, so arcCode's LSB is irrelevant; locatorBits ends with 0b101, so arcCode's 2° LSB is irrelevant.
@@ -121,7 +121,6 @@ def count(bridges: int, startingCurveLocations: dict[int, int]) -> int:
121
121
  bifurcationZulu ^= XOrHere2makePair
122
122
 
123
123
  # Cases 1, 2, and 3 all compute curveLocationAnalysis
124
- # TODO https://github.com/hunterhogan/mapFolding/issues/19
125
124
  curveLocationAnalysis = ((bifurcationZulu >> 2) << 1) | bifurcationAlphaShiftRight2 # pyright: ignore[reportPossiblyUnboundVariable]
126
125
  if curveLocationAnalysis < curveLocationsMAXIMUM:
127
126
  dictionaryCurveLocations[curveLocationAnalysis] = dictionaryCurveLocations.get(curveLocationAnalysis, 0) + distinctCrossings
@@ -169,7 +169,7 @@ def count64(bridges: int, arrayCurveGroups: DataArray3columns, bridgesMinimum: i
169
169
 
170
170
  allocateBridgesAligned: int = int(numpy.count_nonzero(selectBridgesAligned))
171
171
 
172
- # ----------------------------------------------- bridgesSimple -------------------------------------------------------
172
+ #------------------------------------------------ bridgesSimple -------------------------------------------------------
173
173
  curveLocationsBridgesSimpleLessThanMaximum: DataArray1D = arrayCurveGroups[:, columnGroupZulu].copy()
174
174
  numpy.left_shift(curveLocationsBridgesSimpleLessThanMaximum, 1, out=curveLocationsBridgesSimpleLessThanMaximum)
175
175
  numpy.bitwise_or(curveLocationsBridgesSimpleLessThanMaximum, arrayCurveGroups[:, columnGroupAlpha], out=curveLocationsBridgesSimpleLessThanMaximum)
@@ -179,14 +179,14 @@ def count64(bridges: int, arrayCurveGroups: DataArray3columns, bridgesMinimum: i
179
179
 
180
180
  allocateBridgesSimple: int = int(numpy.count_nonzero(curveLocationsBridgesSimpleLessThanMaximum))
181
181
 
182
- # ----------------------------------------------- arrayCurveLocations -------------------------------------------------
182
+ #------------------------------------------------ arrayCurveLocations -------------------------------------------------
183
183
  rowsAllocatedTotal: int = allocateGroupAlphaCurves + allocateGroupZuluCurves + allocateBridgesSimple + allocateBridgesAligned
184
184
  arrayCurveLocations: DataArray2columns = numpy.zeros((rowsAllocatedTotal, columnsArrayCurveLocations), dtype=arrayCurveGroups.dtype)
185
185
 
186
186
  rowsAggregatedTotal: int = 0
187
187
  rowsDeallocatedTotal: int = 0
188
188
 
189
- # ----------------------------------------------- bridgesSimple -------------------------------------------------------
189
+ #------------------------------------------------ bridgesSimple -------------------------------------------------------
190
190
  rowsAggregatedTotal = aggregateBridgesSimple2CurveLocations(arrayCurveLocations
191
191
  , rowsAggregatedTotal
192
192
  , curveLocationsBridgesSimpleLessThanMaximum
@@ -200,7 +200,7 @@ def count64(bridges: int, arrayCurveGroups: DataArray3columns, bridgesMinimum: i
200
200
  del allocateBridgesSimple
201
201
  goByeBye()
202
202
 
203
- # ----------------------------------------------- groupAlpha ----------------------------------------------------------
203
+ #------------------------------------------------ groupAlpha ----------------------------------------------------------
204
204
  selectGroupAlphaCurves: SelectorBoolean = arrayCurveGroups[:, columnGroupAlpha] > numpy.uint64(1)
205
205
  curveLocationsGroupAlpha: DataArray1D = arrayCurveGroups[selectGroupAlphaCurves, columnGroupAlpha].copy()
206
206
 
@@ -210,7 +210,6 @@ def count64(bridges: int, arrayCurveGroups: DataArray3columns, bridgesMinimum: i
210
210
  numpy.bitwise_or(curveLocationsGroupAlpha, arrayCurveGroups[selectGroupAlphaCurves, columnGroupAlpha], out=curveLocationsGroupAlpha)
211
211
  numpy.right_shift(curveLocationsGroupAlpha, 2, out=curveLocationsGroupAlpha)
212
212
  # NOTE (groupAlpha >> 2) | (groupZulu << 3) | ((1 - (groupAlpha & 1)) << 1)
213
- # TODO eliminate temporary arrayLockbox
214
213
  arrayLockbox: numpy.ndarray[tuple[int, ...], numpy.dtype[numpy.uint8]] = numpy.full_like(a=curveLocationsGroupAlpha, fill_value=numpy.uint8(0b111), dtype=numpy.uint8)
215
214
  numpy.bitwise_and(arrayLockbox, curveLocationsGroupAlpha, out=arrayLockbox, dtype=numpy.uint8)
216
215
  numpy.right_shift(curveLocationsGroupAlpha, 3, out=curveLocationsGroupAlpha)
@@ -237,14 +236,13 @@ def count64(bridges: int, arrayCurveGroups: DataArray3columns, bridgesMinimum: i
237
236
  selectGroupAlphaCurves = None; del selectGroupAlphaCurves # pyright: ignore[reportAssignmentType] # noqa: E702
238
237
  goByeBye()
239
238
 
240
- # ----------------------------------------------- groupZulu -----------------------------------------------------------
239
+ #------------------------------------------------ groupZulu -----------------------------------------------------------
241
240
  selectGroupZuluCurves: SelectorBoolean = arrayCurveGroups[:, columnGroupZulu] > numpy.uint64(1)
242
241
  curveLocationsGroupZulu: DataArray1D = arrayCurveGroups[selectGroupZuluCurves, columnGroupAlpha].copy()
243
242
  numpy.left_shift(curveLocationsGroupZulu, 2, out=curveLocationsGroupZulu)
244
243
  # NOTE (groupAlpha << 2)
245
244
 
246
245
  numpy.bitwise_or(curveLocationsGroupZulu, numpy.subtract(numpy.uint64(1), numpy.bitwise_and(arrayCurveGroups[selectGroupZuluCurves, columnGroupZulu], 1)), out=curveLocationsGroupZulu)
247
- # TODO | (1 - (groupZulu & 1))
248
246
 
249
247
  # NOTE | (groupZulu >> 1)
250
248
  numpy.left_shift(curveLocationsGroupZulu, 1, out=curveLocationsGroupZulu)
@@ -267,7 +265,7 @@ def count64(bridges: int, arrayCurveGroups: DataArray3columns, bridgesMinimum: i
267
265
  selectGroupZuluCurves = None; del selectGroupZuluCurves # pyright: ignore[reportAssignmentType] # noqa: E702
268
266
  goByeBye()
269
267
 
270
- # ----------------------------------------------- bridgesAligned ------------------------------------------------------
268
+ #------------------------------------------------ bridgesAligned ------------------------------------------------------
271
269
  # `bridgesAligned` = `bridgesGroupAlphaPairedToOdd` UNION WITH `bridgesGroupZuluPairedToOdd` UNION WITH `bridgesAlignedAtEven`
272
270
 
273
271
  # bridgesAligned -------------------------------- bridgesGroupAlphaPairedToOdd ----------------------------------------
@@ -301,7 +299,7 @@ def count64(bridges: int, arrayCurveGroups: DataArray3columns, bridgesMinimum: i
301
299
 
302
300
  # NOTE: All computations for `bridgesAlignedAtEven` are handled by the computations for `bridgesAligned`.
303
301
 
304
- # ----------------------------------------------- bridgesAligned ------------------------------------------------------
302
+ #------------------------------------------------ bridgesAligned ------------------------------------------------------
305
303
 
306
304
  curveLocationsBridgesAlignedLessThanMaximum: DataArray1D = numpy.zeros((selectBridgesAligned.sum(),), dtype=numpy.uint64)
307
305
  numpy.right_shift(arrayCurveGroups[selectBridgesAligned, columnGroupZulu], 2, out=curveLocationsBridgesAlignedLessThanMaximum)
@@ -330,7 +328,7 @@ def count64(bridges: int, arrayCurveGroups: DataArray3columns, bridgesMinimum: i
330
328
  selectBridgesAligned = None; del selectBridgesAligned # pyright: ignore[reportAssignmentType] # noqa: E702
331
329
  goByeBye()
332
330
 
333
- # ----------------------------------------------- aggregation ---------------------------------------------------------
331
+ #------------------------------------------------ aggregation ---------------------------------------------------------
334
332
  arrayCurveGroups = aggregateCurveLocations2CurveGroups(arrayCurveLocations)
335
333
 
336
334
  arrayCurveLocations = None; del arrayCurveLocations # pyright: ignore[reportAssignmentType] # noqa: E702
@@ -3,7 +3,7 @@
3
3
  from astToolkit import identifierDotAttribute, parseLogicalPath2astModule
4
4
  from astToolkit.containers import IngredientsFunction, IngredientsModule, LedgerOfImports
5
5
  from astToolkit.transformationTools import pythonCode2ast_expr
6
- from hunterMakesPy import autoDecodingRLE
6
+ from hunterMakesPy.dataStructures import autoDecodingRLE
7
7
  # TODO 'The____' identifiers are a vestigial semiotic system. Do I still need to import `asname`? If so, would different
8
8
  # identifiers better integrate into the current semiotics?
9
9
  from mapFolding import (
@@ -84,7 +84,7 @@ class RecipeJobTheorem2:
84
84
  shatteredDataclass: ShatteredDataclass = dataclasses.field(default=None, init=True) # pyright: ignore[reportAssignmentType]
85
85
  """Deconstructed dataclass metadata for code transformation."""
86
86
 
87
- # ------- Source -----------------------------------------
87
+ #-------- Source -----------------------------------------
88
88
  source_astModule: ast.Module = parseLogicalPath2astModule(f'{packageSettings.identifierPackage}.{default['logicalPath']['synthetic']}.theorem2Numba') # noqa: RUF009
89
89
  """Parsed AST of the source module containing the generic algorithm."""
90
90
  identifierCallableSource: str = default['function']['counting']
@@ -102,7 +102,7 @@ class RecipeJobTheorem2:
102
102
  sourcePackageIdentifier: str | None = packageSettings.identifierPackage
103
103
  """Name of the source package."""
104
104
 
105
- # ------- Filesystem, names of physical objects ------------------------------------------
105
+ #-------- Filesystem, names of physical objects ------------------------------------------
106
106
  pathPackage: PurePosixPath | None = None
107
107
  """Override path for the target package."""
108
108
  pathModule: PurePosixPath | None = PurePosixPath(getPathRootJobDEFAULT()) # noqa: RUF009
@@ -112,7 +112,7 @@ class RecipeJobTheorem2:
112
112
  pathFilenameFoldsTotal: PurePosixPath = dataclasses.field(default=None, init=True) # pyright: ignore[reportAssignmentType]
113
113
  """Path for writing fold count results."""
114
114
 
115
- # ------- Logical identifiers, as opposed to physical identifiers ------------------------
115
+ #-------- Logical identifiers, as opposed to physical identifiers ------------------------
116
116
  packageIdentifier: str | None = None
117
117
  """Target package identifier."""
118
118
  logicalPathRoot: identifierDotAttribute | None = None
@@ -128,7 +128,7 @@ class RecipeJobTheorem2:
128
128
  logicalPathModuleDataclass: identifierDotAttribute | None = sourceLogicalPathModuleDataclass
129
129
  """Logical path to target dataclass module."""
130
130
 
131
- # ------- Datatypes ------------------------------------------
131
+ #-------- Datatypes ------------------------------------------
132
132
  type DatatypeFoldsTotal = TheDatatypeFoldsTotal
133
133
  """Type alias for datatype linked to the magnitude of `foldsTotal`."""
134
134
  type DatatypeElephino = TheDatatypeElephino
@@ -10,7 +10,7 @@ progress integration for long-running calculations, and launcher generation for
10
10
 
11
11
  from astToolkit import Be, Make, NodeChanger, NodeTourist, parseLogicalPath2astModule, Then
12
12
  from astToolkit.containers import astModuleToIngredientsFunction, IngredientsFunction, IngredientsModule
13
- from hunterMakesPy import autoDecodingRLE, identifierDotAttribute
13
+ from hunterMakesPy.dataStructures import autoDecodingRLE
14
14
  from mapFolding import (
15
15
  DatatypeLeavesTotal, dictionaryOEIS, getFoldsTotalKnown, getPathFilenameFoldsTotal, packageSettings)
16
16
  from mapFolding.dataBaskets import MapFoldingState, SymmetricFoldsState
@@ -19,9 +19,12 @@ from mapFolding.someAssemblyRequired.RecipeJob import customizeDatatypeViaImport
19
19
  from mapFolding.someAssemblyRequired.toolkitNumba import decorateCallableWithNumba, parametersNumbaLight, SpicesJobNumba
20
20
  from mapFolding.someAssemblyRequired.transformationTools import shatter_dataclassesDOTdataclass
21
21
  from pathlib import PurePosixPath
22
- from typing import cast
22
+ from typing import cast, TYPE_CHECKING
23
23
  import ast
24
24
 
25
+ if TYPE_CHECKING:
26
+ from hunterMakesPy import identifierDotAttribute
27
+
25
28
  # TODO More convergence with `makeJobTheorem2codon`
26
29
 
27
30
  # TODO Dynamically calculate the bitwidth of each datatype. NOTE I've delayed dynamic calculation because I don't know how to