2023-10-02T15:07:23,158 Created temporary directory: /tmp/pip-build-tracker-t77xty2n 2023-10-02T15:07:23,159 Initialized build tracking at /tmp/pip-build-tracker-t77xty2n 2023-10-02T15:07:23,160 Created build tracker: /tmp/pip-build-tracker-t77xty2n 2023-10-02T15:07:23,160 Entered build tracker: /tmp/pip-build-tracker-t77xty2n 2023-10-02T15:07:23,161 Created temporary directory: /tmp/pip-wheel-fiwmrx68 2023-10-02T15:07:23,164 Created temporary directory: /tmp/pip-ephem-wheel-cache-qy1zbiek 2023-10-02T15:07:23,186 Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple 2023-10-02T15:07:23,190 2 location(s) to search for versions of body-scan: 2023-10-02T15:07:23,190 * https://pypi.org/simple/body-scan/ 2023-10-02T15:07:23,190 * https://www.piwheels.org/simple/body-scan/ 2023-10-02T15:07:23,191 Fetching project page and analyzing links: https://pypi.org/simple/body-scan/ 2023-10-02T15:07:23,191 Getting page https://pypi.org/simple/body-scan/ 2023-10-02T15:07:23,193 Found index url https://pypi.org/simple/ 2023-10-02T15:07:23,334 Fetched page https://pypi.org/simple/body-scan/ as application/vnd.pypi.simple.v1+json 2023-10-02T15:07:23,338 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-02T15:07:23,339 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-02T15:07:23,339 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-02T15:07:23,340 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-02T15:07:23,341 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-02T15:07:23,342 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-02T15:07:23,343 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-02T15:07:23,343 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-02T15:07:23,344 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-02T15:07:23,345 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-02T15:07:23,346 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-02T15:07:23,347 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-02T15:07:23,347 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-02T15:07:23,348 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-02T15:07:23,349 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-02T15:07:23,350 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-02T15:07:23,350 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-02T15:07:23,351 Fetching project page and analyzing links: https://www.piwheels.org/simple/body-scan/ 2023-10-02T15:07:23,351 Getting page https://www.piwheels.org/simple/body-scan/ 2023-10-02T15:07:23,352 Found index url https://www.piwheels.org/simple/ 2023-10-02T15:07:23,529 Fetched page https://www.piwheels.org/simple/body-scan/ as text/html 2023-10-02T15:07:23,533 Skipping link: No binaries permitted for body-scan: https://www.piwheels.org/simple/body-scan/BODY_SCAN-0.0.14-py3-none-any.whl#sha256=7defdc43c3d2bbbac77bb8074abc4010b7ab57e620b0a7e5a8c701fdcc7263d2 (from https://www.piwheels.org/simple/body-scan/) 2023-10-02T15:07:23,534 Skipping link: No binaries permitted for body-scan: https://www.piwheels.org/simple/body-scan/BODY_SCAN-0.0.13-py3-none-any.whl#sha256=cbd161b8a6d142c2ace2be1042f211467c31e8077aa3293e65090e72e75f3973 (from https://www.piwheels.org/simple/body-scan/) 2023-10-02T15:07:23,534 Skipping link: No binaries permitted for body-scan: https://www.piwheels.org/simple/body-scan/BODY_SCAN-0.0.12-py3-none-any.whl#sha256=c47b6c6185220002a9a4516a3318b3adb398aeaef695d7438448f074638d2d5c (from https://www.piwheels.org/simple/body-scan/) 2023-10-02T15:07:23,535 Skipping link: No binaries permitted for body-scan: https://www.piwheels.org/simple/body-scan/BODY_SCAN-0.0.11-py3-none-any.whl#sha256=c44320cba95859a174b73fcfc745fc84303ee6538c7eb22127f2eba8b90c3172 (from https://www.piwheels.org/simple/body-scan/) 2023-10-02T15:07:23,536 Skipping link: No binaries permitted for body-scan: https://www.piwheels.org/simple/body-scan/BODY_SCAN-0.0.10-py3-none-any.whl#sha256=62a48f3d91ec5fb86f3f4ecc66b13e1c32db3ff1d13a0bb9937959d63fe49508 (from https://www.piwheels.org/simple/body-scan/) 2023-10-02T15:07:23,536 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-02T15:07:23,537 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-02T15:07:23,538 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-02T15:07:23,538 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-02T15:07:23,539 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-02T15:07:23,539 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-02T15:07:23,540 Skipping link: not a file: https://www.piwheels.org/simple/body-scan/ 2023-10-02T15:07:23,541 Skipping link: not a file: https://pypi.org/simple/body-scan/ 2023-10-02T15:07:23,561 Given no hashes to check 1 links for project 'body-scan': discarding no candidates 2023-10-02T15:07:23,579 Collecting body-scan==0.0.15 2023-10-02T15:07:23,581 Created temporary directory: /tmp/pip-unpack-r2cfp1cq 2023-10-02T15:07:23,796 Downloading BODY_SCAN-0.0.15.tar.gz (7.0 kB) 2023-10-02T15:07:23,843 Added body-scan==0.0.15 from https://files.pythonhosted.org/packages/5b/ae/3fa5ba9379e44d9a5cab2474ce36172334f49c1b8a6e8024ec97e3978e2d/BODY_SCAN-0.0.15.tar.gz to build tracker '/tmp/pip-build-tracker-t77xty2n' 2023-10-02T15:07:23,846 Running setup.py (path:/tmp/pip-wheel-fiwmrx68/body-scan_90ca50a620924ba2bf486e23b4be4449/setup.py) egg_info for package body-scan 2023-10-02T15:07:23,847 Created temporary directory: /tmp/pip-pip-egg-info-2w1gm65d 2023-10-02T15:07:23,847 Preparing metadata (setup.py): started 2023-10-02T15:07:23,848 Running command python setup.py egg_info 2023-10-02T15:07:24,908 # BODY SCAN 2023-10-02T15:07:24,909 ## EXAMPLE OUTPUT: 2023-10-02T15:07:24,909 ```JSON 2023-10-02T15:07:24,910 { 2023-10-02T15:07:24,911 "PATHS": [ 2023-10-02T15:07:24,912 { 2023-10-02T15:07:24,913 "PATH": "PATH_1_HEALTH.py", 2023-10-02T15:07:24,914 "STATS": { 2023-10-02T15:07:24,915 "PASSES": 2, 2023-10-02T15:07:24,916 "ALARMS": 1 2023-10-02T15:07:24,917 }, 2023-10-02T15:07:24,918 "CHECKS": [ 2023-10-02T15:07:24,918 { 2023-10-02T15:07:24,919 "CHECK": "CHECK 1", 2023-10-02T15:07:24,919 "PASSED": true, 2023-10-02T15:07:24,920 "ELAPSED": [ 2023-10-02T15:07:24,921 5.320599666447379e-05, 2023-10-02T15:07:24,924 "SECONDS" 2023-10-02T15:07:24,925 ] 2023-10-02T15:07:24,926 }, 2023-10-02T15:07:24,926 { 2023-10-02T15:07:24,927 "CHECK": "CHECK 2", 2023-10-02T15:07:24,928 "PASSED": true, 2023-10-02T15:07:24,928 "ELAPSED": [ 2023-10-02T15:07:24,929 1.0949999705189839e-05, 2023-10-02T15:07:24,929 "SECONDS" 2023-10-02T15:07:24,930 ] 2023-10-02T15:07:24,931 }, 2023-10-02T15:07:24,932 { 2023-10-02T15:07:24,932 "CHECK": "CHECK 3", 2023-10-02T15:07:24,933 "PASSED": false, 2023-10-02T15:07:24,933 "EXCEPTION": "Exception('NOT 100%')", 2023-10-02T15:07:24,934 "EXCEPTION TRACE": [ 2023-10-02T15:07:24,935 "Traceback (most recent call last):", 2023-10-02T15:07:24,935 " File \"/REPTILIAN_CLIMATES/MODULES/BODY_SCAN/src/SCAN_PROC/KEG/SCAN.py\", line 69, in SCAN", 2023-10-02T15:07:24,936 " CHECKS [ CHECK ] ()", 2023-10-02T15:07:24,936 " File \"\", line 24, in CHECK_3", 2023-10-02T15:07:24,937 "Exception: NOT 100%" 2023-10-02T15:07:24,938 ] 2023-10-02T15:07:24,938 } 2023-10-02T15:07:24,939 ] 2023-10-02T15:07:24,940 }, 2023-10-02T15:07:24,940 { 2023-10-02T15:07:24,941 "PATH": "PATH_2_HEALTH.py", 2023-10-02T15:07:24,941 "EMPTY": true 2023-10-02T15:07:24,942 } 2023-10-02T15:07:24,943 ], 2023-10-02T15:07:24,943 "STATS": { 2023-10-02T15:07:24,944 "EMPTY": 1, 2023-10-02T15:07:24,945 "CHECKS": { 2023-10-02T15:07:24,945 "PASSES": 2, 2023-10-02T15:07:24,946 "ALARMS": 1 2023-10-02T15:07:24,946 } 2023-10-02T15:07:24,947 } 2023-10-02T15:07:24,948 } 2023-10-02T15:07:24,948 ``` 2023-10-02T15:07:24,949 ## HOW TO WRITE CHECKS: 2023-10-02T15:07:24,950 The "CHECKS" dictionary is retrieved with the python "exec" 2023-10-02T15:07:24,951 and then each "CHECK" in "CHECKS" is run. 2023-10-02T15:07:24,952 These checks correspond to the example output shown above. 2023-10-02T15:07:24,952 ``` 2023-10-02T15:07:24,953 PATH_1_HEALTH.py 2023-10-02T15:07:24,953 ``` 2023-10-02T15:07:24,954 ``` 2023-10-02T15:07:24,955 def CHECK_1 (): 2023-10-02T15:07:24,955 print ("CHECK 1") 2023-10-02T15:07:24,956 def CHECK_2 (): 2023-10-02T15:07:24,957 print ("CHECK 2") 2023-10-02T15:07:24,958 def CHECK_3 (): 2023-10-02T15:07:24,959 raise Exception ("NOT 100%") 2023-10-02T15:07:24,960 CHECKS = { 2023-10-02T15:07:24,960 "CHECK 1": CHECK_1, 2023-10-02T15:07:24,961 "CHECK 2": CHECK_2, 2023-10-02T15:07:24,961 "CHECK 3": CHECK_3 2023-10-02T15:07:24,962 } 2023-10-02T15:07:24,962 ``` 2023-10-02T15:07:24,963 ``` 2023-10-02T15:07:24,963 PATH_2_HEALTH.py 2023-10-02T15:07:24,964 ``` 2023-10-02T15:07:24,964 ``` 2023-10-02T15:07:24,965 # 2023-10-02T15:07:24,966 # There isn't a "CHECKS" dictionary present, 2023-10-02T15:07:24,966 # so the scanner reports: 2023-10-02T15:07:24,967 # 2023-10-02T15:07:24,967 # "EMPTY": true 2023-10-02T15:07:24,968 # 2023-10-02T15:07:24,968 ``` 2023-10-02T15:07:24,969 ## HOW TO START THE BODY SCANNER 2023-10-02T15:07:24,970 ### REQUIRED 2023-10-02T15:07:24,971 ``` 2023-10-02T15:07:24,972 "GLOB" is all the files that are sent to the scanner. 2023-10-02T15:07:24,972 ``` 2023-10-02T15:07:24,973 ### OPTIONAL 2023-10-02T15:07:24,974 ``` 2023-10-02T15:07:24,974 "MODULE_PATHS" is folders that are added to "sys.path" 2023-10-02T15:07:24,975 "RELATIVE_PATH" is the folders to remove from the paths in the output 2023-10-02T15:07:24,976 ``` 2023-10-02T15:07:24,977 ### NOTES 2023-10-02T15:07:24,978 ``` 2023-10-02T15:07:24,978 Currently all the checks aren't run in parallel, 2023-10-02T15:07:24,979 but sequential order of paths found in glob is not guaranteed. 2023-10-02T15:07:24,979 ``` 2023-10-02T15:07:24,980 ``` 2023-10-02T15:07:24,981 Each check suite found by the glob is encapsulated in 2023-10-02T15:07:24,981 a process with a flask API, that is opened on the first available port found. 2023-10-02T15:07:24,982 ``` 2023-10-02T15:07:24,983 ```python3 2023-10-02T15:07:24,984 import BODY_SCAN 2023-10-02T15:07:24,985 import pathlib 2023-10-02T15:07:24,986 THIS_FOLDER = pathlib.Path (__file__).parent.resolve () 2023-10-02T15:07:24,987 from os.path import dirname, join, normpath 2023-10-02T15:07:24,988 SEARCH = normpath (join (THIS_FOLDER, "MODULE")) 2023-10-02T15:07:24,989 # 2023-10-02T15:07:24,990 # These are added to the sys.path before scan is started. 2023-10-02T15:07:24,990 # 2023-10-02T15:07:24,991 MODULE_PATH = [ 2023-10-02T15:07:24,991 normpath (join (SEARCH, "MODULES")) 2023-10-02T15:07:24,992 ] 2023-10-02T15:07:24,993 SCAN = BODY_SCAN.START ( 2023-10-02T15:07:24,994 # REQUIRED 2023-10-02T15:07:24,994 GLOB = SEARCH + '/**/*HEALTH.py', 2023-10-02T15:07:24,995 # OPTIONAL 2023-10-02T15:07:24,996 MODULE_PATHS = MODULE_PATH, 2023-10-02T15:07:24,997 # OPTIONAL 2023-10-02T15:07:24,998 RELATIVE_PATH = SEARCH 2023-10-02T15:07:24,998 ) 2023-10-02T15:07:24,999 ``` 2023-10-02T15:07:25,001 running egg_info 2023-10-02T15:07:25,002 creating /tmp/pip-pip-egg-info-2w1gm65d/BODY_SCAN.egg-info 2023-10-02T15:07:25,003 writing /tmp/pip-pip-egg-info-2w1gm65d/BODY_SCAN.egg-info/PKG-INFO 2023-10-02T15:07:25,003 writing dependency_links to /tmp/pip-pip-egg-info-2w1gm65d/BODY_SCAN.egg-info/dependency_links.txt 2023-10-02T15:07:25,004 writing requirements to /tmp/pip-pip-egg-info-2w1gm65d/BODY_SCAN.egg-info/requires.txt 2023-10-02T15:07:25,005 writing top-level names to /tmp/pip-pip-egg-info-2w1gm65d/BODY_SCAN.egg-info/top_level.txt 2023-10-02T15:07:25,006 writing manifest file '/tmp/pip-pip-egg-info-2w1gm65d/BODY_SCAN.egg-info/SOURCES.txt' 2023-10-02T15:07:25,041 reading manifest file '/tmp/pip-pip-egg-info-2w1gm65d/BODY_SCAN.egg-info/SOURCES.txt' 2023-10-02T15:07:25,043 adding license file 'LICENSE' 2023-10-02T15:07:25,045 writing manifest file '/tmp/pip-pip-egg-info-2w1gm65d/BODY_SCAN.egg-info/SOURCES.txt' 2023-10-02T15:07:25,152 Preparing metadata (setup.py): finished with status 'done' 2023-10-02T15:07:25,156 Source in /tmp/pip-wheel-fiwmrx68/body-scan_90ca50a620924ba2bf486e23b4be4449 has version 0.0.15, which satisfies requirement body-scan==0.0.15 from https://files.pythonhosted.org/packages/5b/ae/3fa5ba9379e44d9a5cab2474ce36172334f49c1b8a6e8024ec97e3978e2d/BODY_SCAN-0.0.15.tar.gz 2023-10-02T15:07:25,157 Removed body-scan==0.0.15 from https://files.pythonhosted.org/packages/5b/ae/3fa5ba9379e44d9a5cab2474ce36172334f49c1b8a6e8024ec97e3978e2d/BODY_SCAN-0.0.15.tar.gz from build tracker '/tmp/pip-build-tracker-t77xty2n' 2023-10-02T15:07:25,162 Created temporary directory: /tmp/pip-unpack-qiith4tm 2023-10-02T15:07:25,163 Created temporary directory: /tmp/pip-unpack-vn990pq8 2023-10-02T15:07:25,168 Building wheels for collected packages: body-scan 2023-10-02T15:07:25,173 Created temporary directory: /tmp/pip-wheel-lwoxpf1w 2023-10-02T15:07:25,174 Building wheel for body-scan (setup.py): started 2023-10-02T15:07:25,175 Destination directory: /tmp/pip-wheel-lwoxpf1w 2023-10-02T15:07:25,175 Running command python setup.py bdist_wheel 2023-10-02T15:07:25,579 # BODY SCAN 2023-10-02T15:07:25,580 ## EXAMPLE OUTPUT: 2023-10-02T15:07:25,580 ```JSON 2023-10-02T15:07:25,581 { 2023-10-02T15:07:25,582 "PATHS": [ 2023-10-02T15:07:25,582 { 2023-10-02T15:07:25,583 "PATH": "PATH_1_HEALTH.py", 2023-10-02T15:07:25,583 "STATS": { 2023-10-02T15:07:25,584 "PASSES": 2, 2023-10-02T15:07:25,584 "ALARMS": 1 2023-10-02T15:07:25,585 }, 2023-10-02T15:07:25,585 "CHECKS": [ 2023-10-02T15:07:25,586 { 2023-10-02T15:07:25,587 "CHECK": "CHECK 1", 2023-10-02T15:07:25,587 "PASSED": true, 2023-10-02T15:07:25,588 "ELAPSED": [ 2023-10-02T15:07:25,589 5.320599666447379e-05, 2023-10-02T15:07:25,589 "SECONDS" 2023-10-02T15:07:25,590 ] 2023-10-02T15:07:25,590 }, 2023-10-02T15:07:25,591 { 2023-10-02T15:07:25,591 "CHECK": "CHECK 2", 2023-10-02T15:07:25,592 "PASSED": true, 2023-10-02T15:07:25,593 "ELAPSED": [ 2023-10-02T15:07:25,593 1.0949999705189839e-05, 2023-10-02T15:07:25,594 "SECONDS" 2023-10-02T15:07:25,594 ] 2023-10-02T15:07:25,595 }, 2023-10-02T15:07:25,595 { 2023-10-02T15:07:25,596 "CHECK": "CHECK 3", 2023-10-02T15:07:25,596 "PASSED": false, 2023-10-02T15:07:25,597 "EXCEPTION": "Exception('NOT 100%')", 2023-10-02T15:07:25,597 "EXCEPTION TRACE": [ 2023-10-02T15:07:25,598 "Traceback (most recent call last):", 2023-10-02T15:07:25,599 " File \"/REPTILIAN_CLIMATES/MODULES/BODY_SCAN/src/SCAN_PROC/KEG/SCAN.py\", line 69, in SCAN", 2023-10-02T15:07:25,599 " CHECKS [ CHECK ] ()", 2023-10-02T15:07:25,600 " File \"\", line 24, in CHECK_3", 2023-10-02T15:07:25,600 "Exception: NOT 100%" 2023-10-02T15:07:25,601 ] 2023-10-02T15:07:25,602 } 2023-10-02T15:07:25,602 ] 2023-10-02T15:07:25,603 }, 2023-10-02T15:07:25,604 { 2023-10-02T15:07:25,604 "PATH": "PATH_2_HEALTH.py", 2023-10-02T15:07:25,605 "EMPTY": true 2023-10-02T15:07:25,606 } 2023-10-02T15:07:25,606 ], 2023-10-02T15:07:25,606 "STATS": { 2023-10-02T15:07:25,607 "EMPTY": 1, 2023-10-02T15:07:25,607 "CHECKS": { 2023-10-02T15:07:25,608 "PASSES": 2, 2023-10-02T15:07:25,608 "ALARMS": 1 2023-10-02T15:07:25,609 } 2023-10-02T15:07:25,609 } 2023-10-02T15:07:25,609 } 2023-10-02T15:07:25,610 ``` 2023-10-02T15:07:25,611 ## HOW TO WRITE CHECKS: 2023-10-02T15:07:25,612 The "CHECKS" dictionary is retrieved with the python "exec" 2023-10-02T15:07:25,612 and then each "CHECK" in "CHECKS" is run. 2023-10-02T15:07:25,613 These checks correspond to the example output shown above. 2023-10-02T15:07:25,613 ``` 2023-10-02T15:07:25,614 PATH_1_HEALTH.py 2023-10-02T15:07:25,614 ``` 2023-10-02T15:07:25,615 ``` 2023-10-02T15:07:25,615 def CHECK_1 (): 2023-10-02T15:07:25,615 print ("CHECK 1") 2023-10-02T15:07:25,616 def CHECK_2 (): 2023-10-02T15:07:25,617 print ("CHECK 2") 2023-10-02T15:07:25,618 def CHECK_3 (): 2023-10-02T15:07:25,618 raise Exception ("NOT 100%") 2023-10-02T15:07:25,619 CHECKS = { 2023-10-02T15:07:25,620 "CHECK 1": CHECK_1, 2023-10-02T15:07:25,620 "CHECK 2": CHECK_2, 2023-10-02T15:07:25,621 "CHECK 3": CHECK_3 2023-10-02T15:07:25,621 } 2023-10-02T15:07:25,622 ``` 2023-10-02T15:07:25,622 ``` 2023-10-02T15:07:25,623 PATH_2_HEALTH.py 2023-10-02T15:07:25,623 ``` 2023-10-02T15:07:25,623 ``` 2023-10-02T15:07:25,624 # 2023-10-02T15:07:25,624 # There isn't a "CHECKS" dictionary present, 2023-10-02T15:07:25,625 # so the scanner reports: 2023-10-02T15:07:25,625 # 2023-10-02T15:07:25,626 # "EMPTY": true 2023-10-02T15:07:25,626 # 2023-10-02T15:07:25,627 ``` 2023-10-02T15:07:25,628 ## HOW TO START THE BODY SCANNER 2023-10-02T15:07:25,629 ### REQUIRED 2023-10-02T15:07:25,630 ``` 2023-10-02T15:07:25,630 "GLOB" is all the files that are sent to the scanner. 2023-10-02T15:07:25,631 ``` 2023-10-02T15:07:25,632 ### OPTIONAL 2023-10-02T15:07:25,633 ``` 2023-10-02T15:07:25,633 "MODULE_PATHS" is folders that are added to "sys.path" 2023-10-02T15:07:25,634 "RELATIVE_PATH" is the folders to remove from the paths in the output 2023-10-02T15:07:25,634 ``` 2023-10-02T15:07:25,635 ### NOTES 2023-10-02T15:07:25,636 ``` 2023-10-02T15:07:25,636 Currently all the checks aren't run in parallel, 2023-10-02T15:07:25,637 but sequential order of paths found in glob is not guaranteed. 2023-10-02T15:07:25,638 ``` 2023-10-02T15:07:25,638 ``` 2023-10-02T15:07:25,638 Each check suite found by the glob is encapsulated in 2023-10-02T15:07:25,639 a process with a flask API, that is opened on the first available port found. 2023-10-02T15:07:25,640 ``` 2023-10-02T15:07:25,641 ```python3 2023-10-02T15:07:25,641 import BODY_SCAN 2023-10-02T15:07:25,642 import pathlib 2023-10-02T15:07:25,643 THIS_FOLDER = pathlib.Path (__file__).parent.resolve () 2023-10-02T15:07:25,644 from os.path import dirname, join, normpath 2023-10-02T15:07:25,645 SEARCH = normpath (join (THIS_FOLDER, "MODULE")) 2023-10-02T15:07:25,646 # 2023-10-02T15:07:25,646 # These are added to the sys.path before scan is started. 2023-10-02T15:07:25,647 # 2023-10-02T15:07:25,647 MODULE_PATH = [ 2023-10-02T15:07:25,648 normpath (join (SEARCH, "MODULES")) 2023-10-02T15:07:25,649 ] 2023-10-02T15:07:25,650 SCAN = BODY_SCAN.START ( 2023-10-02T15:07:25,650 # REQUIRED 2023-10-02T15:07:25,651 GLOB = SEARCH + '/**/*HEALTH.py', 2023-10-02T15:07:25,652 # OPTIONAL 2023-10-02T15:07:25,653 MODULE_PATHS = MODULE_PATH, 2023-10-02T15:07:25,654 # OPTIONAL 2023-10-02T15:07:25,654 RELATIVE_PATH = SEARCH 2023-10-02T15:07:25,655 ) 2023-10-02T15:07:25,655 ``` 2023-10-02T15:07:26,171 running bdist_wheel 2023-10-02T15:07:26,266 running build 2023-10-02T15:07:26,266 running build_py 2023-10-02T15:07:26,293 creating build 2023-10-02T15:07:26,294 creating build/lib 2023-10-02T15:07:26,295 creating build/lib/BODY_SCAN 2023-10-02T15:07:26,296 copying src/START_MULTIPLE_PROCESSES.py -> build/lib/BODY_SCAN 2023-10-02T15:07:26,299 copying src/__init__.py -> build/lib/BODY_SCAN 2023-10-02T15:07:26,301 creating build/lib/BODY_SCAN/AGGREGATOR 2023-10-02T15:07:26,302 copying src/AGGREGATOR/START.py -> build/lib/BODY_SCAN/AGGREGATOR 2023-10-02T15:07:26,304 creating build/lib/BODY_SCAN/FUNCTIONS 2023-10-02T15:07:26,305 copying src/FUNCTIONS/START_THE_CORE_KEG.py -> build/lib/BODY_SCAN/FUNCTIONS 2023-10-02T15:07:26,306 copying src/FUNCTIONS/CHECK_STATUS_LOCATION.py -> build/lib/BODY_SCAN/FUNCTIONS 2023-10-02T15:07:26,308 copying src/FUNCTIONS/START_A_SCAN.py -> build/lib/BODY_SCAN/FUNCTIONS 2023-10-02T15:07:26,310 creating build/lib/BODY_SCAN/AGGREGATE 2023-10-02T15:07:26,311 copying src/AGGREGATE/__init__.py -> build/lib/BODY_SCAN/AGGREGATE 2023-10-02T15:07:26,314 creating build/lib/BODY_SCAN/SCAN_PROC 2023-10-02T15:07:26,314 copying src/SCAN_PROC/START.py -> build/lib/BODY_SCAN/SCAN_PROC 2023-10-02T15:07:26,316 creating build/lib/BODY_SCAN/AGGREGATOR/KEG 2023-10-02T15:07:26,317 copying src/AGGREGATOR/KEG/__init__.py -> build/lib/BODY_SCAN/AGGREGATOR/KEG 2023-10-02T15:07:26,320 creating build/lib/BODY_SCAN/SCAN_PROC/KEG 2023-10-02T15:07:26,320 copying src/SCAN_PROC/KEG/SCAN.py -> build/lib/BODY_SCAN/SCAN_PROC/KEG 2023-10-02T15:07:26,322 copying src/SCAN_PROC/KEG/__init__.py -> build/lib/BODY_SCAN/SCAN_PROC/KEG 2023-10-02T15:07:26,351 /usr/local/lib/python3.11/dist-packages/setuptools/_distutils/cmd.py:66: SetuptoolsDeprecationWarning: setup.py install is deprecated. 2023-10-02T15:07:26,352 !! 2023-10-02T15:07:26,353 ******************************************************************************** 2023-10-02T15:07:26,354 Please avoid running ``setup.py`` directly. 2023-10-02T15:07:26,354 Instead, use pypa/build, pypa/installer or other 2023-10-02T15:07:26,355 standards-based tools. 2023-10-02T15:07:26,356 See https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html for details. 2023-10-02T15:07:26,356 ******************************************************************************** 2023-10-02T15:07:26,358 !! 2023-10-02T15:07:26,358 self.initialize_options() 2023-10-02T15:07:26,375 installing to build/bdist.linux-armv7l/wheel 2023-10-02T15:07:26,376 running install 2023-10-02T15:07:26,400 running install_lib 2023-10-02T15:07:26,424 creating build/bdist.linux-armv7l 2023-10-02T15:07:26,424 creating build/bdist.linux-armv7l/wheel 2023-10-02T15:07:26,426 creating build/bdist.linux-armv7l/wheel/BODY_SCAN 2023-10-02T15:07:26,427 creating build/bdist.linux-armv7l/wheel/BODY_SCAN/AGGREGATOR 2023-10-02T15:07:26,428 copying build/lib/BODY_SCAN/AGGREGATOR/START.py -> build/bdist.linux-armv7l/wheel/BODY_SCAN/AGGREGATOR 2023-10-02T15:07:26,431 creating build/bdist.linux-armv7l/wheel/BODY_SCAN/AGGREGATOR/KEG 2023-10-02T15:07:26,432 copying build/lib/BODY_SCAN/AGGREGATOR/KEG/__init__.py -> build/bdist.linux-armv7l/wheel/BODY_SCAN/AGGREGATOR/KEG 2023-10-02T15:07:26,434 creating build/bdist.linux-armv7l/wheel/BODY_SCAN/FUNCTIONS 2023-10-02T15:07:26,435 copying build/lib/BODY_SCAN/FUNCTIONS/START_THE_CORE_KEG.py -> build/bdist.linux-armv7l/wheel/BODY_SCAN/FUNCTIONS 2023-10-02T15:07:26,437 copying build/lib/BODY_SCAN/FUNCTIONS/CHECK_STATUS_LOCATION.py -> build/bdist.linux-armv7l/wheel/BODY_SCAN/FUNCTIONS 2023-10-02T15:07:26,439 copying build/lib/BODY_SCAN/FUNCTIONS/START_A_SCAN.py -> build/bdist.linux-armv7l/wheel/BODY_SCAN/FUNCTIONS 2023-10-02T15:07:26,441 creating build/bdist.linux-armv7l/wheel/BODY_SCAN/AGGREGATE 2023-10-02T15:07:26,442 copying build/lib/BODY_SCAN/AGGREGATE/__init__.py -> build/bdist.linux-armv7l/wheel/BODY_SCAN/AGGREGATE 2023-10-02T15:07:26,444 copying build/lib/BODY_SCAN/START_MULTIPLE_PROCESSES.py -> build/bdist.linux-armv7l/wheel/BODY_SCAN 2023-10-02T15:07:26,447 creating build/bdist.linux-armv7l/wheel/BODY_SCAN/SCAN_PROC 2023-10-02T15:07:26,448 copying build/lib/BODY_SCAN/SCAN_PROC/START.py -> build/bdist.linux-armv7l/wheel/BODY_SCAN/SCAN_PROC 2023-10-02T15:07:26,453 creating build/bdist.linux-armv7l/wheel/BODY_SCAN/SCAN_PROC/KEG 2023-10-02T15:07:26,455 copying build/lib/BODY_SCAN/SCAN_PROC/KEG/SCAN.py -> build/bdist.linux-armv7l/wheel/BODY_SCAN/SCAN_PROC/KEG 2023-10-02T15:07:26,465 copying build/lib/BODY_SCAN/SCAN_PROC/KEG/__init__.py -> build/bdist.linux-armv7l/wheel/BODY_SCAN/SCAN_PROC/KEG 2023-10-02T15:07:26,467 copying build/lib/BODY_SCAN/__init__.py -> build/bdist.linux-armv7l/wheel/BODY_SCAN 2023-10-02T15:07:26,469 running install_egg_info 2023-10-02T15:07:26,771 running egg_info 2023-10-02T15:07:26,808 writing BODY_SCAN.egg-info/PKG-INFO 2023-10-02T15:07:26,811 writing dependency_links to BODY_SCAN.egg-info/dependency_links.txt 2023-10-02T15:07:26,813 writing requirements to BODY_SCAN.egg-info/requires.txt 2023-10-02T15:07:26,814 writing top-level names to BODY_SCAN.egg-info/top_level.txt 2023-10-02T15:07:26,841 reading manifest file 'BODY_SCAN.egg-info/SOURCES.txt' 2023-10-02T15:07:26,843 adding license file 'LICENSE' 2023-10-02T15:07:26,845 writing manifest file 'BODY_SCAN.egg-info/SOURCES.txt' 2023-10-02T15:07:26,847 Copying BODY_SCAN.egg-info to build/bdist.linux-armv7l/wheel/BODY_SCAN-0.0.15-py3.11.egg-info 2023-10-02T15:07:26,857 running install_scripts 2023-10-02T15:07:26,871 creating build/bdist.linux-armv7l/wheel/BODY_SCAN-0.0.15.dist-info/WHEEL 2023-10-02T15:07:26,873 creating '/tmp/pip-wheel-lwoxpf1w/BODY_SCAN-0.0.15-py3-none-any.whl' and adding 'build/bdist.linux-armv7l/wheel' to it 2023-10-02T15:07:26,876 adding 'BODY_SCAN/START_MULTIPLE_PROCESSES.py' 2023-10-02T15:07:26,877 adding 'BODY_SCAN/__init__.py' 2023-10-02T15:07:26,879 adding 'BODY_SCAN/AGGREGATE/__init__.py' 2023-10-02T15:07:26,881 adding 'BODY_SCAN/AGGREGATOR/START.py' 2023-10-02T15:07:26,882 adding 'BODY_SCAN/AGGREGATOR/KEG/__init__.py' 2023-10-02T15:07:26,884 adding 'BODY_SCAN/FUNCTIONS/CHECK_STATUS_LOCATION.py' 2023-10-02T15:07:26,885 adding 'BODY_SCAN/FUNCTIONS/START_A_SCAN.py' 2023-10-02T15:07:26,886 adding 'BODY_SCAN/FUNCTIONS/START_THE_CORE_KEG.py' 2023-10-02T15:07:26,888 adding 'BODY_SCAN/SCAN_PROC/START.py' 2023-10-02T15:07:26,890 adding 'BODY_SCAN/SCAN_PROC/KEG/SCAN.py' 2023-10-02T15:07:26,891 adding 'BODY_SCAN/SCAN_PROC/KEG/__init__.py' 2023-10-02T15:07:26,893 adding 'BODY_SCAN-0.0.15.dist-info/LICENSE' 2023-10-02T15:07:26,894 adding 'BODY_SCAN-0.0.15.dist-info/METADATA' 2023-10-02T15:07:26,895 adding 'BODY_SCAN-0.0.15.dist-info/WHEEL' 2023-10-02T15:07:26,896 adding 'BODY_SCAN-0.0.15.dist-info/top_level.txt' 2023-10-02T15:07:26,897 adding 'BODY_SCAN-0.0.15.dist-info/RECORD' 2023-10-02T15:07:26,898 removing build/bdist.linux-armv7l/wheel 2023-10-02T15:07:27,015 Building wheel for body-scan (setup.py): finished with status 'done' 2023-10-02T15:07:27,018 Created wheel for body-scan: filename=BODY_SCAN-0.0.15-py3-none-any.whl size=9532 sha256=77da6466da588d9dbb0a76a7e9f269123ff4852b3704b17d2e93ca9446a09249 2023-10-02T15:07:27,019 Stored in directory: /tmp/pip-ephem-wheel-cache-qy1zbiek/wheels/9d/67/0b/ef4ad85423e44ae7302ffe2fa65573f11b41f10a37e7fccd87 2023-10-02T15:07:27,029 Successfully built body-scan 2023-10-02T15:07:27,033 Removed build tracker: '/tmp/pip-build-tracker-t77xty2n'