2023-10-02T13:54:43,969 Created temporary directory: /tmp/pip-build-tracker-_m45_ozv 2023-10-02T13:54:43,970 Initialized build tracking at /tmp/pip-build-tracker-_m45_ozv 2023-10-02T13:54:43,970 Created build tracker: /tmp/pip-build-tracker-_m45_ozv 2023-10-02T13:54:43,971 Entered build tracker: /tmp/pip-build-tracker-_m45_ozv 2023-10-02T13:54:43,971 Created temporary directory: /tmp/pip-wheel-p_ysyklh 2023-10-02T13:54:43,975 Created temporary directory: /tmp/pip-ephem-wheel-cache-1uolt7pk 2023-10-02T13:54:43,996 Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple 2023-10-02T13:54:43,999 2 location(s) to search for versions of body-scan: 2023-10-02T13:54:43,999 * https://pypi.org/simple/body-scan/ 2023-10-02T13:54:43,999 * https://www.piwheels.org/simple/body-scan/ 2023-10-02T13:54:44,000 Fetching project page and analyzing links: https://pypi.org/simple/body-scan/ 2023-10-02T13:54:44,001 Getting page https://pypi.org/simple/body-scan/ 2023-10-02T13:54:44,002 Found index url https://pypi.org/simple/ 2023-10-02T13:54:44,141 Fetched page https://pypi.org/simple/body-scan/ as application/vnd.pypi.simple.v1+json 2023-10-02T13:54:44,145 Found link https://files.pythonhosted.org/packages/77/dc/4976c62af72e792f4f7db06b16e1e198f94fb784b77eba4ff5971b3353a8/BODY_SCAN-0.0.4.tar.gz (from https://pypi.org/simple/body-scan/), version: 0.0.4 2023-10-02T13:54:44,146 Found link https://files.pythonhosted.org/packages/01/8c/c52ee48475ed68b45b98392b3bfd2e663ec0145f32885f4d3c33e2bb8bca/BODY_SCAN-0.0.5.tar.gz (from https://pypi.org/simple/body-scan/), version: 0.0.5 2023-10-02T13:54:44,147 Found link https://files.pythonhosted.org/packages/6c/11/bfba6fac13e340bd3c5fdc1e1fb983f9620253b819098776d5233a1a5d92/BODY_SCAN-0.0.6.tar.gz (from https://pypi.org/simple/body-scan/), version: 0.0.6 2023-10-02T13:54:44,147 Found link https://files.pythonhosted.org/packages/7e/d4/a65b4e09fb2e6fcb68a92ae4e46f0d31053ff97db90da1c919d5dd901597/BODY_SCAN-0.0.7.tar.gz (from https://pypi.org/simple/body-scan/), version: 0.0.7 2023-10-02T13:54:44,148 Found link https://files.pythonhosted.org/packages/01/99/28ef7ebbedaa67d7466130d182bd36f23e6bdbd91329bf3d5b0bc2902ff2/BODY_SCAN-0.0.8.tar.gz (from https://pypi.org/simple/body-scan/), version: 0.0.8 2023-10-02T13:54:44,149 Found link https://files.pythonhosted.org/packages/0c/06/f7f5639e4d08db4bddc61e23a7d515fd7fd4155c543e29c93c4928b01ddf/BODY_SCAN-0.0.9.tar.gz (from https://pypi.org/simple/body-scan/), version: 0.0.9 2023-10-02T13:54:44,149 Found link https://files.pythonhosted.org/packages/e1/0b/9761b575e8dc7f822e7ad9a61197b0f837c7ba3c328eb458e0047bc16fd2/BODY_SCAN-0.0.10.tar.gz (from https://pypi.org/simple/body-scan/), version: 0.0.10 2023-10-02T13:54:44,150 Found link https://files.pythonhosted.org/packages/d2/39/f97e5e82655f5acba2ae8181371e3aeee766f136902395006f467f75c83e/BODY_SCAN-0.0.11.tar.gz (from https://pypi.org/simple/body-scan/), version: 0.0.11 2023-10-02T13:54:44,151 Found link https://files.pythonhosted.org/packages/e1/2b/d62073bb40f891cfc72057c5a70b3b0c6f28fb75160da25f3debba05d52c/BODY_SCAN-0.0.12.tar.gz (from https://pypi.org/simple/body-scan/), version: 0.0.12 2023-10-02T13:54:44,152 Found link https://files.pythonhosted.org/packages/e6/dc/318f507bf42aee42ecbfeb89aa792f0d6aaa8f4113d0d6369c4128a868b2/BODY_SCAN-0.0.13.tar.gz (from https://pypi.org/simple/body-scan/), version: 0.0.13 2023-10-02T13:54:44,152 Found link https://files.pythonhosted.org/packages/39/6a/9c41261dc1211e0799e7579d6bb3c1e872f952f8333cf7d29fcaa3522406/BODY_SCAN-0.0.14.tar.gz (from https://pypi.org/simple/body-scan/), version: 0.0.14 2023-10-02T13:54:44,153 Found link https://files.pythonhosted.org/packages/5b/ae/3fa5ba9379e44d9a5cab2474ce36172334f49c1b8a6e8024ec97e3978e2d/BODY_SCAN-0.0.15.tar.gz (from https://pypi.org/simple/body-scan/), version: 0.0.15 2023-10-02T13:54:44,154 Found link https://files.pythonhosted.org/packages/4a/7b/2bf405077a418312446509ddabd2c8d002e8af140f7793ccddf28678961d/BODY_SCAN-0.0.16.tar.gz (from https://pypi.org/simple/body-scan/), version: 0.0.16 2023-10-02T13:54:44,154 Found link https://files.pythonhosted.org/packages/68/f2/983e8acc6c0c023262813b15fcfe0e009ece07dbf410330f91efd0a8b8c4/BODY_SCAN-0.0.17.tar.gz (from https://pypi.org/simple/body-scan/), version: 0.0.17 2023-10-02T13:54:44,155 Found link https://files.pythonhosted.org/packages/fe/0c/4536463d789cd0af663160d6067ee38f781a94d3f32d0813f768043ad5d9/BODY_SCAN-0.0.18.tar.gz (from https://pypi.org/simple/body-scan/), version: 0.0.18 2023-10-02T13:54:44,156 Found link https://files.pythonhosted.org/packages/06/ef/d681b5d6e3fac73ea73a92b7405dc0753be266f6277288197a26522acbd8/BODY_SCAN-0.0.19.tar.gz (from https://pypi.org/simple/body-scan/), version: 0.0.19 2023-10-02T13:54:44,156 Found link https://files.pythonhosted.org/packages/bc/a4/64783f579d22ef1abc746160acddc0e45647fac921396c25e74ddf55bc70/BODY_SCAN-0.0.20.tar.gz (from https://pypi.org/simple/body-scan/), version: 0.0.20 2023-10-02T13:54:44,157 Fetching project page and analyzing links: https://www.piwheels.org/simple/body-scan/ 2023-10-02T13:54:44,158 Getting page https://www.piwheels.org/simple/body-scan/ 2023-10-02T13:54:44,159 Found index url https://www.piwheels.org/simple/ 2023-10-02T13:54:44,311 Fetched page https://www.piwheels.org/simple/body-scan/ as text/html 2023-10-02T13:54:44,314 Skipping link: No binaries permitted for body-scan: https://www.piwheels.org/simple/body-scan/BODY_SCAN-0.0.9-py3-none-any.whl#sha256=f3f38b657baa7d42a5723d1e6662fab7119e81a91c3234a1d68309d325808d62 (from https://www.piwheels.org/simple/body-scan/) 2023-10-02T13:54:44,315 Skipping link: No binaries permitted for body-scan: https://www.piwheels.org/simple/body-scan/BODY_SCAN-0.0.8-py3-none-any.whl#sha256=b9f54ed05f7df8ac520a5344098d064a328cc616bae8a220989deabf6a7901e1 (from https://www.piwheels.org/simple/body-scan/) 2023-10-02T13:54:44,315 Skipping link: No binaries permitted for body-scan: https://www.piwheels.org/simple/body-scan/BODY_SCAN-0.0.7-py3-none-any.whl#sha256=5a2e6708cc66b7576d6772cc72a8dec53b05a5cbf2f46880f3f80e405a4ca0bb (from https://www.piwheels.org/simple/body-scan/) 2023-10-02T13:54:44,316 Skipping link: No binaries permitted for body-scan: https://www.piwheels.org/simple/body-scan/BODY_SCAN-0.0.6-py3-none-any.whl#sha256=90f3d906b9a019b4d9dd1ae5f4c46bb24243e3ab6402d6a5ce2b2dbea1491f02 (from https://www.piwheels.org/simple/body-scan/) 2023-10-02T13:54:44,316 Skipping link: No binaries permitted for body-scan: https://www.piwheels.org/simple/body-scan/BODY_SCAN-0.0.5-py3-none-any.whl#sha256=77f25f9133ce1bff3a3cff52eced709f5d9b0069bc81a3552e05263ff5bd9390 (from https://www.piwheels.org/simple/body-scan/) 2023-10-02T13:54:44,317 Skipping link: No binaries permitted for body-scan: https://www.piwheels.org/simple/body-scan/BODY_SCAN-0.0.4-py3-none-any.whl#sha256=ee8f6804722d4cbe2bd07d4ef1011044bf7a3bdcfdb81607ca039b775978e9e9 (from https://www.piwheels.org/simple/body-scan/) 2023-10-02T13:54:44,317 Skipping link: not a file: https://www.piwheels.org/simple/body-scan/ 2023-10-02T13:54:44,318 Skipping link: not a file: https://pypi.org/simple/body-scan/ 2023-10-02T13:54:44,340 Given no hashes to check 1 links for project 'body-scan': discarding no candidates 2023-10-02T13:54:44,359 Collecting body-scan==0.0.12 2023-10-02T13:54:44,362 Created temporary directory: /tmp/pip-unpack-c84sdnu2 2023-10-02T13:54:44,573 Downloading BODY_SCAN-0.0.12.tar.gz (6.4 kB) 2023-10-02T13:54:44,622 Added body-scan==0.0.12 from https://files.pythonhosted.org/packages/e1/2b/d62073bb40f891cfc72057c5a70b3b0c6f28fb75160da25f3debba05d52c/BODY_SCAN-0.0.12.tar.gz to build tracker '/tmp/pip-build-tracker-_m45_ozv' 2023-10-02T13:54:44,623 Running setup.py (path:/tmp/pip-wheel-p_ysyklh/body-scan_15da90266c7945dd86e4d2fcd5b7f4c4/setup.py) egg_info for package body-scan 2023-10-02T13:54:44,624 Created temporary directory: /tmp/pip-pip-egg-info-tplu8d6n 2023-10-02T13:54:44,625 Preparing metadata (setup.py): started 2023-10-02T13:54:44,626 Running command python setup.py egg_info 2023-10-02T13:54:45,669 # BODY SCAN 2023-10-02T13:54:45,671 ## EXAMPLE OUTPUT: 2023-10-02T13:54:45,671 ```JSON 2023-10-02T13:54:45,672 { 2023-10-02T13:54:45,672 "PATHS": [ 2023-10-02T13:54:45,673 { 2023-10-02T13:54:45,673 "PATH": "PATH_1_HEALTH.py", 2023-10-02T13:54:45,674 "STATS": { 2023-10-02T13:54:45,674 "PASSES": 2, 2023-10-02T13:54:45,675 "ALARMS": 1 2023-10-02T13:54:45,675 }, 2023-10-02T13:54:45,675 "CHECKS": [ 2023-10-02T13:54:45,676 { 2023-10-02T13:54:45,676 "CHECK": "CHECK 1", 2023-10-02T13:54:45,677 "PASSED": true, 2023-10-02T13:54:45,677 "ELAPSED": [ 2023-10-02T13:54:45,678 5.320599666447379e-05, 2023-10-02T13:54:45,678 "SECONDS" 2023-10-02T13:54:45,679 ] 2023-10-02T13:54:45,679 }, 2023-10-02T13:54:45,680 { 2023-10-02T13:54:45,680 "CHECK": "CHECK 2", 2023-10-02T13:54:45,680 "PASSED": true, 2023-10-02T13:54:45,681 "ELAPSED": [ 2023-10-02T13:54:45,681 1.0949999705189839e-05, 2023-10-02T13:54:45,682 "SECONDS" 2023-10-02T13:54:45,682 ] 2023-10-02T13:54:45,683 }, 2023-10-02T13:54:45,683 { 2023-10-02T13:54:45,684 "CHECK": "CHECK 3", 2023-10-02T13:54:45,684 "PASSED": false, 2023-10-02T13:54:45,685 "EXCEPTION": "Exception('NOT 100%')", 2023-10-02T13:54:45,685 "EXCEPTION TRACE": [ 2023-10-02T13:54:45,685 "Traceback (most recent call last):", 2023-10-02T13:54:45,686 " File \"/REPTILIAN_CLIMATES/MODULES/BODY_SCAN/src/SCAN_PROC/KEG/SCAN.py\", line 69, in SCAN", 2023-10-02T13:54:45,686 " CHECKS [ CHECK ] ()", 2023-10-02T13:54:45,687 " File \"\", line 24, in CHECK_3", 2023-10-02T13:54:45,687 "Exception: NOT 100%" 2023-10-02T13:54:45,688 ] 2023-10-02T13:54:45,688 } 2023-10-02T13:54:45,689 ] 2023-10-02T13:54:45,689 }, 2023-10-02T13:54:45,690 { 2023-10-02T13:54:45,690 "PATH": "PATH_2_HEALTH.py", 2023-10-02T13:54:45,691 "EMPTY": true 2023-10-02T13:54:45,691 } 2023-10-02T13:54:45,692 ], 2023-10-02T13:54:45,693 "STATS": { 2023-10-02T13:54:45,693 "EMPTY": 1, 2023-10-02T13:54:45,693 "CHECKS": { 2023-10-02T13:54:45,694 "PASSES": 2, 2023-10-02T13:54:45,694 "ALARMS": 1 2023-10-02T13:54:45,695 } 2023-10-02T13:54:45,696 } 2023-10-02T13:54:45,696 } 2023-10-02T13:54:45,697 ``` 2023-10-02T13:54:45,698 ## HOW TO WRITE CHECKS: 2023-10-02T13:54:45,699 The "CHECKS" dictionary is retrieved with the python "exec" 2023-10-02T13:54:45,699 and then each "CHECK" in "CHECKS" is run. 2023-10-02T13:54:45,700 These checks correspond to the example output shown above. 2023-10-02T13:54:45,701 ``` 2023-10-02T13:54:45,701 PATH_1_HEALTH.py 2023-10-02T13:54:45,702 ``` 2023-10-02T13:54:45,702 ``` 2023-10-02T13:54:45,703 def CHECK_1 (): 2023-10-02T13:54:45,703 print ("CHECK 1") 2023-10-02T13:54:45,704 def CHECK_2 (): 2023-10-02T13:54:45,705 print ("CHECK 2") 2023-10-02T13:54:45,706 def CHECK_3 (): 2023-10-02T13:54:45,706 raise Exception ("NOT 100%") 2023-10-02T13:54:45,707 CHECKS = { 2023-10-02T13:54:45,708 "CHECK 1": CHECK_1, 2023-10-02T13:54:45,708 "CHECK 2": CHECK_2, 2023-10-02T13:54:45,709 "CHECK 3": CHECK_3 2023-10-02T13:54:45,709 } 2023-10-02T13:54:45,710 ``` 2023-10-02T13:54:45,710 ``` 2023-10-02T13:54:45,711 PATH_2_HEALTH.py 2023-10-02T13:54:45,711 ``` 2023-10-02T13:54:45,712 ``` 2023-10-02T13:54:45,712 # 2023-10-02T13:54:45,713 # There isn't a "CHECKS" dictionary present, 2023-10-02T13:54:45,714 # so the scanner reports: 2023-10-02T13:54:45,714 # 2023-10-02T13:54:45,715 # "EMPTY": true 2023-10-02T13:54:45,715 # 2023-10-02T13:54:45,716 ``` 2023-10-02T13:54:45,717 ## HOW TO START THE BODY SCANNER 2023-10-02T13:54:45,717 ### REQUIRED 2023-10-02T13:54:45,718 ``` 2023-10-02T13:54:45,718 "GLOB" is all the files that are sent to the scanner. 2023-10-02T13:54:45,719 ``` 2023-10-02T13:54:45,720 ### OPTIONAL 2023-10-02T13:54:45,720 ``` 2023-10-02T13:54:45,721 "MODULE_PATHS" is folders that are added to "sys.path" 2023-10-02T13:54:45,721 "RELATIVE_PATH" is the folders to remove from the paths in the output 2023-10-02T13:54:45,721 ``` 2023-10-02T13:54:45,722 ### NOTES 2023-10-02T13:54:45,723 ``` 2023-10-02T13:54:45,723 Currently all the checks aren't run in parallel, 2023-10-02T13:54:45,724 but sequential order of paths found in glob is not guaranteed. 2023-10-02T13:54:45,724 ``` 2023-10-02T13:54:45,725 ``` 2023-10-02T13:54:45,725 Each check suite found by the glob is encapsulated in 2023-10-02T13:54:45,725 a process with a flask API, that is opened on the first available port found. 2023-10-02T13:54:45,726 ``` 2023-10-02T13:54:45,727 ```python3 2023-10-02T13:54:45,727 import BODY_SCAN 2023-10-02T13:54:45,728 import pathlib 2023-10-02T13:54:45,728 THIS_FOLDER = pathlib.Path (__file__).parent.resolve () 2023-10-02T13:54:45,729 from os.path import dirname, join, normpath 2023-10-02T13:54:45,730 SEARCH = normpath (join (THIS_FOLDER, "MODULE")) 2023-10-02T13:54:45,731 # 2023-10-02T13:54:45,731 # These are added to the sys.path before scan is started. 2023-10-02T13:54:45,732 # 2023-10-02T13:54:45,732 MODULE_PATH = [ 2023-10-02T13:54:45,733 normpath (join (SEARCH, "MODULES")) 2023-10-02T13:54:45,733 ] 2023-10-02T13:54:45,734 SCAN = BODY_SCAN.START ( 2023-10-02T13:54:45,735 # REQUIRED 2023-10-02T13:54:45,735 GLOB = SEARCH + '/**/*HEALTH.py', 2023-10-02T13:54:45,736 # OPTIONAL 2023-10-02T13:54:45,737 MODULE_PATHS = MODULE_PATH, 2023-10-02T13:54:45,738 # OPTIONAL 2023-10-02T13:54:45,738 RELATIVE_PATH = SEARCH 2023-10-02T13:54:45,739 ) 2023-10-02T13:54:45,739 ``` 2023-10-02T13:54:45,741 running egg_info 2023-10-02T13:54:45,742 creating /tmp/pip-pip-egg-info-tplu8d6n/BODY_SCAN.egg-info 2023-10-02T13:54:45,742 writing /tmp/pip-pip-egg-info-tplu8d6n/BODY_SCAN.egg-info/PKG-INFO 2023-10-02T13:54:45,743 writing dependency_links to /tmp/pip-pip-egg-info-tplu8d6n/BODY_SCAN.egg-info/dependency_links.txt 2023-10-02T13:54:45,743 writing requirements to /tmp/pip-pip-egg-info-tplu8d6n/BODY_SCAN.egg-info/requires.txt 2023-10-02T13:54:45,744 writing top-level names to /tmp/pip-pip-egg-info-tplu8d6n/BODY_SCAN.egg-info/top_level.txt 2023-10-02T13:54:45,744 writing manifest file '/tmp/pip-pip-egg-info-tplu8d6n/BODY_SCAN.egg-info/SOURCES.txt' 2023-10-02T13:54:45,804 reading manifest file '/tmp/pip-pip-egg-info-tplu8d6n/BODY_SCAN.egg-info/SOURCES.txt' 2023-10-02T13:54:45,806 adding license file 'LICENSE' 2023-10-02T13:54:45,808 writing manifest file '/tmp/pip-pip-egg-info-tplu8d6n/BODY_SCAN.egg-info/SOURCES.txt' 2023-10-02T13:54:45,919 Preparing metadata (setup.py): finished with status 'done' 2023-10-02T13:54:45,923 Source in /tmp/pip-wheel-p_ysyklh/body-scan_15da90266c7945dd86e4d2fcd5b7f4c4 has version 0.0.12, which satisfies requirement body-scan==0.0.12 from https://files.pythonhosted.org/packages/e1/2b/d62073bb40f891cfc72057c5a70b3b0c6f28fb75160da25f3debba05d52c/BODY_SCAN-0.0.12.tar.gz 2023-10-02T13:54:45,924 Removed body-scan==0.0.12 from https://files.pythonhosted.org/packages/e1/2b/d62073bb40f891cfc72057c5a70b3b0c6f28fb75160da25f3debba05d52c/BODY_SCAN-0.0.12.tar.gz from build tracker '/tmp/pip-build-tracker-_m45_ozv' 2023-10-02T13:54:45,928 Created temporary directory: /tmp/pip-unpack-keozoorr 2023-10-02T13:54:45,929 Created temporary directory: /tmp/pip-unpack-i3t8pm1t 2023-10-02T13:54:45,935 Building wheels for collected packages: body-scan 2023-10-02T13:54:45,939 Created temporary directory: /tmp/pip-wheel-g4aknfrn 2023-10-02T13:54:45,940 Building wheel for body-scan (setup.py): started 2023-10-02T13:54:45,941 Destination directory: /tmp/pip-wheel-g4aknfrn 2023-10-02T13:54:45,941 Running command python setup.py bdist_wheel 2023-10-02T13:54:46,345 # BODY SCAN 2023-10-02T13:54:46,346 ## EXAMPLE OUTPUT: 2023-10-02T13:54:46,346 ```JSON 2023-10-02T13:54:46,347 { 2023-10-02T13:54:46,347 "PATHS": [ 2023-10-02T13:54:46,348 { 2023-10-02T13:54:46,348 "PATH": "PATH_1_HEALTH.py", 2023-10-02T13:54:46,349 "STATS": { 2023-10-02T13:54:46,349 "PASSES": 2, 2023-10-02T13:54:46,349 "ALARMS": 1 2023-10-02T13:54:46,350 }, 2023-10-02T13:54:46,350 "CHECKS": [ 2023-10-02T13:54:46,351 { 2023-10-02T13:54:46,351 "CHECK": "CHECK 1", 2023-10-02T13:54:46,352 "PASSED": true, 2023-10-02T13:54:46,352 "ELAPSED": [ 2023-10-02T13:54:46,353 5.320599666447379e-05, 2023-10-02T13:54:46,353 "SECONDS" 2023-10-02T13:54:46,354 ] 2023-10-02T13:54:46,354 }, 2023-10-02T13:54:46,355 { 2023-10-02T13:54:46,355 "CHECK": "CHECK 2", 2023-10-02T13:54:46,356 "PASSED": true, 2023-10-02T13:54:46,356 "ELAPSED": [ 2023-10-02T13:54:46,357 1.0949999705189839e-05, 2023-10-02T13:54:46,357 "SECONDS" 2023-10-02T13:54:46,358 ] 2023-10-02T13:54:46,358 }, 2023-10-02T13:54:46,359 { 2023-10-02T13:54:46,359 "CHECK": "CHECK 3", 2023-10-02T13:54:46,360 "PASSED": false, 2023-10-02T13:54:46,360 "EXCEPTION": "Exception('NOT 100%')", 2023-10-02T13:54:46,361 "EXCEPTION TRACE": [ 2023-10-02T13:54:46,361 "Traceback (most recent call last):", 2023-10-02T13:54:46,361 " File \"/REPTILIAN_CLIMATES/MODULES/BODY_SCAN/src/SCAN_PROC/KEG/SCAN.py\", line 69, in SCAN", 2023-10-02T13:54:46,362 " CHECKS [ CHECK ] ()", 2023-10-02T13:54:46,362 " File \"\", line 24, in CHECK_3", 2023-10-02T13:54:46,363 "Exception: NOT 100%" 2023-10-02T13:54:46,363 ] 2023-10-02T13:54:46,364 } 2023-10-02T13:54:46,365 ] 2023-10-02T13:54:46,365 }, 2023-10-02T13:54:46,366 { 2023-10-02T13:54:46,366 "PATH": "PATH_2_HEALTH.py", 2023-10-02T13:54:46,367 "EMPTY": true 2023-10-02T13:54:46,367 } 2023-10-02T13:54:46,368 ], 2023-10-02T13:54:46,368 "STATS": { 2023-10-02T13:54:46,369 "EMPTY": 1, 2023-10-02T13:54:46,369 "CHECKS": { 2023-10-02T13:54:46,370 "PASSES": 2, 2023-10-02T13:54:46,370 "ALARMS": 1 2023-10-02T13:54:46,371 } 2023-10-02T13:54:46,371 } 2023-10-02T13:54:46,372 } 2023-10-02T13:54:46,373 ``` 2023-10-02T13:54:46,374 ## HOW TO WRITE CHECKS: 2023-10-02T13:54:46,375 The "CHECKS" dictionary is retrieved with the python "exec" 2023-10-02T13:54:46,375 and then each "CHECK" in "CHECKS" is run. 2023-10-02T13:54:46,376 These checks correspond to the example output shown above. 2023-10-02T13:54:46,377 ``` 2023-10-02T13:54:46,377 PATH_1_HEALTH.py 2023-10-02T13:54:46,378 ``` 2023-10-02T13:54:46,379 ``` 2023-10-02T13:54:46,379 def CHECK_1 (): 2023-10-02T13:54:46,380 print ("CHECK 1") 2023-10-02T13:54:46,381 def CHECK_2 (): 2023-10-02T13:54:46,381 print ("CHECK 2") 2023-10-02T13:54:46,383 def CHECK_3 (): 2023-10-02T13:54:46,383 raise Exception ("NOT 100%") 2023-10-02T13:54:46,385 CHECKS = { 2023-10-02T13:54:46,385 "CHECK 1": CHECK_1, 2023-10-02T13:54:46,386 "CHECK 2": CHECK_2, 2023-10-02T13:54:46,386 "CHECK 3": CHECK_3 2023-10-02T13:54:46,387 } 2023-10-02T13:54:46,388 ``` 2023-10-02T13:54:46,389 ``` 2023-10-02T13:54:46,389 PATH_2_HEALTH.py 2023-10-02T13:54:46,389 ``` 2023-10-02T13:54:46,390 ``` 2023-10-02T13:54:46,390 # 2023-10-02T13:54:46,391 # There isn't a "CHECKS" dictionary present, 2023-10-02T13:54:46,391 # so the scanner reports: 2023-10-02T13:54:46,392 # 2023-10-02T13:54:46,392 # "EMPTY": true 2023-10-02T13:54:46,392 # 2023-10-02T13:54:46,393 ``` 2023-10-02T13:54:46,394 ## HOW TO START THE BODY SCANNER 2023-10-02T13:54:46,394 ### REQUIRED 2023-10-02T13:54:46,395 ``` 2023-10-02T13:54:46,395 "GLOB" is all the files that are sent to the scanner. 2023-10-02T13:54:46,396 ``` 2023-10-02T13:54:46,397 ### OPTIONAL 2023-10-02T13:54:46,397 ``` 2023-10-02T13:54:46,398 "MODULE_PATHS" is folders that are added to "sys.path" 2023-10-02T13:54:46,398 "RELATIVE_PATH" is the folders to remove from the paths in the output 2023-10-02T13:54:46,398 ``` 2023-10-02T13:54:46,399 ### NOTES 2023-10-02T13:54:46,400 ``` 2023-10-02T13:54:46,400 Currently all the checks aren't run in parallel, 2023-10-02T13:54:46,401 but sequential order of paths found in glob is not guaranteed. 2023-10-02T13:54:46,401 ``` 2023-10-02T13:54:46,402 ``` 2023-10-02T13:54:46,402 Each check suite found by the glob is encapsulated in 2023-10-02T13:54:46,403 a process with a flask API, that is opened on the first available port found. 2023-10-02T13:54:46,403 ``` 2023-10-02T13:54:46,404 ```python3 2023-10-02T13:54:46,404 import BODY_SCAN 2023-10-02T13:54:46,405 import pathlib 2023-10-02T13:54:46,406 THIS_FOLDER = pathlib.Path (__file__).parent.resolve () 2023-10-02T13:54:46,407 from os.path import dirname, join, normpath 2023-10-02T13:54:46,408 SEARCH = normpath (join (THIS_FOLDER, "MODULE")) 2023-10-02T13:54:46,409 # 2023-10-02T13:54:46,409 # These are added to the sys.path before scan is started. 2023-10-02T13:54:46,410 # 2023-10-02T13:54:46,410 MODULE_PATH = [ 2023-10-02T13:54:46,411 normpath (join (SEARCH, "MODULES")) 2023-10-02T13:54:46,411 ] 2023-10-02T13:54:46,412 SCAN = BODY_SCAN.START ( 2023-10-02T13:54:46,413 # REQUIRED 2023-10-02T13:54:46,413 GLOB = SEARCH + '/**/*HEALTH.py', 2023-10-02T13:54:46,415 # OPTIONAL 2023-10-02T13:54:46,415 MODULE_PATHS = MODULE_PATH, 2023-10-02T13:54:46,416 # OPTIONAL 2023-10-02T13:54:46,417 RELATIVE_PATH = SEARCH 2023-10-02T13:54:46,417 ) 2023-10-02T13:54:46,418 ``` 2023-10-02T13:54:46,970 running bdist_wheel 2023-10-02T13:54:47,100 running build 2023-10-02T13:54:47,101 running build_py 2023-10-02T13:54:47,128 creating build 2023-10-02T13:54:47,129 creating build/lib 2023-10-02T13:54:47,130 creating build/lib/BODY_SCAN 2023-10-02T13:54:47,131 copying src/__init__.py -> build/lib/BODY_SCAN 2023-10-02T13:54:47,133 copying src/START_MULTIPLE_PROCESSES.py -> build/lib/BODY_SCAN 2023-10-02T13:54:47,135 creating build/lib/BODY_SCAN/FUNCTIONS 2023-10-02T13:54:47,136 copying src/FUNCTIONS/START_THE_CORE_KEG.py -> build/lib/BODY_SCAN/FUNCTIONS 2023-10-02T13:54:47,137 copying src/FUNCTIONS/START_A_SCAN.py -> build/lib/BODY_SCAN/FUNCTIONS 2023-10-02T13:54:47,139 copying src/FUNCTIONS/CHECK_STATUS_LOCATION.py -> build/lib/BODY_SCAN/FUNCTIONS 2023-10-02T13:54:47,141 creating build/lib/BODY_SCAN/AGGREGATE 2023-10-02T13:54:47,142 copying src/AGGREGATE/__init__.py -> build/lib/BODY_SCAN/AGGREGATE 2023-10-02T13:54:47,144 creating build/lib/BODY_SCAN/AGGREGATOR 2023-10-02T13:54:47,145 copying src/AGGREGATOR/START.py -> build/lib/BODY_SCAN/AGGREGATOR 2023-10-02T13:54:47,148 creating build/lib/BODY_SCAN/SCAN_PROC 2023-10-02T13:54:47,149 copying src/SCAN_PROC/START.py -> build/lib/BODY_SCAN/SCAN_PROC 2023-10-02T13:54:47,151 creating build/lib/BODY_SCAN/AGGREGATOR/KEG 2023-10-02T13:54:47,152 copying src/AGGREGATOR/KEG/__init__.py -> build/lib/BODY_SCAN/AGGREGATOR/KEG 2023-10-02T13:54:47,154 creating build/lib/BODY_SCAN/SCAN_PROC/KEG 2023-10-02T13:54:47,155 copying src/SCAN_PROC/KEG/__init__.py -> build/lib/BODY_SCAN/SCAN_PROC/KEG 2023-10-02T13:54:47,157 copying src/SCAN_PROC/KEG/SCAN.py -> build/lib/BODY_SCAN/SCAN_PROC/KEG 2023-10-02T13:54:47,189 /usr/local/lib/python3.11/dist-packages/setuptools/_distutils/cmd.py:66: SetuptoolsDeprecationWarning: setup.py install is deprecated. 2023-10-02T13:54:47,190 !! 2023-10-02T13:54:47,191 ******************************************************************************** 2023-10-02T13:54:47,191 Please avoid running ``setup.py`` directly. 2023-10-02T13:54:47,192 Instead, use pypa/build, pypa/installer or other 2023-10-02T13:54:47,192 standards-based tools. 2023-10-02T13:54:47,193 See https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html for details. 2023-10-02T13:54:47,193 ******************************************************************************** 2023-10-02T13:54:47,194 !! 2023-10-02T13:54:47,195 self.initialize_options() 2023-10-02T13:54:47,214 installing to build/bdist.linux-armv7l/wheel 2023-10-02T13:54:47,215 running install 2023-10-02T13:54:47,238 running install_lib 2023-10-02T13:54:47,263 creating build/bdist.linux-armv7l 2023-10-02T13:54:47,264 creating build/bdist.linux-armv7l/wheel 2023-10-02T13:54:47,265 creating build/bdist.linux-armv7l/wheel/BODY_SCAN 2023-10-02T13:54:47,266 copying build/lib/BODY_SCAN/__init__.py -> build/bdist.linux-armv7l/wheel/BODY_SCAN 2023-10-02T13:54:47,268 creating build/bdist.linux-armv7l/wheel/BODY_SCAN/FUNCTIONS 2023-10-02T13:54:47,269 copying build/lib/BODY_SCAN/FUNCTIONS/START_THE_CORE_KEG.py -> build/bdist.linux-armv7l/wheel/BODY_SCAN/FUNCTIONS 2023-10-02T13:54:47,270 copying build/lib/BODY_SCAN/FUNCTIONS/START_A_SCAN.py -> build/bdist.linux-armv7l/wheel/BODY_SCAN/FUNCTIONS 2023-10-02T13:54:47,272 copying build/lib/BODY_SCAN/FUNCTIONS/CHECK_STATUS_LOCATION.py -> build/bdist.linux-armv7l/wheel/BODY_SCAN/FUNCTIONS 2023-10-02T13:54:47,274 creating build/bdist.linux-armv7l/wheel/BODY_SCAN/AGGREGATE 2023-10-02T13:54:47,275 copying build/lib/BODY_SCAN/AGGREGATE/__init__.py -> build/bdist.linux-armv7l/wheel/BODY_SCAN/AGGREGATE 2023-10-02T13:54:47,277 creating build/bdist.linux-armv7l/wheel/BODY_SCAN/AGGREGATOR 2023-10-02T13:54:47,278 copying build/lib/BODY_SCAN/AGGREGATOR/START.py -> build/bdist.linux-armv7l/wheel/BODY_SCAN/AGGREGATOR 2023-10-02T13:54:47,280 creating build/bdist.linux-armv7l/wheel/BODY_SCAN/AGGREGATOR/KEG 2023-10-02T13:54:47,281 copying build/lib/BODY_SCAN/AGGREGATOR/KEG/__init__.py -> build/bdist.linux-armv7l/wheel/BODY_SCAN/AGGREGATOR/KEG 2023-10-02T13:54:47,284 creating build/bdist.linux-armv7l/wheel/BODY_SCAN/SCAN_PROC 2023-10-02T13:54:47,285 copying build/lib/BODY_SCAN/SCAN_PROC/START.py -> build/bdist.linux-armv7l/wheel/BODY_SCAN/SCAN_PROC 2023-10-02T13:54:47,287 creating build/bdist.linux-armv7l/wheel/BODY_SCAN/SCAN_PROC/KEG 2023-10-02T13:54:47,288 copying build/lib/BODY_SCAN/SCAN_PROC/KEG/__init__.py -> build/bdist.linux-armv7l/wheel/BODY_SCAN/SCAN_PROC/KEG 2023-10-02T13:54:47,290 copying build/lib/BODY_SCAN/SCAN_PROC/KEG/SCAN.py -> build/bdist.linux-armv7l/wheel/BODY_SCAN/SCAN_PROC/KEG 2023-10-02T13:54:47,291 copying build/lib/BODY_SCAN/START_MULTIPLE_PROCESSES.py -> build/bdist.linux-armv7l/wheel/BODY_SCAN 2023-10-02T13:54:47,293 running install_egg_info 2023-10-02T13:54:47,323 running egg_info 2023-10-02T13:54:47,349 writing BODY_SCAN.egg-info/PKG-INFO 2023-10-02T13:54:47,351 writing dependency_links to BODY_SCAN.egg-info/dependency_links.txt 2023-10-02T13:54:47,353 writing requirements to BODY_SCAN.egg-info/requires.txt 2023-10-02T13:54:47,354 writing top-level names to BODY_SCAN.egg-info/top_level.txt 2023-10-02T13:54:47,384 reading manifest file 'BODY_SCAN.egg-info/SOURCES.txt' 2023-10-02T13:54:47,386 adding license file 'LICENSE' 2023-10-02T13:54:47,388 writing manifest file 'BODY_SCAN.egg-info/SOURCES.txt' 2023-10-02T13:54:47,389 Copying BODY_SCAN.egg-info to build/bdist.linux-armv7l/wheel/BODY_SCAN-0.0.12-py3.11.egg-info 2023-10-02T13:54:47,399 running install_scripts 2023-10-02T13:54:47,412 creating build/bdist.linux-armv7l/wheel/BODY_SCAN-0.0.12.dist-info/WHEEL 2023-10-02T13:54:47,415 creating '/tmp/pip-wheel-g4aknfrn/BODY_SCAN-0.0.12-py3-none-any.whl' and adding 'build/bdist.linux-armv7l/wheel' to it 2023-10-02T13:54:47,417 adding 'BODY_SCAN/START_MULTIPLE_PROCESSES.py' 2023-10-02T13:54:47,418 adding 'BODY_SCAN/__init__.py' 2023-10-02T13:54:47,420 adding 'BODY_SCAN/AGGREGATE/__init__.py' 2023-10-02T13:54:47,422 adding 'BODY_SCAN/AGGREGATOR/START.py' 2023-10-02T13:54:47,423 adding 'BODY_SCAN/AGGREGATOR/KEG/__init__.py' 2023-10-02T13:54:47,425 adding 'BODY_SCAN/FUNCTIONS/CHECK_STATUS_LOCATION.py' 2023-10-02T13:54:47,426 adding 'BODY_SCAN/FUNCTIONS/START_A_SCAN.py' 2023-10-02T13:54:47,427 adding 'BODY_SCAN/FUNCTIONS/START_THE_CORE_KEG.py' 2023-10-02T13:54:47,429 adding 'BODY_SCAN/SCAN_PROC/START.py' 2023-10-02T13:54:47,431 adding 'BODY_SCAN/SCAN_PROC/KEG/SCAN.py' 2023-10-02T13:54:47,432 adding 'BODY_SCAN/SCAN_PROC/KEG/__init__.py' 2023-10-02T13:54:47,434 adding 'BODY_SCAN-0.0.12.dist-info/LICENSE' 2023-10-02T13:54:47,435 adding 'BODY_SCAN-0.0.12.dist-info/METADATA' 2023-10-02T13:54:47,436 adding 'BODY_SCAN-0.0.12.dist-info/WHEEL' 2023-10-02T13:54:47,437 adding 'BODY_SCAN-0.0.12.dist-info/top_level.txt' 2023-10-02T13:54:47,438 adding 'BODY_SCAN-0.0.12.dist-info/RECORD' 2023-10-02T13:54:47,439 removing build/bdist.linux-armv7l/wheel 2023-10-02T13:54:47,560 Building wheel for body-scan (setup.py): finished with status 'done' 2023-10-02T13:54:47,562 Created wheel for body-scan: filename=BODY_SCAN-0.0.12-py3-none-any.whl size=9030 sha256=c47b6c6185220002a9a4516a3318b3adb398aeaef695d7438448f074638d2d5c 2023-10-02T13:54:47,564 Stored in directory: /tmp/pip-ephem-wheel-cache-1uolt7pk/wheels/74/96/26/e30ef66bdd7fcafff95ef660e1a5c0f0b45c6b6c35f8dbd940 2023-10-02T13:54:47,573 Successfully built body-scan 2023-10-02T13:54:47,577 Removed build tracker: '/tmp/pip-build-tracker-_m45_ozv'