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.
- easyRun/NOTcountingFolds.py +7 -11
- easyRun/countFolds.py +11 -10
- easyRun/meanders.py +6 -8
- mapFolding/__init__.py +24 -36
- mapFolding/_e/Z0Z_analysisPython/SORTZ0Z_hypothesis.py +189 -0
- mapFolding/_e/Z0Z_analysisPython/SORTZ0Z_p2d6.py +143 -0
- mapFolding/_e/Z0Z_analysisPython/__init__.py +4 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/__init__.py +0 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/aggregated/351/246/226/344/270/200.py +369 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/aggregated/351/246/226/344/270/2001.py +694 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/aggregated/351/246/226/344/270/200/344/270/211.py +514 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/aggregated/351/246/226/344/270/200/344/270/2111.py +480 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/aggregated/351/246/226/344/270/200/344/272/214.py +511 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/aggregated/351/246/226/344/270/200/344/272/2141.py +515 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/aggregated/351/246/226/344/270/200/344/272/214/344/270/211.py +485 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/aggregated/351/246/226/344/270/200/344/272/214/344/270/2111.py +442 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/aggregated/351/246/226/344/270/211.py +313 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/aggregated/351/246/226/344/270/2111.py +343 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/aggregated/351/246/226/344/272/214.py +400 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/aggregated/351/246/226/344/272/2141.py +497 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/aggregated/351/246/226/344/272/214/344/270/211.py +463 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/aggregated/351/246/226/344/272/214/344/270/2111.py +441 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/aggregated/351/246/226/351/233/266.py +35 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/aggregated/351/246/226/351/233/2661.py +35 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/aggregated/351/246/226/351/233/266/344/270/200.py +382 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/aggregated/351/246/226/351/233/266/344/270/2001.py +630 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/aggregated/351/246/226/351/233/266/344/270/200/344/270/211.py +488 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/aggregated/351/246/226/351/233/266/344/270/200/344/270/2111.py +475 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/aggregated/351/246/226/351/233/266/344/270/200/344/272/214.py +473 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/aggregated/351/246/226/351/233/266/344/270/200/344/272/2141.py +500 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/aggregated/351/246/226/351/233/266/344/270/200/344/272/214/344/270/211.py +465 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/aggregated/351/246/226/351/233/266/344/270/200/344/272/214/344/270/2111.py +439 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/aggregated/351/246/226/351/233/266/344/270/211.py +599 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/aggregated/351/246/226/351/233/266/344/270/2111.py +536 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/aggregated/351/246/226/351/233/266/344/272/214.py +506 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/aggregated/351/246/226/351/233/266/344/272/2141.py +533 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/aggregated/351/246/226/351/233/266/344/272/214/344/270/211.py +489 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/aggregated/351/246/226/351/233/266/344/272/214/344/270/2111.py +474 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/344/270/200.py +1186 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/344/270/2001.py +2158 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/344/270/2001Negative.py +2158 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/344/270/200Negative.py +1186 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/344/270/200/344/270/211.py +1397 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/344/270/200/344/270/2111.py +1291 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/344/270/200/344/270/2111Negative.py +1291 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/344/270/200/344/270/211Negative.py +1397 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/344/270/200/344/272/214.py +1240 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/344/270/200/344/272/2141.py +1420 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/344/270/200/344/272/2141Negative.py +1420 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/344/270/200/344/272/214Negative.py +1240 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/344/270/200/344/272/214/344/270/211.py +1366 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/344/270/200/344/272/214/344/270/2111.py +1274 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/344/270/200/344/272/214/344/270/2111Negative.py +1274 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/344/270/200/344/272/214/344/270/211Negative.py +1366 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/344/270/211.py +1186 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/344/270/2111.py +1186 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/344/270/2111Negative.py +1186 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/344/270/211Negative.py +1186 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/344/272/214.py +1102 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/344/272/2141.py +1422 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/344/272/2141Negative.py +1422 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/344/272/214Negative.py +1102 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/344/272/214/344/270/211.py +1240 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/344/272/214/344/270/2111.py +1228 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/344/272/214/344/270/2111Negative.py +1228 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/344/272/214/344/270/211Negative.py +1240 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/351/233/266.py +32 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/351/233/2661.py +1162 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/351/233/2661Negative.py +1162 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/351/233/266Negative.py +32 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/351/233/266/344/270/200.py +1186 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/351/233/266/344/270/2001.py +1926 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/351/233/266/344/270/2001Negative.py +1926 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/351/233/266/344/270/200Negative.py +1186 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/351/233/266/344/270/200/344/270/211.py +1291 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/351/233/266/344/270/200/344/270/2111.py +1176 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/351/233/266/344/270/200/344/270/2111Negative.py +1176 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/351/233/266/344/270/200/344/270/211Negative.py +1291 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/351/233/266/344/270/200/344/272/214.py +1228 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/351/233/266/344/270/200/344/272/2141.py +1324 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/351/233/266/344/270/200/344/272/2141Negative.py +1324 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/351/233/266/344/270/200/344/272/214Negative.py +1228 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/351/233/266/344/270/200/344/272/214/344/270/211.py +1274 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/351/233/266/344/270/200/344/272/214/344/270/2111.py +1038 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/351/233/266/344/270/200/344/272/214/344/270/2111Negative.py +1038 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/351/233/266/344/270/200/344/272/214/344/270/211Negative.py +1274 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/351/233/266/344/270/211.py +2158 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/351/233/266/344/270/2111.py +1926 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/351/233/266/344/270/2111Negative.py +1926 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/351/233/266/344/270/211Negative.py +2158 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/351/233/266/344/272/214.py +1422 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/351/233/266/344/272/2141.py +1364 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/351/233/266/344/272/2141Negative.py +1364 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/351/233/266/344/272/214Negative.py +1422 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/351/233/266/344/272/214/344/270/211.py +1420 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/351/233/266/344/272/214/344/270/2111.py +1324 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/351/233/266/344/272/214/344/270/2111Negative.py +1324 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d5/351/246/226/351/233/266/344/272/214/344/270/211Negative.py +1420 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/344/270/200.py +3133 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/344/270/2001.py +6039 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/344/270/2001Negative.py +6039 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/344/270/200Negative.py +3133 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/344/270/200/344/270/211.py +3527 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/344/270/200/344/270/2111.py +2300 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/344/270/200/344/270/2111Negative.py +2300 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/344/270/200/344/270/211Negative.py +3527 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/344/270/200/344/272/214.py +3597 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/344/270/200/344/272/2141.py +3317 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/344/270/200/344/272/2141Negative.py +3317 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/344/270/200/344/272/214Negative.py +3597 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/344/270/200/344/272/214/344/270/211.py +3161 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/344/270/200/344/272/214/344/270/2111.py +2877 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/344/270/200/344/272/214/344/270/2111Negative.py +2877 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/344/270/200/344/272/214/344/270/211Negative.py +3161 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/344/270/211.py +2981 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/344/270/2111.py +3055 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/344/270/2111Negative.py +3055 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/344/270/211Negative.py +2981 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/344/272/214.py +3221 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/344/272/2141.py +3988 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/344/272/2141Negative.py +3988 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/344/272/214Negative.py +3221 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/344/272/214/344/270/211.py +3652 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/344/272/214/344/270/2111.py +2863 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/344/272/214/344/270/2111Negative.py +2863 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/344/272/214/344/270/211Negative.py +3652 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/351/233/266/344/270/200.py +2485 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/351/233/266/344/270/2001.py +4566 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/351/233/266/344/270/2001Negative.py +4566 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/351/233/266/344/270/200Negative.py +2485 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/351/233/266/344/270/200/344/270/211.py +3006 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/351/233/266/344/270/200/344/270/2111.py +2485 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/351/233/266/344/270/200/344/270/2111Negative.py +2485 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/351/233/266/344/270/200/344/270/211Negative.py +3006 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/351/233/266/344/270/200/344/272/214.py +3304 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/351/233/266/344/270/200/344/272/2141.py +3015 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/351/233/266/344/270/200/344/272/2141Negative.py +3015 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/351/233/266/344/270/200/344/272/214Negative.py +3304 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/351/233/266/344/270/200/344/272/214/344/270/211.py +2939 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/351/233/266/344/270/200/344/272/214/344/270/2111.py +2589 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/351/233/266/344/270/200/344/272/214/344/270/2111Negative.py +2589 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/351/233/266/344/270/200/344/272/214/344/270/211Negative.py +2939 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/351/233/266/344/270/211.py +3899 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/351/233/266/344/270/2111.py +2996 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/351/233/266/344/270/2111Negative.py +2996 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/351/233/266/344/270/211Negative.py +3899 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/351/233/266/344/272/214.py +3223 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/351/233/266/344/272/2141.py +3020 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/351/233/266/344/272/2141Negative.py +3020 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/351/233/266/344/272/214Negative.py +3223 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/351/233/266/344/272/214/344/270/211.py +3250 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/351/233/266/344/272/214/344/270/2111.py +2667 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/351/233/266/344/272/214/344/270/2111Negative.py +2667 -0
- mapFolding/_e/Z0Z_analysisPython/exclusionData/collatedp2d6/351/246/226/351/233/266/344/272/214/344/270/211Negative.py +3250 -0
- mapFolding/_e/Z0Z_analysisPython/measure.py +162 -0
- mapFolding/_e/Z0Z_analysisPython/positionAnalysis.py +403 -0
- mapFolding/_e/Z0Z_analysisPython/positionAnalysisPileRanges2d6.py +110 -0
- mapFolding/_e/Z0Z_analysisPython/theExcluderBeast.py +640 -0
- mapFolding/_e/Z0Z_analysisPython/toolkit.py +166 -0
- mapFolding/_e/Z0Z_analysisPython/toolkitCSVsequences.py +188 -0
- mapFolding/_e/Z0Z_analysisPython/workBenchPatternFinder.py +284 -0
- mapFolding/_e/Z0Z_notes/__init__.py +0 -0
- mapFolding/_e/Z0Z_notes/knowledgeDump.py +214 -0
- mapFolding/_e/__init__.py +45 -0
- mapFolding/_e/_beDRY.py +547 -0
- mapFolding/_e/_dataDynamic.py +1164 -0
- mapFolding/_e/_measure.py +579 -0
- mapFolding/_e/_semiotics.py +363 -0
- mapFolding/_e/_theTypes.py +31 -0
- mapFolding/_e/algorithms/__init__.py +1 -0
- mapFolding/_e/algorithms/constraintPropagation.py +158 -0
- mapFolding/_e/algorithms/elimination.py +118 -0
- mapFolding/_e/algorithms/eliminationCrease.py +66 -0
- mapFolding/_e/algorithms/iff.py +584 -0
- mapFolding/_e/basecamp.py +89 -0
- mapFolding/_e/dataBaskets.py +123 -0
- mapFolding/_e/dataRaw/__init__.py +0 -0
- mapFolding/_e/easyRun/__init__.py +0 -0
- mapFolding/_e/easyRun/eliminateFolds.py +72 -0
- mapFolding/_e/easyRun/pinning.py +62 -0
- mapFolding/_e/filters.py +384 -0
- mapFolding/_e/pin2/344/270/212nDimensions.py +882 -0
- mapFolding/_e/pin2/344/270/212nDimensionsAnnex.py +551 -0
- mapFolding/_e/pin2/344/270/212nDimensionsByCrease.py +190 -0
- mapFolding/_e/pin2/344/270/212nDimensionsByDomain.py +459 -0
- mapFolding/_e/pinIt.py +436 -0
- mapFolding/_semiotics.py +42 -0
- mapFolding/_theSSOT.py +11 -56
- mapFolding/_theTypes.py +52 -67
- mapFolding/algorithms/matrixMeandersNumPyndas.py +18 -18
- mapFolding/algorithms/oeisIDbyFormula.py +4 -4
- mapFolding/algorithms/zCuzDocStoopidoeisIDbyFormula.py +3 -3
- mapFolding/basecamp.py +11 -80
- mapFolding/beDRY.py +107 -111
- mapFolding/dataBaskets.py +0 -56
- mapFolding/filesystemToolkit.py +15 -11
- mapFolding/oeis.py +17 -16
- mapFolding/reference/matrixMeandersAnalysis/prefixNotationNotes.py +2 -2
- mapFolding/reference/meandersDumpingGround/matrixMeandersBaselineV2.py +0 -1
- mapFolding/reference/meandersDumpingGround/matrixMeandersNumPyV1finalForm.py +8 -10
- mapFolding/someAssemblyRequired/RecipeJob.py +5 -5
- mapFolding/someAssemblyRequired/makeJobTheorem2Numba.py +5 -2
- mapFolding/someAssemblyRequired/makeJobTheorem2codon.py +9 -11
- mapFolding/someAssemblyRequired/mapFoldingModules/makeMapFoldingModules.py +2 -1
- mapFolding/someAssemblyRequired/transformationTools.py +1 -1
- mapFolding/tests/Z0Z_test_e_excluder.py +155 -0
- mapFolding/tests/conftest.py +193 -314
- mapFolding/tests/dataSamples/A001417.py +455 -0
- mapFolding/tests/dataSamples/__init__.py +1 -0
- mapFolding/tests/dataSamples/measurementData.py +1818 -0
- mapFolding/tests/dataSamples/p2DnDomain3_2_/351/246/226/344/270/200_/351/246/226/351/233/266/344/270/200.py +17 -0
- mapFolding/tests/dataSamples/p2DnDomain3_/351/246/226/344/270/200.py +17 -0
- mapFolding/tests/dataSamples/p2DnDomain5_4.py +17 -0
- mapFolding/tests/dataSamples/p2DnDomain6_5.py +17 -0
- mapFolding/tests/dataSamples/p2DnDomain6_7_5_4.py +17 -0
- mapFolding/tests/dataSamples/p2DnDomain7_6.py +17 -0
- 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
- 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
- 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
- mapFolding/tests/dataSamples/p2DnDomain/351/246/226/351/233/266/344/272/214_/351/246/226/344/272/214.py +15 -0
- mapFolding/tests/dataSamples/semioticsData.py +135 -0
- mapFolding/tests/test_computations.py +134 -80
- mapFolding/tests/test_e_computations.py +42 -0
- mapFolding/tests/test_e_dataDynamic.py +189 -0
- mapFolding/tests/test_e_measurements.py +257 -0
- mapFolding/tests/test_e_pinning.py +61 -0
- mapFolding/tests/test_e_semiotics.py +128 -0
- mapFolding/tests/test_filesystem.py +39 -17
- mapFolding/tests/{test_other.py → test_parameterValidation.py} +3 -3
- mapFolding/tests/{test_tasks.py → test_taskDivisions.py} +42 -23
- mapFolding/zCuzDocStoopid/makeDocstrings.py +3 -2
- {mapfolding-0.17.1.dist-info → mapfolding-0.18.0.dist-info}/METADATA +11 -8
- mapfolding-0.18.0.dist-info/RECORD +305 -0
- {mapfolding-0.17.1.dist-info → mapfolding-0.18.0.dist-info}/WHEEL +1 -1
- easyRun/eliminateFolds.py +0 -60
- mapFolding/algorithms/constraintPropagation.py +0 -184
- mapFolding/algorithms/elimination.py +0 -131
- mapFolding/algorithms/eliminationCount.py +0 -26
- mapFolding/algorithms/eliminationPinned.py +0 -35
- mapFolding/algorithms/iff.py +0 -206
- mapFolding/algorithms/patternFinder.py +0 -280
- mapFolding/algorithms/pinning2Dn.py +0 -345
- mapFolding/algorithms/pinning2DnAnnex.py +0 -43
- mapFolding/tests/verify.py +0 -323
- mapfolding-0.17.1.dist-info/RECORD +0 -112
- {mapfolding-0.17.1.dist-info → mapfolding-0.18.0.dist-info}/entry_points.txt +0 -0
- {mapfolding-0.17.1.dist-info → mapfolding-0.18.0.dist-info}/licenses/LICENSE +0 -0
- {mapfolding-0.17.1.dist-info → mapfolding-0.18.0.dist-info}/top_level.txt +0 -0
mapFolding/tests/conftest.py
CHANGED
|
@@ -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
|
|
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
|
-
|
|
41
|
+
#======== uniform messages and standardized test formats ==========
|
|
40
42
|
|
|
41
|
-
|
|
42
|
-
|
|
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
|
-
|
|
50
|
-
|
|
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
|
-
|
|
55
|
-
The
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
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
|
-
|
|
76
|
-
|
|
64
|
+
formattedMessage : str
|
|
65
|
+
A formatted string showing the test context and comparison.
|
|
77
66
|
|
|
78
67
|
"""
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
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
|
-
|
|
85
|
-
|
|
86
|
-
|
|
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
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
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
|
-
|
|
100
|
-
|
|
101
|
-
|
|
93
|
+
if type(expected) is type[Exception]:
|
|
94
|
+
messageExpected = expected.__name__
|
|
95
|
+
else:
|
|
96
|
+
messageExpected = expected
|
|
102
97
|
|
|
103
|
-
|
|
104
|
-
|
|
98
|
+
try:
|
|
99
|
+
messageActual = actual = functionTarget(*arguments)
|
|
100
|
+
except Exception as actualError:
|
|
101
|
+
messageActual = type(actualError).__name__
|
|
102
|
+
actual = type(actualError)
|
|
105
103
|
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
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
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
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
|
-
|
|
122
|
-
|
|
123
|
-
except AttributeError:
|
|
124
|
-
extension = ".txt"
|
|
124
|
+
with pytest.raises(SystemExit) as exitInfo:
|
|
125
|
+
functionTarget(*arguments)
|
|
125
126
|
|
|
126
|
-
|
|
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
|
-
|
|
132
|
-
|
|
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
|
-
|
|
135
|
-
|
|
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
|
-
|
|
144
|
-
Temporary directory path from the `
|
|
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
|
-
|
|
164
|
-
Temporary directory path from the `
|
|
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
|
|
193
|
-
"""
|
|
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
|
-
|
|
233
|
-
|
|
209
|
+
request : pytest.FixtureRequest
|
|
210
|
+
The pytest request object, optionally containing `param` for file extension.
|
|
234
211
|
|
|
235
212
|
Returns
|
|
236
213
|
-------
|
|
237
|
-
|
|
238
|
-
|
|
214
|
+
temporaryFilePath : Path
|
|
215
|
+
Path to a unique temporary file that will be cleaned up automatically.
|
|
239
216
|
|
|
240
217
|
"""
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
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
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
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
|
-
|
|
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
|
-
|
|
276
|
-
|
|
277
|
-
except (ValueError, NotImplementedError):
|
|
278
|
-
pass
|
|
231
|
+
registrarRecordsTemporaryFilesystemObject(pathFilename_tmp.parent)
|
|
232
|
+
return pathFilename_tmp
|
|
279
233
|
|
|
280
234
|
@pytest.fixture
|
|
281
|
-
def
|
|
282
|
-
"""
|
|
235
|
+
def path_tmpTesting(request: pytest.FixtureRequest) -> Path:
|
|
236
|
+
"""Creates a unique temporary directory for testing.
|
|
283
237
|
|
|
284
238
|
Parameters
|
|
285
239
|
----------
|
|
286
|
-
|
|
287
|
-
|
|
240
|
+
request : pytest.FixtureRequest
|
|
241
|
+
The pytest request object providing test context.
|
|
288
242
|
|
|
289
243
|
Returns
|
|
290
244
|
-------
|
|
291
|
-
|
|
292
|
-
|
|
245
|
+
temporaryPath : Path
|
|
246
|
+
Path to a unique temporary directory that will be cleaned up automatically.
|
|
293
247
|
|
|
294
248
|
"""
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
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
|
-
|
|
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
|
|
314
|
-
"""
|
|
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
|
-
|
|
319
|
-
|
|
263
|
+
contextManager : Generator[None, None, None]
|
|
264
|
+
Context manager that sets up test directories and ensures cleanup.
|
|
320
265
|
|
|
321
266
|
"""
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
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
|
|
354
|
-
def
|
|
355
|
-
"""
|
|
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
|
-
|
|
365
|
-
OEIS sequence identifier
|
|
297
|
+
randomSequenceIdentifier : str
|
|
298
|
+
Randomly selected OEIS sequence identifier from implemented sequences.
|
|
366
299
|
|
|
367
300
|
"""
|
|
368
|
-
return
|
|
301
|
+
return random.choice(oeisIDsImplemented) # noqa: S311
|
|
369
302
|
|
|
370
|
-
|
|
371
|
-
def oeisIDother(request: pytest.FixtureRequest) -> Any:
|
|
372
|
-
"""Parametrized fixture providing all other OEIS sequence identifiers.
|
|
303
|
+
#======== Miscellaneous =====================================
|
|
373
304
|
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
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
|
-
|
|
382
|
-
|
|
311
|
+
contextManager : Generator[None, Any, None]
|
|
312
|
+
Context manager that configures warnings as errors and restores settings.
|
|
383
313
|
|
|
384
314
|
"""
|
|
385
|
-
|
|
315
|
+
warnings.filterwarnings("error")
|
|
316
|
+
yield
|
|
317
|
+
warnings.resetwarnings()
|
|
386
318
|
|
|
387
319
|
@pytest.fixture
|
|
388
|
-
def
|
|
389
|
-
"""
|
|
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
|
-
|
|
394
|
-
|
|
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
|
-
|
|
398
|
-
|
|
399
|
-
|
|
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
|
-
|
|
408
|
-
|
|
409
|
-
|
|
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
|
-
|
|
421
|
-
|
|
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
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
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
|
-
|
|
455
|
-
|
|
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
|
-
|
|
352
|
+
return mockCountFolds
|
|
353
|
+
return makeMock
|
|
461
354
|
|
|
462
|
-
|
|
463
|
-
|
|
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
|
-
|
|
480
|
-
|
|
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
|
-
|
|
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}"
|