mapFolding 0.17.1__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 (248) hide show
  1. easyRun/NOTcountingFolds.py +7 -11
  2. easyRun/countFolds.py +11 -10
  3. easyRun/meanders.py +6 -8
  4. mapFolding/__init__.py +24 -36
  5. mapFolding/_e/Z0Z_analysisPython/SORTZ0Z_hypothesis.py +189 -0
  6. mapFolding/_e/Z0Z_analysisPython/SORTZ0Z_p2d6.py +143 -0
  7. mapFolding/_e/Z0Z_analysisPython/__init__.py +4 -0
  8. mapFolding/_e/Z0Z_analysisPython/exclusionData/__init__.py +0 -0
  9. mapFolding/_e/Z0Z_analysisPython/exclusionData/aggregated/351/246/226/344/270/200.py +369 -0
  10. mapFolding/_e/Z0Z_analysisPython/exclusionData/aggregated/351/246/226/344/270/2001.py +694 -0
  11. mapFolding/_e/Z0Z_analysisPython/exclusionData/aggregated/351/246/226/344/270/200/344/270/211.py +514 -0
  12. mapFolding/_e/Z0Z_analysisPython/exclusionData/aggregated/351/246/226/344/270/200/344/270/2111.py +480 -0
  13. mapFolding/_e/Z0Z_analysisPython/exclusionData/aggregated/351/246/226/344/270/200/344/272/214.py +511 -0
  14. mapFolding/_e/Z0Z_analysisPython/exclusionData/aggregated/351/246/226/344/270/200/344/272/2141.py +515 -0
  15. mapFolding/_e/Z0Z_analysisPython/exclusionData/aggregated/351/246/226/344/270/200/344/272/214/344/270/211.py +485 -0
  16. mapFolding/_e/Z0Z_analysisPython/exclusionData/aggregated/351/246/226/344/270/200/344/272/214/344/270/2111.py +442 -0
  17. mapFolding/_e/Z0Z_analysisPython/exclusionData/aggregated/351/246/226/344/270/211.py +313 -0
  18. mapFolding/_e/Z0Z_analysisPython/exclusionData/aggregated/351/246/226/344/270/2111.py +343 -0
  19. mapFolding/_e/Z0Z_analysisPython/exclusionData/aggregated/351/246/226/344/272/214.py +400 -0
  20. mapFolding/_e/Z0Z_analysisPython/exclusionData/aggregated/351/246/226/344/272/2141.py +497 -0
  21. mapFolding/_e/Z0Z_analysisPython/exclusionData/aggregated/351/246/226/344/272/214/344/270/211.py +463 -0
  22. mapFolding/_e/Z0Z_analysisPython/exclusionData/aggregated/351/246/226/344/272/214/344/270/2111.py +441 -0
  23. mapFolding/_e/Z0Z_analysisPython/exclusionData/aggregated/351/246/226/351/233/266.py +35 -0
  24. mapFolding/_e/Z0Z_analysisPython/exclusionData/aggregated/351/246/226/351/233/2661.py +35 -0
  25. mapFolding/_e/Z0Z_analysisPython/exclusionData/aggregated/351/246/226/351/233/266/344/270/200.py +382 -0
  26. mapFolding/_e/Z0Z_analysisPython/exclusionData/aggregated/351/246/226/351/233/266/344/270/2001.py +630 -0
  27. mapFolding/_e/Z0Z_analysisPython/exclusionData/aggregated/351/246/226/351/233/266/344/270/200/344/270/211.py +488 -0
  28. mapFolding/_e/Z0Z_analysisPython/exclusionData/aggregated/351/246/226/351/233/266/344/270/200/344/270/2111.py +475 -0
  29. mapFolding/_e/Z0Z_analysisPython/exclusionData/aggregated/351/246/226/351/233/266/344/270/200/344/272/214.py +473 -0
  30. mapFolding/_e/Z0Z_analysisPython/exclusionData/aggregated/351/246/226/351/233/266/344/270/200/344/272/2141.py +500 -0
  31. mapFolding/_e/Z0Z_analysisPython/exclusionData/aggregated/351/246/226/351/233/266/344/270/200/344/272/214/344/270/211.py +465 -0
  32. mapFolding/_e/Z0Z_analysisPython/exclusionData/aggregated/351/246/226/351/233/266/344/270/200/344/272/214/344/270/2111.py +439 -0
  33. mapFolding/_e/Z0Z_analysisPython/exclusionData/aggregated/351/246/226/351/233/266/344/270/211.py +599 -0
  34. mapFolding/_e/Z0Z_analysisPython/exclusionData/aggregated/351/246/226/351/233/266/344/270/2111.py +536 -0
  35. mapFolding/_e/Z0Z_analysisPython/exclusionData/aggregated/351/246/226/351/233/266/344/272/214.py +506 -0
  36. mapFolding/_e/Z0Z_analysisPython/exclusionData/aggregated/351/246/226/351/233/266/344/272/2141.py +533 -0
  37. mapFolding/_e/Z0Z_analysisPython/exclusionData/aggregated/351/246/226/351/233/266/344/272/214/344/270/211.py +489 -0
  38. mapFolding/_e/Z0Z_analysisPython/exclusionData/aggregated/351/246/226/351/233/266/344/272/214/344/270/2111.py +474 -0
  39. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/344/270/200.py +1186 -0
  40. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/344/270/2001.py +2158 -0
  41. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/344/270/2001Negative.py +2158 -0
  42. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/344/270/200Negative.py +1186 -0
  43. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/344/270/200/344/270/211.py +1397 -0
  44. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/344/270/200/344/270/2111.py +1291 -0
  45. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/344/270/200/344/270/2111Negative.py +1291 -0
  46. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/344/270/200/344/270/211Negative.py +1397 -0
  47. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/344/270/200/344/272/214.py +1240 -0
  48. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/344/270/200/344/272/2141.py +1420 -0
  49. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/344/270/200/344/272/2141Negative.py +1420 -0
  50. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/344/270/200/344/272/214Negative.py +1240 -0
  51. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/344/270/200/344/272/214/344/270/211.py +1366 -0
  52. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/344/270/200/344/272/214/344/270/2111.py +1274 -0
  53. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/344/270/200/344/272/214/344/270/2111Negative.py +1274 -0
  54. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/344/270/200/344/272/214/344/270/211Negative.py +1366 -0
  55. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/344/270/211.py +1186 -0
  56. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/344/270/2111.py +1186 -0
  57. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/344/270/2111Negative.py +1186 -0
  58. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/344/270/211Negative.py +1186 -0
  59. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/344/272/214.py +1102 -0
  60. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/344/272/2141.py +1422 -0
  61. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/344/272/2141Negative.py +1422 -0
  62. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/344/272/214Negative.py +1102 -0
  63. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/344/272/214/344/270/211.py +1240 -0
  64. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/344/272/214/344/270/2111.py +1228 -0
  65. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/344/272/214/344/270/2111Negative.py +1228 -0
  66. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/344/272/214/344/270/211Negative.py +1240 -0
  67. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/351/233/266.py +32 -0
  68. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/351/233/2661.py +1162 -0
  69. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/351/233/2661Negative.py +1162 -0
  70. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/351/233/266Negative.py +32 -0
  71. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/351/233/266/344/270/200.py +1186 -0
  72. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/351/233/266/344/270/2001.py +1926 -0
  73. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/351/233/266/344/270/2001Negative.py +1926 -0
  74. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/351/233/266/344/270/200Negative.py +1186 -0
  75. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/351/233/266/344/270/200/344/270/211.py +1291 -0
  76. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/351/233/266/344/270/200/344/270/2111.py +1176 -0
  77. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/351/233/266/344/270/200/344/270/2111Negative.py +1176 -0
  78. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/351/233/266/344/270/200/344/270/211Negative.py +1291 -0
  79. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/351/233/266/344/270/200/344/272/214.py +1228 -0
  80. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/351/233/266/344/270/200/344/272/2141.py +1324 -0
  81. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/351/233/266/344/270/200/344/272/2141Negative.py +1324 -0
  82. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/351/233/266/344/270/200/344/272/214Negative.py +1228 -0
  83. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/351/233/266/344/270/200/344/272/214/344/270/211.py +1274 -0
  84. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/351/233/266/344/270/200/344/272/214/344/270/2111.py +1038 -0
  85. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/351/233/266/344/270/200/344/272/214/344/270/2111Negative.py +1038 -0
  86. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/351/233/266/344/270/200/344/272/214/344/270/211Negative.py +1274 -0
  87. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/351/233/266/344/270/211.py +2158 -0
  88. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/351/233/266/344/270/2111.py +1926 -0
  89. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/351/233/266/344/270/2111Negative.py +1926 -0
  90. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/351/233/266/344/270/211Negative.py +2158 -0
  91. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/351/233/266/344/272/214.py +1422 -0
  92. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/351/233/266/344/272/2141.py +1364 -0
  93. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/351/233/266/344/272/2141Negative.py +1364 -0
  94. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/351/233/266/344/272/214Negative.py +1422 -0
  95. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/351/233/266/344/272/214/344/270/211.py +1420 -0
  96. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/351/233/266/344/272/214/344/270/2111.py +1324 -0
  97. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/351/233/266/344/272/214/344/270/2111Negative.py +1324 -0
  98. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/351/233/266/344/272/214/344/270/211Negative.py +1420 -0
  99. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/344/270/200.py +3133 -0
  100. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/344/270/2001.py +6039 -0
  101. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/344/270/2001Negative.py +6039 -0
  102. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/344/270/200Negative.py +3133 -0
  103. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/344/270/200/344/270/211.py +3527 -0
  104. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/344/270/200/344/270/2111.py +2300 -0
  105. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/344/270/200/344/270/2111Negative.py +2300 -0
  106. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/344/270/200/344/270/211Negative.py +3527 -0
  107. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/344/270/200/344/272/214.py +3597 -0
  108. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/344/270/200/344/272/2141.py +3317 -0
  109. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/344/270/200/344/272/2141Negative.py +3317 -0
  110. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/344/270/200/344/272/214Negative.py +3597 -0
  111. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/344/270/200/344/272/214/344/270/211.py +3161 -0
  112. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/344/270/200/344/272/214/344/270/2111.py +2877 -0
  113. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/344/270/200/344/272/214/344/270/2111Negative.py +2877 -0
  114. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/344/270/200/344/272/214/344/270/211Negative.py +3161 -0
  115. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/344/270/211.py +2981 -0
  116. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/344/270/2111.py +3055 -0
  117. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/344/270/2111Negative.py +3055 -0
  118. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/344/270/211Negative.py +2981 -0
  119. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/344/272/214.py +3221 -0
  120. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/344/272/2141.py +3988 -0
  121. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/344/272/2141Negative.py +3988 -0
  122. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/344/272/214Negative.py +3221 -0
  123. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/344/272/214/344/270/211.py +3652 -0
  124. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/344/272/214/344/270/2111.py +2863 -0
  125. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/344/272/214/344/270/2111Negative.py +2863 -0
  126. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/344/272/214/344/270/211Negative.py +3652 -0
  127. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/351/233/266/344/270/200.py +2485 -0
  128. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/351/233/266/344/270/2001.py +4566 -0
  129. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/351/233/266/344/270/2001Negative.py +4566 -0
  130. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/351/233/266/344/270/200Negative.py +2485 -0
  131. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/351/233/266/344/270/200/344/270/211.py +3006 -0
  132. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/351/233/266/344/270/200/344/270/2111.py +2485 -0
  133. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/351/233/266/344/270/200/344/270/2111Negative.py +2485 -0
  134. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/351/233/266/344/270/200/344/270/211Negative.py +3006 -0
  135. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/351/233/266/344/270/200/344/272/214.py +3304 -0
  136. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/351/233/266/344/270/200/344/272/2141.py +3015 -0
  137. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/351/233/266/344/270/200/344/272/2141Negative.py +3015 -0
  138. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/351/233/266/344/270/200/344/272/214Negative.py +3304 -0
  139. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/351/233/266/344/270/200/344/272/214/344/270/211.py +2939 -0
  140. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/351/233/266/344/270/200/344/272/214/344/270/2111.py +2589 -0
  141. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/351/233/266/344/270/200/344/272/214/344/270/2111Negative.py +2589 -0
  142. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/351/233/266/344/270/200/344/272/214/344/270/211Negative.py +2939 -0
  143. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/351/233/266/344/270/211.py +3899 -0
  144. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/351/233/266/344/270/2111.py +2996 -0
  145. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/351/233/266/344/270/2111Negative.py +2996 -0
  146. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/351/233/266/344/270/211Negative.py +3899 -0
  147. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/351/233/266/344/272/214.py +3223 -0
  148. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/351/233/266/344/272/2141.py +3020 -0
  149. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/351/233/266/344/272/2141Negative.py +3020 -0
  150. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/351/233/266/344/272/214Negative.py +3223 -0
  151. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/351/233/266/344/272/214/344/270/211.py +3250 -0
  152. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/351/233/266/344/272/214/344/270/2111.py +2667 -0
  153. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/351/233/266/344/272/214/344/270/2111Negative.py +2667 -0
  154. mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/351/233/266/344/272/214/344/270/211Negative.py +3250 -0
  155. mapFolding/_e/Z0Z_analysisPython/measure.py +162 -0
  156. mapFolding/_e/Z0Z_analysisPython/positionAnalysis.py +403 -0
  157. mapFolding/_e/Z0Z_analysisPython/positionAnalysisPileRanges2d6.py +110 -0
  158. mapFolding/_e/Z0Z_analysisPython/theExcluderBeast.py +640 -0
  159. mapFolding/_e/Z0Z_analysisPython/toolkit.py +166 -0
  160. mapFolding/_e/Z0Z_analysisPython/toolkitCSVsequences.py +188 -0
  161. mapFolding/_e/Z0Z_analysisPython/workBenchPatternFinder.py +284 -0
  162. mapFolding/_e/Z0Z_notes/__init__.py +0 -0
  163. mapFolding/_e/Z0Z_notes/knowledgeDump.py +214 -0
  164. mapFolding/_e/__init__.py +45 -0
  165. mapFolding/_e/_beDRY.py +547 -0
  166. mapFolding/_e/_dataDynamic.py +1164 -0
  167. mapFolding/_e/_measure.py +579 -0
  168. mapFolding/_e/_semiotics.py +363 -0
  169. mapFolding/_e/_theTypes.py +31 -0
  170. mapFolding/_e/algorithms/__init__.py +1 -0
  171. mapFolding/_e/algorithms/constraintPropagation.py +158 -0
  172. mapFolding/_e/algorithms/elimination.py +118 -0
  173. mapFolding/_e/algorithms/eliminationCrease.py +66 -0
  174. mapFolding/_e/algorithms/iff.py +584 -0
  175. mapFolding/_e/basecamp.py +89 -0
  176. mapFolding/_e/dataBaskets.py +123 -0
  177. mapFolding/_e/dataRaw/__init__.py +0 -0
  178. mapFolding/_e/easyRun/__init__.py +0 -0
  179. mapFolding/_e/easyRun/eliminateFolds.py +72 -0
  180. mapFolding/_e/easyRun/pinning.py +62 -0
  181. mapFolding/_e/filters.py +384 -0
  182. mapFolding/_e/pin2/344/270/212nDimensions.py +882 -0
  183. mapFolding/_e/pin2/344/270/212nDimensionsAnnex.py +551 -0
  184. mapFolding/_e/pin2/344/270/212nDimensionsByCrease.py +190 -0
  185. mapFolding/_e/pin2/344/270/212nDimensionsByDomain.py +459 -0
  186. mapFolding/_e/pinIt.py +436 -0
  187. mapFolding/_semiotics.py +42 -0
  188. mapFolding/_theSSOT.py +11 -56
  189. mapFolding/_theTypes.py +52 -67
  190. mapFolding/algorithms/matrixMeandersNumPyndas.py +18 -18
  191. mapFolding/algorithms/oeisIDbyFormula.py +4 -4
  192. mapFolding/algorithms/zCuzDocStoopidoeisIDbyFormula.py +3 -3
  193. mapFolding/basecamp.py +11 -80
  194. mapFolding/beDRY.py +107 -111
  195. mapFolding/dataBaskets.py +0 -56
  196. mapFolding/filesystemToolkit.py +15 -11
  197. mapFolding/oeis.py +17 -16
  198. mapFolding/reference/matrixMeandersAnalysis/prefixNotationNotes.py +2 -2
  199. mapFolding/reference/meandersDumpingGround/matrixMeandersBaselineV2.py +0 -1
  200. mapFolding/reference/meandersDumpingGround/matrixMeandersNumPyV1finalForm.py +8 -10
  201. mapFolding/someAssemblyRequired/RecipeJob.py +5 -5
  202. mapFolding/someAssemblyRequired/makeJobTheorem2Numba.py +5 -2
  203. mapFolding/someAssemblyRequired/makeJobTheorem2codon.py +9 -11
  204. mapFolding/someAssemblyRequired/mapFoldingModules/makeMapFoldingModules.py +2 -1
  205. mapFolding/someAssemblyRequired/transformationTools.py +1 -1
  206. mapFolding/tests/Z0Z_test_e_excluder.py +155 -0
  207. mapFolding/tests/conftest.py +193 -314
  208. mapFolding/tests/dataSamples/A001417.py +455 -0
  209. mapFolding/tests/dataSamples/__init__.py +1 -0
  210. mapFolding/tests/dataSamples/measurementData.py +1818 -0
  211. mapFolding/tests/dataSamples/p2DnDomain3_2_/351/246/226/344/270/200_/351/246/226/351/233/266/344/270/200.py +17 -0
  212. mapFolding/tests/dataSamples/p2DnDomain3_/351/246/226/344/270/200.py +17 -0
  213. mapFolding/tests/dataSamples/p2DnDomain5_4.py +17 -0
  214. mapFolding/tests/dataSamples/p2DnDomain6_5.py +17 -0
  215. mapFolding/tests/dataSamples/p2DnDomain6_7_5_4.py +17 -0
  216. mapFolding/tests/dataSamples/p2DnDomain7_6.py +17 -0
  217. 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
  218. 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
  219. 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
  220. mapFolding/tests/dataSamples/p2DnDomain/351/246/226/351/233/266/344/272/214_/351/246/226/344/272/214.py +15 -0
  221. mapFolding/tests/dataSamples/semioticsData.py +135 -0
  222. mapFolding/tests/test_computations.py +134 -80
  223. mapFolding/tests/test_e_computations.py +42 -0
  224. mapFolding/tests/test_e_dataDynamic.py +189 -0
  225. mapFolding/tests/test_e_measurements.py +257 -0
  226. mapFolding/tests/test_e_pinning.py +61 -0
  227. mapFolding/tests/test_e_semiotics.py +128 -0
  228. mapFolding/tests/test_filesystem.py +39 -17
  229. mapFolding/tests/{test_other.py → test_parameterValidation.py} +3 -3
  230. mapFolding/tests/{test_tasks.py → test_taskDivisions.py} +42 -23
  231. mapFolding/zCuzDocStoopid/makeDocstrings.py +3 -2
  232. {mapfolding-0.17.1.dist-info → mapfolding-0.18.0.dist-info}/METADATA +11 -8
  233. mapfolding-0.18.0.dist-info/RECORD +305 -0
  234. {mapfolding-0.17.1.dist-info → mapfolding-0.18.0.dist-info}/WHEEL +1 -1
  235. easyRun/eliminateFolds.py +0 -60
  236. mapFolding/algorithms/constraintPropagation.py +0 -184
  237. mapFolding/algorithms/elimination.py +0 -131
  238. mapFolding/algorithms/eliminationCount.py +0 -26
  239. mapFolding/algorithms/eliminationPinned.py +0 -35
  240. mapFolding/algorithms/iff.py +0 -206
  241. mapFolding/algorithms/patternFinder.py +0 -280
  242. mapFolding/algorithms/pinning2Dn.py +0 -345
  243. mapFolding/algorithms/pinning2DnAnnex.py +0 -43
  244. mapFolding/tests/verify.py +0 -323
  245. mapfolding-0.17.1.dist-info/RECORD +0 -112
  246. {mapfolding-0.17.1.dist-info → mapfolding-0.18.0.dist-info}/entry_points.txt +0 -0
  247. {mapfolding-0.17.1.dist-info → mapfolding-0.18.0.dist-info}/licenses/LICENSE +0 -0
  248. {mapfolding-0.17.1.dist-info → mapfolding-0.18.0.dist-info}/top_level.txt +0 -0
@@ -25,10 +25,12 @@ research domain.
25
25
 
26
26
  from collections.abc import Callable, Generator, Sequence
27
27
  from mapFolding import _theSSOT, getLeavesTotal, makeDataContainer, packageSettings, validateListDimensions
28
- from mapFolding.oeis import dictionaryOEIS, dictionaryOEISMapFolding, oeisIDsImplemented
28
+ from mapFolding.oeis import oeisIDsImplemented
29
+ from numpy.typing import NDArray
29
30
  from pathlib import Path
30
31
  from typing import Any
31
32
  import numpy
33
+ import pickle
32
34
  import pytest
33
35
  import random
34
36
  import shutil
@@ -36,103 +38,130 @@ import unittest.mock
36
38
  import uuid
37
39
  import warnings
38
40
 
39
- # ruff: noqa: S311
41
+ #======== uniform messages and standardized test formats ==========
40
42
 
41
- # SSOT for test data paths and filenames
42
- pathDataSamples: Path = Path(packageSettings.pathPackage, "tests/dataSamples").absolute()
43
- path_tmpRoot: Path = pathDataSamples / "tmp"
44
- path_tmpRoot.mkdir(parents=True, exist_ok=True)
45
-
46
- # The registrar maintains the register of temp files
47
- registerOfTemporaryFilesystemObjects: set[Path] = set()
43
+ def uniformTestMessage(expected: Any, actual: Any, functionName: str, *arguments: Any) -> str:
44
+ """Format assertion message for any test comparison.
48
45
 
49
- def registrarRecordsTemporaryFilesystemObject(path: Path) -> None:
50
- """The registrar adds a tmp file to the register.
46
+ Creates standardized, machine-parsable error messages that clearly display
47
+ what was expected versus what was received. This uniform formatting makes
48
+ test failures easier to debug and maintains consistency across the entire
49
+ test suite.
51
50
 
52
51
  Parameters
53
52
  ----------
54
- path : Path
55
- The filesystem path to register for cleanup.
56
-
57
- """
58
- registerOfTemporaryFilesystemObjects.add(path)
59
-
60
- def registrarDeletesTemporaryFilesystemObjects() -> None:
61
- """The registrar cleans up tmp files in the register."""
62
- for path_tmp in sorted(registerOfTemporaryFilesystemObjects, reverse=True):
63
- if path_tmp.is_file():
64
- path_tmp.unlink(missing_ok=True)
65
- elif path_tmp.is_dir():
66
- shutil.rmtree(path_tmp, ignore_errors=True)
67
- registerOfTemporaryFilesystemObjects.clear()
68
-
69
- @pytest.fixture(scope="session", autouse=True)
70
- def setupTeardownTemporaryFilesystemObjects() -> Generator[None, None, None]:
71
- """Auto-fixture to setup test data directories and cleanup after.
53
+ expected : Any
54
+ The value or exception type that was expected.
55
+ actual : Any
56
+ The value or exception type that was actually received.
57
+ functionName : str
58
+ Name of the function being tested.
59
+ arguments : Any
60
+ Arguments that were passed to the function.
72
61
 
73
62
  Returns
74
63
  -------
75
- contextManager : Generator[None, None, None]
76
- Context manager that sets up test directories and ensures cleanup.
64
+ formattedMessage : str
65
+ A formatted string showing the test context and comparison.
77
66
 
78
67
  """
79
- pathDataSamples.mkdir(exist_ok=True)
80
- path_tmpRoot.mkdir(exist_ok=True)
81
- yield
82
- registrarDeletesTemporaryFilesystemObjects()
68
+ return (f"\nTesting: `{functionName}({', '.join(str(parameter) for parameter in arguments)})`\n"
69
+ f"Expected: {expected}\n"
70
+ f"Got: {actual}")
83
71
 
84
- @pytest.fixture
85
- def path_tmpTesting(request: pytest.FixtureRequest) -> Path:
86
- """Creates a unique temporary directory for testing.
72
+ def standardizedEqualToCallableReturn(expected: Any, functionTarget: Callable[..., Any], *arguments: Any) -> None:
73
+ """Use with callables that produce a return or an error.
74
+
75
+ This is the primary testing function for validating both successful returns
76
+ and expected exceptions. It provides consistent error messaging and handles
77
+ the comparison logic that most tests in the suite rely on.
78
+
79
+ When testing a function that should raise an exception, pass the exception
80
+ type as the `expected` parameter. For successful returns, pass the expected
81
+ return value.
87
82
 
88
83
  Parameters
89
84
  ----------
90
- request : pytest.FixtureRequest
91
- The pytest request object providing test context.
92
-
93
- Returns
94
- -------
95
- temporaryPath : Path
96
- Path to a unique temporary directory that will be cleaned up automatically.
85
+ expected : Any
86
+ Expected return value or exception type.
87
+ functionTarget : Callable[..., Any]
88
+ The function to test.
89
+ arguments : Any
90
+ Arguments to pass to the function.
97
91
 
98
92
  """
99
- # "Z0Z_" ensures the directory name does not start with a number, which would make it an invalid Python identifier
100
- path_tmp: Path = path_tmpRoot / ("Z0Z_" + str(uuid.uuid4().hex))
101
- path_tmp.mkdir(parents=True, exist_ok=False)
93
+ if type(expected) is type[Exception]:
94
+ messageExpected = expected.__name__
95
+ else:
96
+ messageExpected = expected
102
97
 
103
- registrarRecordsTemporaryFilesystemObject(path_tmp)
104
- return path_tmp
98
+ try:
99
+ messageActual = actual = functionTarget(*arguments)
100
+ except Exception as actualError:
101
+ messageActual = type(actualError).__name__
102
+ actual = type(actualError)
105
103
 
106
- @pytest.fixture
107
- def pathFilename_tmpTesting(request: pytest.FixtureRequest) -> Path:
108
- """Creates a unique temporary file path for testing.
104
+ functionName: str = getattr(functionTarget, "__name__", functionTarget.__class__.__name__)
105
+ assert actual == expected, uniformTestMessage(messageExpected, messageActual, functionName, *arguments)
106
+
107
+ def standardizedSystemExit(expected: str | int | Sequence[int], functionTarget: Callable[..., Any], *arguments: Any) -> None:
108
+ """Template for tests expecting SystemExit.
109
109
 
110
110
  Parameters
111
111
  ----------
112
- request : pytest.FixtureRequest
113
- The pytest request object, optionally containing `param` for file extension.
114
-
115
- Returns
116
- -------
117
- temporaryFilePath : Path
118
- Path to a unique temporary file that will be cleaned up automatically.
112
+ expected : str | int | Sequence[int]
113
+ Exit code expectation:
114
+ - "error": any non-zero exit code
115
+ - "nonError": specifically zero exit code
116
+ - int: exact exit code match
117
+ - Sequence[int]: exit code must be one of these values
118
+ functionTarget : Callable[..., Any]
119
+ The function to test.
120
+ arguments : Any
121
+ Arguments to pass to the function.
119
122
 
120
123
  """
121
- try:
122
- extension = request.param
123
- except AttributeError:
124
- extension = ".txt"
124
+ with pytest.raises(SystemExit) as exitInfo:
125
+ functionTarget(*arguments)
125
126
 
126
- # "Z0Z_" ensures the name does not start with a number, which would make it an invalid Python identifier
127
- uuidHex = uuid.uuid4().hex
128
- subpath = "Z0Z_" + uuidHex[0:-8]
129
- filenameStem = "Z0Z_" + uuidHex[-8:None]
127
+ exitCode = exitInfo.value.code
130
128
 
131
- pathFilename_tmp = Path(path_tmpRoot, subpath, filenameStem + extension)
132
- pathFilename_tmp.parent.mkdir(parents=True, exist_ok=False)
129
+ if expected == "error":
130
+ assert exitCode != 0, f"Expected error exit (non-zero) but got code {exitCode}"
131
+ elif expected == "nonError":
132
+ assert exitCode == 0, f"Expected non-error exit (0) but got code {exitCode}"
133
+ elif isinstance(expected, (list, tuple)):
134
+ assert exitCode in expected, f"Expected exit code to be one of {expected} but got {exitCode}"
135
+ else:
136
+ assert exitCode == expected, f"Expected exit code {expected} but got {exitCode}"
133
137
 
134
- registrarRecordsTemporaryFilesystemObject(pathFilename_tmp.parent)
135
- return pathFilename_tmp
138
+ #======== SSOT for test data paths and filenames ==============
139
+ pathDataSamples: Path = Path(packageSettings.pathPackage, "tests/dataSamples").absolute()
140
+ path_tmpRoot: Path = pathDataSamples / "tmp"
141
+ path_tmpRoot.mkdir(parents=True, exist_ok=True)
142
+
143
+ # The registrar maintains the register of tmp filesystem objects
144
+ registerOfTemporaryFilesystemObjects: set[Path] = set()
145
+
146
+ def registrarDeletesTemporaryFilesystemObjects() -> None:
147
+ """The registrar cleans up tmp filesystem objects in the register."""
148
+ for path_tmp in sorted(registerOfTemporaryFilesystemObjects, reverse=True):
149
+ if path_tmp.is_file():
150
+ path_tmp.unlink(missing_ok=True)
151
+ elif path_tmp.is_dir():
152
+ shutil.rmtree(path_tmp, ignore_errors=True)
153
+ registerOfTemporaryFilesystemObjects.clear()
154
+
155
+ def registrarRecordsTemporaryFilesystemObject(path: Path) -> None:
156
+ """The registrar adds a tmp filesystem object to the register.
157
+
158
+ Parameters
159
+ ----------
160
+ path : Path
161
+ The filesystem path to register for cleanup.
162
+
163
+ """
164
+ registerOfTemporaryFilesystemObjects.add(path)
136
165
 
137
166
  @pytest.fixture
138
167
  def pathCacheTesting(path_tmpTesting: Path) -> Generator[Path, Any, None]:
@@ -140,8 +169,8 @@ def pathCacheTesting(path_tmpTesting: Path) -> Generator[Path, Any, None]:
140
169
 
141
170
  Parameters
142
171
  ----------
143
- pathTmpTesting : Path
144
- Temporary directory path from the `pathTmpTesting` fixture.
172
+ path_tmpTesting : Path
173
+ Temporary directory path from the `path_tmpTesting` fixture.
145
174
 
146
175
  Returns
147
176
  -------
@@ -149,7 +178,7 @@ def pathCacheTesting(path_tmpTesting: Path) -> Generator[Path, Any, None]:
149
178
  Context manager that provides the temporary cache path and restores original.
150
179
 
151
180
  """
152
- pathCacheOriginal = _theSSOT.pathCache
181
+ pathCacheOriginal: Path = _theSSOT.pathCache
153
182
  _theSSOT.pathCache = path_tmpTesting
154
183
  yield path_tmpTesting
155
184
  _theSSOT.pathCache = pathCacheOriginal
@@ -160,8 +189,8 @@ def pathFilenameFoldsTotalTesting(path_tmpTesting: Path) -> Path:
160
189
 
161
190
  Parameters
162
191
  ----------
163
- pathTmpTesting : Path
164
- Temporary directory path from the `pathTmpTesting` fixture.
192
+ path_tmpTesting : Path
193
+ Temporary directory path from the `path_tmpTesting` fixture.
165
194
 
166
195
  Returns
167
196
  -------
@@ -171,165 +200,74 @@ def pathFilenameFoldsTotalTesting(path_tmpTesting: Path) -> Path:
171
200
  """
172
201
  return path_tmpTesting.joinpath("foldsTotalTest.txt")
173
202
 
174
- """
175
- Section: Fixtures"""
176
-
177
- @pytest.fixture(autouse=True)
178
- def setupWarningsAsErrors() -> Generator[None, Any, None]:
179
- """Convert all warnings to errors for all tests.
180
-
181
- Returns
182
- -------
183
- contextManager : Generator[None, Any, None]
184
- Context manager that configures warnings as errors and restores settings.
185
-
186
- """
187
- warnings.filterwarnings("error")
188
- yield
189
- warnings.resetwarnings()
190
-
191
203
  @pytest.fixture
192
- def oneTestCuzTestsOverwritingTests(oeisID_1random: str) -> tuple[int, ...]:
193
- """For each `oeisID_1random` from the `pytest.fixture`, returns `listDimensions` from `valuesTestValidation`
194
- if `validateListDimensions` approves. Each `listDimensions` is suitable for testing counts.
195
-
196
- This fixture provides a single test case to avoid issues with tests that write to the same
197
- output files. It's particularly useful when testing code generation or file output functions
198
- where multiple concurrent tests could interfere with each other.
199
-
200
- The returned map shape is guaranteed to be computationally feasible for testing purposes,
201
- avoiding cases that would take excessive time to complete during test runs.
202
-
203
- Parameters
204
- ----------
205
- oeisID_1random : str
206
- Random OEIS sequence identifier from the `oeisID_1random` fixture.
207
-
208
- Returns
209
- -------
210
- mapDimensions : tuple[int, ...]
211
- Valid map dimensions suitable for testing fold counting operations.
212
-
213
- """
214
- while True:
215
- n = random.choice(dictionaryOEISMapFolding[oeisID_1random]['valuesTestValidation'])
216
- if n < 2:
217
- continue
218
- listDimensionsCandidate = list(dictionaryOEISMapFolding[oeisID_1random]['getMapShape'](n))
219
-
220
- try:
221
- return validateListDimensions(listDimensionsCandidate)
222
- except (ValueError, NotImplementedError):
223
- pass
224
-
225
- @pytest.fixture
226
- def mapShapeTestCountFolds(oeisIDmapFolding: str) -> tuple[int, ...]:
227
- """For each `oeisID` from the `pytest.fixture`, returns `listDimensions` from `valuesTestValidation` if
228
- `validateListDimensions` approves. Each `listDimensions` is suitable for testing counts.
204
+ def pathFilename_tmpTesting(request: pytest.FixtureRequest) -> Path:
205
+ """Creates a unique temporary file path for testing.
229
206
 
230
207
  Parameters
231
208
  ----------
232
- oeisID : str
233
- OEIS sequence identifier from the `oeisID` fixture.
209
+ request : pytest.FixtureRequest
210
+ The pytest request object, optionally containing `param` for file extension.
234
211
 
235
212
  Returns
236
213
  -------
237
- mapDimensions : tuple[int, ...]
238
- Valid map dimensions suitable for testing fold counting operations.
214
+ temporaryFilePath : Path
215
+ Path to a unique temporary file that will be cleaned up automatically.
239
216
 
240
217
  """
241
- while True:
242
- n = random.choice(dictionaryOEISMapFolding[oeisIDmapFolding]['valuesTestValidation'])
243
- if n < 2:
244
- continue
245
- listDimensionsCandidate: list[int] = list(dictionaryOEISMapFolding[oeisIDmapFolding]['getMapShape'](n))
246
-
247
- try:
248
- return validateListDimensions(listDimensionsCandidate)
249
- except (ValueError, NotImplementedError):
250
- pass
251
-
252
- @pytest.fixture
253
- def mapShapeTestFunctionality(oeisID_1random: str) -> tuple[int, ...]:
254
- """To test functionality, get one `listDimensions` from `valuesTestValidation` if `validateListDimensions` approves.
255
-
256
- The algorithm can count the folds of the returned `listDimensions` in a short enough time suitable for testing.
257
-
258
- Parameters
259
- ----------
260
- oeisID_1random : str
261
- Random OEIS sequence identifier from the `oeisID_1random` fixture.
218
+ try:
219
+ extension = request.param
220
+ except AttributeError:
221
+ extension = ".txt"
262
222
 
263
- Returns
264
- -------
265
- mapDimensions : tuple[int, ...]
266
- Valid map dimensions that can be processed quickly for functional testing.
223
+ # "Z0Z_" ensures the name does not start with a number, which would make it an invalid Python identifier
224
+ uuid_hex: str = uuid.uuid4().hex
225
+ relativePath: str = "Z0Z_" + uuid_hex[0:-8]
226
+ filenameStem: str = "Z0Z_" + uuid_hex[-8:None]
267
227
 
268
- """
269
- while True:
270
- n = random.choice(dictionaryOEISMapFolding[oeisID_1random]['valuesTestValidation'])
271
- if n < 2:
272
- continue
273
- listDimensionsCandidate = list(dictionaryOEISMapFolding[oeisID_1random]['getMapShape'](n))
228
+ pathFilename_tmp = Path(path_tmpRoot, relativePath, filenameStem + extension)
229
+ pathFilename_tmp.parent.mkdir(parents=True, exist_ok=False)
274
230
 
275
- try:
276
- return validateListDimensions(listDimensionsCandidate)
277
- except (ValueError, NotImplementedError):
278
- pass
231
+ registrarRecordsTemporaryFilesystemObject(pathFilename_tmp.parent)
232
+ return pathFilename_tmp
279
233
 
280
234
  @pytest.fixture
281
- def mapShapeTestParallelization(oeisIDmapFolding: str) -> tuple[int, ...]:
282
- """For each `oeisID` from the `pytest.fixture`, returns `listDimensions` from `valuesTestParallelization`.
235
+ def path_tmpTesting(request: pytest.FixtureRequest) -> Path:
236
+ """Creates a unique temporary directory for testing.
283
237
 
284
238
  Parameters
285
239
  ----------
286
- oeisID : str
287
- OEIS sequence identifier from the `oeisID` fixture.
240
+ request : pytest.FixtureRequest
241
+ The pytest request object providing test context.
288
242
 
289
243
  Returns
290
244
  -------
291
- mapDimensions : tuple[int, ...]
292
- Map dimensions suitable for testing parallelization features.
245
+ temporaryPath : Path
246
+ Path to a unique temporary directory that will be cleaned up automatically.
293
247
 
294
248
  """
295
- n = random.choice(dictionaryOEISMapFolding[oeisIDmapFolding]['valuesTestParallelization'])
296
- return dictionaryOEISMapFolding[oeisIDmapFolding]['getMapShape'](n)
297
-
298
- @pytest.fixture
299
- def mockBenchmarkTimer() -> Generator[unittest.mock.MagicMock | unittest.mock.AsyncMock, Any, None]:
300
- """Mock time.perf_counter_ns for consistent benchmark timing.
301
-
302
- Returns
303
- -------
304
- mockTimer : Generator[unittest.mock.MagicMock | unittest.mock.AsyncMock, Any, None]
305
- Mock timer that returns predictable timing values for testing benchmarks.
249
+ # "Z0Z_" ensures the directory name does not start with a number, which would make it an invalid Python identifier
250
+ uuid_hex: str = uuid.uuid4().hex
251
+ path_tmp: Path = path_tmpRoot / ("Z0Z_" + uuid_hex)
252
+ path_tmp.mkdir(parents=True, exist_ok=False)
306
253
 
307
- """
308
- with unittest.mock.patch('time.perf_counter_ns') as mockTimer:
309
- mockTimer.side_effect = [0, 1e9] # Start and end times for 1 second
310
- yield mockTimer
254
+ registrarRecordsTemporaryFilesystemObject(path_tmp)
255
+ return path_tmp
311
256
 
312
- @pytest.fixture
313
- def mockFoldingFunction() -> Callable[..., Callable[..., None]]:
314
- """Creates a mock function that simulates _countFolds behavior.
257
+ @pytest.fixture(scope="session", autouse=True)
258
+ def setupTeardownTemporaryFilesystemObjects() -> Generator[None, None, None]:
259
+ """Auto-fixture to setup test data directories and cleanup after.
315
260
 
316
261
  Returns
317
262
  -------
318
- mockFactory : Callable[..., Callable[..., None]]
319
- Factory function that creates mock folding functions with specified behavior.
263
+ contextManager : Generator[None, None, None]
264
+ Context manager that sets up test directories and ensures cleanup.
320
265
 
321
266
  """
322
- def make_mock(foldsValue: int, listDimensions: list[int]) -> Callable[..., None]:
323
- mock_array = makeDataContainer(2, numpy.int32)
324
- mock_array[0] = foldsValue
325
- mapShape = validateListDimensions(listDimensions)
326
- mock_array[-1] = getLeavesTotal(mapShape)
327
-
328
- def mock_countFolds(**keywordArguments: Any) -> None:
329
- keywordArguments['foldGroups'][:] = mock_array
330
-
331
- return mock_countFolds
332
- return make_mock
267
+ pathDataSamples.mkdir(exist_ok=True)
268
+ path_tmpRoot.mkdir(exist_ok=True)
269
+ yield
270
+ registrarDeletesTemporaryFilesystemObjects()
333
271
 
334
272
  @pytest.fixture(params=oeisIDsImplemented)
335
273
  def oeisIDmapFolding(request: pytest.FixtureRequest) -> Any:
@@ -350,142 +288,83 @@ def oeisIDmapFolding(request: pytest.FixtureRequest) -> Any:
350
288
  """
351
289
  return request.param
352
290
 
353
- @pytest.fixture(params=('A000682', 'A005316'))
354
- def oeisIDmeanders(request: pytest.FixtureRequest) -> Any:
355
- """Parametrized fixture providing all Meanders OEIS sequence identifiers.
356
-
357
- Parameters
358
- ----------
359
- request : pytest.FixtureRequest
360
- The pytest request object containing the current parameter value.
291
+ @pytest.fixture
292
+ def oeisID_1random() -> str:
293
+ """Return one random valid OEIS ID.
361
294
 
362
295
  Returns
363
296
  -------
364
- sequenceIdentifier : Any
365
- OEIS sequence identifier for testing across all Meanders sequences.
297
+ randomSequenceIdentifier : str
298
+ Randomly selected OEIS sequence identifier from implemented sequences.
366
299
 
367
300
  """
368
- return request.param
301
+ return random.choice(oeisIDsImplemented) # noqa: S311
369
302
 
370
- @pytest.fixture(params=tuple(dictionaryOEIS.keys()))
371
- def oeisIDother(request: pytest.FixtureRequest) -> Any:
372
- """Parametrized fixture providing all other OEIS sequence identifiers.
303
+ #======== Miscellaneous =====================================
373
304
 
374
- Parameters
375
- ----------
376
- request : pytest.FixtureRequest
377
- The pytest request object containing the current parameter value.
305
+ @pytest.fixture(autouse=True)
306
+ def setupWarningsAsErrors() -> Generator[None, Any, None]:
307
+ """Convert all warnings to errors for all tests.
378
308
 
379
309
  Returns
380
310
  -------
381
- sequenceIdentifier : Any
382
- OEIS sequence identifier for testing across all other sequences.
311
+ contextManager : Generator[None, Any, None]
312
+ Context manager that configures warnings as errors and restores settings.
383
313
 
384
314
  """
385
- return request.param
315
+ warnings.filterwarnings("error")
316
+ yield
317
+ warnings.resetwarnings()
386
318
 
387
319
  @pytest.fixture
388
- def oeisID_1random() -> str:
389
- """Return one random valid OEIS ID.
320
+ def mockBenchmarkTimer() -> Generator[unittest.mock.MagicMock | unittest.mock.AsyncMock, Any, None]:
321
+ """Mock time.perf_counter_ns for consistent benchmark timing.
390
322
 
391
323
  Returns
392
324
  -------
393
- randomSequenceIdentifier : str
394
- Randomly selected OEIS sequence identifier from implemented sequences.
325
+ mockTimer : Generator[unittest.mock.MagicMock | unittest.mock.AsyncMock, Any, None]
326
+ Mock timer that returns predictable timing values for testing benchmarks.
395
327
 
396
328
  """
397
- return random.choice(oeisIDsImplemented)
398
-
399
- def uniformTestMessage(expected: Any, actual: Any, functionName: str, *arguments: Any) -> str:
400
- """Format assertion message for any test comparison.
401
-
402
- Creates standardized, machine-parsable error messages that clearly display
403
- what was expected versus what was received. This uniform formatting makes
404
- test failures easier to debug and maintains consistency across the entire
405
- test suite.
329
+ with unittest.mock.patch('time.perf_counter_ns') as mockTimer:
330
+ mockTimer.side_effect = [0, 1e9] # Start and end times for 1 second
331
+ yield mockTimer
406
332
 
407
- Parameters
408
- ----------
409
- expected : Any
410
- The value or exception type that was expected.
411
- actual : Any
412
- The value or exception type that was actually received.
413
- functionName : str
414
- Name of the function being tested.
415
- arguments : Any
416
- Arguments that were passed to the function.
333
+ @pytest.fixture
334
+ def mockFoldingFunction() -> Callable[..., Callable[..., None]]:
335
+ """Creates a mock function that simulates _countFolds behavior.
417
336
 
418
337
  Returns
419
338
  -------
420
- formattedMessage : str
421
- A formatted string showing the test context and comparison.
422
-
423
- """
424
- return (f"\nTesting: `{functionName}({', '.join(str(parameter) for parameter in arguments)})`\n"
425
- f"Expected: {expected}\n"
426
- f"Got: {actual}")
427
-
428
- def standardizedEqualToCallableReturn(expected: Any, functionTarget: Callable[..., Any], *arguments: Any) -> None:
429
- """Use with callables that produce a return or an error.
430
-
431
- This is the primary testing function for validating both successful returns
432
- and expected exceptions. It provides consistent error messaging and handles
433
- the comparison logic that most tests in the suite rely on.
434
-
435
- When testing a function that should raise an exception, pass the exception
436
- type as the `expected` parameter. For successful returns, pass the expected
437
- return value.
438
-
439
- Parameters
440
- ----------
441
- expected : Any
442
- Expected return value or exception type.
443
- functionTarget : Callable[..., Any]
444
- The function to test.
445
- arguments : Any
446
- Arguments to pass to the function.
339
+ mockFactory : Callable[..., Callable[..., None]]
340
+ Factory function that creates mock folding functions with specified behavior.
447
341
 
448
342
  """
449
- if type(expected) is type[Exception]:
450
- messageExpected = expected.__name__
451
- else:
452
- messageExpected = expected
343
+ def makeMock(foldsValue: int, listDimensions: list[int]) -> Callable[..., None]:
344
+ arrayMock = makeDataContainer(2, numpy.int32)
345
+ arrayMock[0] = foldsValue
346
+ mapShape: tuple[int, ...] = validateListDimensions(listDimensions)
347
+ arrayMock[-1] = getLeavesTotal(mapShape)
453
348
 
454
- try:
455
- messageActual = actual = functionTarget(*arguments)
456
- except Exception as actualError:
457
- messageActual = type(actualError).__name__
458
- actual = type(actualError)
349
+ def mockCountFolds(**keywordArguments: Any) -> None:
350
+ keywordArguments['foldGroups'][:] = arrayMock
459
351
 
460
- assert actual == expected, uniformTestMessage(messageExpected, messageActual, functionTarget.__name__, *arguments)
352
+ return mockCountFolds
353
+ return makeMock
461
354
 
462
- def standardizedSystemExit(expected: str | int | Sequence[int], functionTarget: Callable[..., Any], *arguments: Any) -> None:
463
- """Template for tests expecting SystemExit.
464
-
465
- Parameters
466
- ----------
467
- expected : str | int | Sequence[int]
468
- Exit code expectation:
469
- - "error": any non-zero exit code
470
- - "nonError": specifically zero exit code
471
- - int: exact exit code match
472
- - Sequence[int]: exit code must be one of these values
473
- functionTarget : Callable[..., Any]
474
- The function to test.
475
- arguments : Any
476
- Arguments to pass to the function.
355
+ @pytest.fixture
356
+ def loadArrayFoldings() -> Callable[[int], NDArray[numpy.uint8]]:
357
+ """Factory fixture for loading pickled array foldings data.
477
358
 
359
+ Returns
360
+ -------
361
+ loaderFunction : Callable[[int], NDArray[numpy.uint8]]
362
+ Function that loads arrayFoldings for a given dimensionsTotal.
478
363
  """
479
- with pytest.raises(SystemExit) as exitInfo:
480
- functionTarget(*arguments)
364
+ def loader(dimensionsTotal: int) -> NDArray[numpy.uint8]:
365
+ pathFilename = pathDataSamples / f"arrayFoldingsP2d{dimensionsTotal}.pkl"
366
+ arrayFoldings: NDArray[numpy.uint8] = pickle.loads(pathFilename.read_bytes()) # noqa: S301
367
+ return arrayFoldings
481
368
 
482
- exitCode = exitInfo.value.code
369
+ return loader
483
370
 
484
- if expected == "error":
485
- assert exitCode != 0, f"Expected error exit (non-zero) but got code {exitCode}"
486
- elif expected == "nonError":
487
- assert exitCode == 0, f"Expected non-error exit (0) but got code {exitCode}"
488
- elif isinstance(expected, (list, tuple)):
489
- assert exitCode in expected, f"Expected exit code to be one of {expected} but got {exitCode}"
490
- else:
491
- assert exitCode == expected, f"Expected exit code {expected} but got {exitCode}"