2023-10-02T18:49:32,456 Created temporary directory: /tmp/pip-build-tracker-_vjudo4z 2023-10-02T18:49:32,457 Initialized build tracking at /tmp/pip-build-tracker-_vjudo4z 2023-10-02T18:49:32,458 Created build tracker: /tmp/pip-build-tracker-_vjudo4z 2023-10-02T18:49:32,458 Entered build tracker: /tmp/pip-build-tracker-_vjudo4z 2023-10-02T18:49:32,459 Created temporary directory: /tmp/pip-wheel-674ffp90 2023-10-02T18:49:32,462 Created temporary directory: /tmp/pip-ephem-wheel-cache-zyb077p5 2023-10-02T18:49:32,483 Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple 2023-10-02T18:49:32,487 2 location(s) to search for versions of body-scan: 2023-10-02T18:49:32,487 * https://pypi.org/simple/body-scan/ 2023-10-02T18:49:32,487 * https://www.piwheels.org/simple/body-scan/ 2023-10-02T18:49:32,488 Fetching project page and analyzing links: https://pypi.org/simple/body-scan/ 2023-10-02T18:49:32,489 Getting page https://pypi.org/simple/body-scan/ 2023-10-02T18:49:32,490 Found index url https://pypi.org/simple/ 2023-10-02T18:49:32,629 Fetched page https://pypi.org/simple/body-scan/ as application/vnd.pypi.simple.v1+json 2023-10-02T18:49:32,633 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-02T18:49:32,634 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-02T18:49:32,634 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-02T18:49:32,635 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-02T18:49:32,635 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-02T18:49:32,636 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-02T18:49:32,637 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-02T18:49:32,638 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-02T18:49:32,639 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-02T18:49:32,640 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-02T18:49:32,640 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-02T18:49:32,641 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-02T18:49:32,642 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-02T18:49:32,642 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-02T18:49:32,643 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-02T18:49:32,644 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-02T18:49:32,645 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-02T18:49:32,645 Fetching project page and analyzing links: https://www.piwheels.org/simple/body-scan/ 2023-10-02T18:49:32,646 Getting page https://www.piwheels.org/simple/body-scan/ 2023-10-02T18:49:32,647 Found index url https://www.piwheels.org/simple/ 2023-10-02T18:49:32,815 Fetched page https://www.piwheels.org/simple/body-scan/ as text/html 2023-10-02T18:49:32,820 Skipping link: No binaries permitted for body-scan: https://www.piwheels.org/simple/body-scan/BODY_SCAN-0.0.16-py3-none-any.whl#sha256=1f82675129d38de9d734567dbfd8010c9268d3269bee38a0912d397d30d531be (from https://www.piwheels.org/simple/body-scan/) 2023-10-02T18:49:32,820 Skipping link: No binaries permitted for body-scan: https://www.piwheels.org/simple/body-scan/BODY_SCAN-0.0.15-py3-none-any.whl#sha256=77da6466da588d9dbb0a76a7e9f269123ff4852b3704b17d2e93ca9446a09249 (from https://www.piwheels.org/simple/body-scan/) 2023-10-02T18:49:32,821 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-02T18:49:32,821 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-02T18:49:32,822 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-02T18:49:32,823 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-02T18:49:32,823 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-02T18:49:32,824 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-02T18:49:32,824 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-02T18:49:32,825 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-02T18:49:32,825 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-02T18:49:32,826 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-02T18:49:32,827 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-02T18:49:32,828 Skipping link: not a file: https://www.piwheels.org/simple/body-scan/ 2023-10-02T18:49:32,828 Skipping link: not a file: https://pypi.org/simple/body-scan/ 2023-10-02T18:49:32,848 Given no hashes to check 1 links for project 'body-scan': discarding no candidates 2023-10-02T18:49:32,867 Collecting body-scan==0.0.17 2023-10-02T18:49:32,869 Created temporary directory: /tmp/pip-unpack-0mc6xfhm 2023-10-02T18:49:33,083 Downloading BODY_SCAN-0.0.17.tar.gz (7.1 kB) 2023-10-02T18:49:33,128 Added body-scan==0.0.17 from https://files.pythonhosted.org/packages/68/f2/983e8acc6c0c023262813b15fcfe0e009ece07dbf410330f91efd0a8b8c4/BODY_SCAN-0.0.17.tar.gz to build tracker '/tmp/pip-build-tracker-_vjudo4z' 2023-10-02T18:49:33,130 Running setup.py (path:/tmp/pip-wheel-674ffp90/body-scan_5a90dd499087472aa82684e22ecf0a38/setup.py) egg_info for package body-scan 2023-10-02T18:49:33,131 Created temporary directory: /tmp/pip-pip-egg-info-7a56b513 2023-10-02T18:49:33,131 Preparing metadata (setup.py): started 2023-10-02T18:49:33,133 Running command python setup.py egg_info 2023-10-02T18:49:34,122 # BODY SCAN 2023-10-02T18:49:34,123 ## EXAMPLE OUTPUT: 2023-10-02T18:49:34,124 ```JSON 2023-10-02T18:49:34,124 { 2023-10-02T18:49:34,125 "PATHS": [ 2023-10-02T18:49:34,125 { 2023-10-02T18:49:34,126 "PATH": "PATH_1_HEALTH.py", 2023-10-02T18:49:34,127 "STATS": { 2023-10-02T18:49:34,127 "PASSES": 2, 2023-10-02T18:49:34,128 "ALARMS": 1 2023-10-02T18:49:34,128 }, 2023-10-02T18:49:34,129 "CHECKS": [ 2023-10-02T18:49:34,130 { 2023-10-02T18:49:34,130 "CHECK": "CHECK 1", 2023-10-02T18:49:34,131 "PASSED": true, 2023-10-02T18:49:34,132 "ELAPSED": [ 2023-10-02T18:49:34,132 5.320599666447379e-05, 2023-10-02T18:49:34,133 "SECONDS" 2023-10-02T18:49:34,134 ] 2023-10-02T18:49:34,134 }, 2023-10-02T18:49:34,135 { 2023-10-02T18:49:34,135 "CHECK": "CHECK 2", 2023-10-02T18:49:34,136 "PASSED": true, 2023-10-02T18:49:34,137 "ELAPSED": [ 2023-10-02T18:49:34,137 1.0949999705189839e-05, 2023-10-02T18:49:34,138 "SECONDS" 2023-10-02T18:49:34,138 ] 2023-10-02T18:49:34,139 }, 2023-10-02T18:49:34,140 { 2023-10-02T18:49:34,140 "CHECK": "CHECK 3", 2023-10-02T18:49:34,141 "PASSED": false, 2023-10-02T18:49:34,141 "EXCEPTION": "Exception('NOT 100%')", 2023-10-02T18:49:34,142 "EXCEPTION TRACE": [ 2023-10-02T18:49:34,142 "Traceback (most recent call last):", 2023-10-02T18:49:34,143 " File \"/REPTILIAN_CLIMATES/MODULES/BODY_SCAN/src/SCAN_PROC/KEG/SCAN.py\", line 69, in SCAN", 2023-10-02T18:49:34,144 " CHECKS [ CHECK ] ()", 2023-10-02T18:49:34,144 " File \"\", line 24, in CHECK_3", 2023-10-02T18:49:34,145 "Exception: NOT 100%" 2023-10-02T18:49:34,146 ] 2023-10-02T18:49:34,147 } 2023-10-02T18:49:34,147 ] 2023-10-02T18:49:34,148 }, 2023-10-02T18:49:34,148 { 2023-10-02T18:49:34,149 "PATH": "PATH_2_HEALTH.py", 2023-10-02T18:49:34,149 "EMPTY": true 2023-10-02T18:49:34,150 } 2023-10-02T18:49:34,150 ], 2023-10-02T18:49:34,150 "STATS": { 2023-10-02T18:49:34,151 "EMPTY": 1, 2023-10-02T18:49:34,151 "CHECKS": { 2023-10-02T18:49:34,152 "PASSES": 2, 2023-10-02T18:49:34,152 "ALARMS": 1 2023-10-02T18:49:34,153 } 2023-10-02T18:49:34,153 } 2023-10-02T18:49:34,154 } 2023-10-02T18:49:34,154 ``` 2023-10-02T18:49:34,155 ## HOW TO WRITE CHECKS: 2023-10-02T18:49:34,156 The "CHECKS" dictionary is retrieved with the python "exec" 2023-10-02T18:49:34,157 and then each "CHECK" in "CHECKS" is run. 2023-10-02T18:49:34,158 These checks correspond to the example output shown above. 2023-10-02T18:49:34,158 ``` 2023-10-02T18:49:34,159 PATH_1_HEALTH.py 2023-10-02T18:49:34,159 ``` 2023-10-02T18:49:34,160 ``` 2023-10-02T18:49:34,160 def CHECK_1 (): 2023-10-02T18:49:34,161 print ("CHECK 1") 2023-10-02T18:49:34,162 def CHECK_2 (): 2023-10-02T18:49:34,162 print ("CHECK 2") 2023-10-02T18:49:34,163 def CHECK_3 (): 2023-10-02T18:49:34,164 raise Exception ("NOT 100%") 2023-10-02T18:49:34,165 CHECKS = { 2023-10-02T18:49:34,165 "CHECK 1": CHECK_1, 2023-10-02T18:49:34,166 "CHECK 2": CHECK_2, 2023-10-02T18:49:34,166 "CHECK 3": CHECK_3 2023-10-02T18:49:34,167 } 2023-10-02T18:49:34,167 ``` 2023-10-02T18:49:34,168 ``` 2023-10-02T18:49:34,168 PATH_2_HEALTH.py 2023-10-02T18:49:34,169 ``` 2023-10-02T18:49:34,169 ``` 2023-10-02T18:49:34,170 # 2023-10-02T18:49:34,171 # There isn't a "CHECKS" dictionary present, 2023-10-02T18:49:34,171 # so the scanner reports: 2023-10-02T18:49:34,172 # 2023-10-02T18:49:34,172 # "EMPTY": true 2023-10-02T18:49:34,173 # 2023-10-02T18:49:34,174 ``` 2023-10-02T18:49:34,175 ## HOW TO START THE BODY SCANNER 2023-10-02T18:49:34,176 ```python3 2023-10-02T18:49:34,177 import BODY_SCAN 2023-10-02T18:49:34,178 import pathlib 2023-10-02T18:49:34,178 THIS_FOLDER = pathlib.Path (__file__).parent.resolve () 2023-10-02T18:49:34,180 from os.path import dirname, join, normpath 2023-10-02T18:49:34,180 SEARCH = normpath (join (THIS_FOLDER, "MODULE")) 2023-10-02T18:49:34,182 SCAN = BODY_SCAN.START ( 2023-10-02T18:49:34,183 # 2023-10-02T18:49:34,184 # REQUIRED 2023-10-02T18:49:34,184 # This is all the files that are sent to the scanner. 2023-10-02T18:49:34,185 # 2023-10-02T18:49:34,185 GLOB = SEARCH + '/**/*HEALTH.py', 2023-10-02T18:49:34,187 # 2023-10-02T18:49:34,187 # OPTIONAL 2023-10-02T18:49:34,188 # These are the folders that are added to "sys.path" 2023-10-02T18:49:34,188 # 2023-10-02T18:49:34,189 MODULE_PATHS = [ 2023-10-02T18:49:34,189 normpath (join (SEARCH, "MODULES")) 2023-10-02T18:49:34,190 ], 2023-10-02T18:49:34,191 # 2023-10-02T18:49:34,192 # OPTIONAL 2023-10-02T18:49:34,192 # This is the folder path to remove from the paths in the output. 2023-10-02T18:49:34,193 # 2023-10-02T18:49:34,193 RELATIVE_PATH = SEARCH 2023-10-02T18:49:34,194 ) 2023-10-02T18:49:34,195 ``` 2023-10-02T18:49:34,196 ### NOTES 2023-10-02T18:49:34,196 ``` 2023-10-02T18:49:34,197 Currently all the checks aren't run in parallel, 2023-10-02T18:49:34,198 but sequential order of paths found in glob is not guaranteed. 2023-10-02T18:49:34,198 ``` 2023-10-02T18:49:34,199 ``` 2023-10-02T18:49:34,199 Each check suite found by the glob is started by 2023-10-02T18:49:34,200 a process with a flask API, that is opened on the first available port found. 2023-10-02T18:49:34,201 ``` 2023-10-02T18:49:34,202 running egg_info 2023-10-02T18:49:34,203 creating /tmp/pip-pip-egg-info-7a56b513/BODY_SCAN.egg-info 2023-10-02T18:49:34,204 writing /tmp/pip-pip-egg-info-7a56b513/BODY_SCAN.egg-info/PKG-INFO 2023-10-02T18:49:34,204 writing dependency_links to /tmp/pip-pip-egg-info-7a56b513/BODY_SCAN.egg-info/dependency_links.txt 2023-10-02T18:49:34,205 writing requirements to /tmp/pip-pip-egg-info-7a56b513/BODY_SCAN.egg-info/requires.txt 2023-10-02T18:49:34,205 writing top-level names to /tmp/pip-pip-egg-info-7a56b513/BODY_SCAN.egg-info/top_level.txt 2023-10-02T18:49:34,206 writing manifest file '/tmp/pip-pip-egg-info-7a56b513/BODY_SCAN.egg-info/SOURCES.txt' 2023-10-02T18:49:34,246 reading manifest file '/tmp/pip-pip-egg-info-7a56b513/BODY_SCAN.egg-info/SOURCES.txt' 2023-10-02T18:49:34,248 adding license file 'LICENSE' 2023-10-02T18:49:34,249 writing manifest file '/tmp/pip-pip-egg-info-7a56b513/BODY_SCAN.egg-info/SOURCES.txt' 2023-10-02T18:49:34,358 Preparing metadata (setup.py): finished with status 'done' 2023-10-02T18:49:34,362 Source in /tmp/pip-wheel-674ffp90/body-scan_5a90dd499087472aa82684e22ecf0a38 has version 0.0.17, which satisfies requirement body-scan==0.0.17 from https://files.pythonhosted.org/packages/68/f2/983e8acc6c0c023262813b15fcfe0e009ece07dbf410330f91efd0a8b8c4/BODY_SCAN-0.0.17.tar.gz 2023-10-02T18:49:34,363 Removed body-scan==0.0.17 from https://files.pythonhosted.org/packages/68/f2/983e8acc6c0c023262813b15fcfe0e009ece07dbf410330f91efd0a8b8c4/BODY_SCAN-0.0.17.tar.gz from build tracker '/tmp/pip-build-tracker-_vjudo4z' 2023-10-02T18:49:34,367 Created temporary directory: /tmp/pip-unpack-fy269eae 2023-10-02T18:49:34,368 Created temporary directory: /tmp/pip-unpack-73eir0cw 2023-10-02T18:49:34,374 Building wheels for collected packages: body-scan 2023-10-02T18:49:34,378 Created temporary directory: /tmp/pip-wheel-lqwfktuq 2023-10-02T18:49:34,378 Building wheel for body-scan (setup.py): started 2023-10-02T18:49:34,380 Destination directory: /tmp/pip-wheel-lqwfktuq 2023-10-02T18:49:34,380 Running command python setup.py bdist_wheel 2023-10-02T18:49:34,782 # BODY SCAN 2023-10-02T18:49:34,783 ## EXAMPLE OUTPUT: 2023-10-02T18:49:34,783 ```JSON 2023-10-02T18:49:34,784 { 2023-10-02T18:49:34,785 "PATHS": [ 2023-10-02T18:49:34,785 { 2023-10-02T18:49:34,786 "PATH": "PATH_1_HEALTH.py", 2023-10-02T18:49:34,786 "STATS": { 2023-10-02T18:49:34,787 "PASSES": 2, 2023-10-02T18:49:34,787 "ALARMS": 1 2023-10-02T18:49:34,788 }, 2023-10-02T18:49:34,788 "CHECKS": [ 2023-10-02T18:49:34,789 { 2023-10-02T18:49:34,789 "CHECK": "CHECK 1", 2023-10-02T18:49:34,790 "PASSED": true, 2023-10-02T18:49:34,791 "ELAPSED": [ 2023-10-02T18:49:34,791 5.320599666447379e-05, 2023-10-02T18:49:34,792 "SECONDS" 2023-10-02T18:49:34,792 ] 2023-10-02T18:49:34,793 }, 2023-10-02T18:49:34,793 { 2023-10-02T18:49:34,794 "CHECK": "CHECK 2", 2023-10-02T18:49:34,794 "PASSED": true, 2023-10-02T18:49:34,795 "ELAPSED": [ 2023-10-02T18:49:34,796 1.0949999705189839e-05, 2023-10-02T18:49:34,796 "SECONDS" 2023-10-02T18:49:34,797 ] 2023-10-02T18:49:34,797 }, 2023-10-02T18:49:34,798 { 2023-10-02T18:49:34,798 "CHECK": "CHECK 3", 2023-10-02T18:49:34,799 "PASSED": false, 2023-10-02T18:49:34,800 "EXCEPTION": "Exception('NOT 100%')", 2023-10-02T18:49:34,800 "EXCEPTION TRACE": [ 2023-10-02T18:49:34,801 "Traceback (most recent call last):", 2023-10-02T18:49:34,801 " File \"/REPTILIAN_CLIMATES/MODULES/BODY_SCAN/src/SCAN_PROC/KEG/SCAN.py\", line 69, in SCAN", 2023-10-02T18:49:34,802 " CHECKS [ CHECK ] ()", 2023-10-02T18:49:34,802 " File \"\", line 24, in CHECK_3", 2023-10-02T18:49:34,803 "Exception: NOT 100%" 2023-10-02T18:49:34,804 ] 2023-10-02T18:49:34,804 } 2023-10-02T18:49:34,805 ] 2023-10-02T18:49:34,805 }, 2023-10-02T18:49:34,805 { 2023-10-02T18:49:34,806 "PATH": "PATH_2_HEALTH.py", 2023-10-02T18:49:34,806 "EMPTY": true 2023-10-02T18:49:34,807 } 2023-10-02T18:49:34,807 ], 2023-10-02T18:49:34,808 "STATS": { 2023-10-02T18:49:34,808 "EMPTY": 1, 2023-10-02T18:49:34,808 "CHECKS": { 2023-10-02T18:49:34,809 "PASSES": 2, 2023-10-02T18:49:34,809 "ALARMS": 1 2023-10-02T18:49:34,810 } 2023-10-02T18:49:34,810 } 2023-10-02T18:49:34,811 } 2023-10-02T18:49:34,811 ``` 2023-10-02T18:49:34,812 ## HOW TO WRITE CHECKS: 2023-10-02T18:49:34,813 The "CHECKS" dictionary is retrieved with the python "exec" 2023-10-02T18:49:34,813 and then each "CHECK" in "CHECKS" is run. 2023-10-02T18:49:34,814 These checks correspond to the example output shown above. 2023-10-02T18:49:34,815 ``` 2023-10-02T18:49:34,815 PATH_1_HEALTH.py 2023-10-02T18:49:34,816 ``` 2023-10-02T18:49:34,816 ``` 2023-10-02T18:49:34,817 def CHECK_1 (): 2023-10-02T18:49:34,817 print ("CHECK 1") 2023-10-02T18:49:34,818 def CHECK_2 (): 2023-10-02T18:49:34,819 print ("CHECK 2") 2023-10-02T18:49:34,819 def CHECK_3 (): 2023-10-02T18:49:34,820 raise Exception ("NOT 100%") 2023-10-02T18:49:34,821 CHECKS = { 2023-10-02T18:49:34,821 "CHECK 1": CHECK_1, 2023-10-02T18:49:34,822 "CHECK 2": CHECK_2, 2023-10-02T18:49:34,822 "CHECK 3": CHECK_3 2023-10-02T18:49:34,823 } 2023-10-02T18:49:34,823 ``` 2023-10-02T18:49:34,824 ``` 2023-10-02T18:49:34,824 PATH_2_HEALTH.py 2023-10-02T18:49:34,825 ``` 2023-10-02T18:49:34,825 ``` 2023-10-02T18:49:34,826 # 2023-10-02T18:49:34,827 # There isn't a "CHECKS" dictionary present, 2023-10-02T18:49:34,827 # so the scanner reports: 2023-10-02T18:49:34,828 # 2023-10-02T18:49:34,828 # "EMPTY": true 2023-10-02T18:49:34,829 # 2023-10-02T18:49:34,829 ``` 2023-10-02T18:49:34,831 ## HOW TO START THE BODY SCANNER 2023-10-02T18:49:34,832 ```python3 2023-10-02T18:49:34,833 import BODY_SCAN 2023-10-02T18:49:34,834 import pathlib 2023-10-02T18:49:34,834 THIS_FOLDER = pathlib.Path (__file__).parent.resolve () 2023-10-02T18:49:34,835 from os.path import dirname, join, normpath 2023-10-02T18:49:34,836 SEARCH = normpath (join (THIS_FOLDER, "MODULE")) 2023-10-02T18:49:34,838 SCAN = BODY_SCAN.START ( 2023-10-02T18:49:34,838 # 2023-10-02T18:49:34,839 # REQUIRED 2023-10-02T18:49:34,840 # This is all the files that are sent to the scanner. 2023-10-02T18:49:34,840 # 2023-10-02T18:49:34,841 GLOB = SEARCH + '/**/*HEALTH.py', 2023-10-02T18:49:34,842 # 2023-10-02T18:49:34,842 # OPTIONAL 2023-10-02T18:49:34,843 # These are the folders that are added to "sys.path" 2023-10-02T18:49:34,844 # 2023-10-02T18:49:34,844 MODULE_PATHS = [ 2023-10-02T18:49:34,845 normpath (join (SEARCH, "MODULES")) 2023-10-02T18:49:34,845 ], 2023-10-02T18:49:34,847 # 2023-10-02T18:49:34,847 # OPTIONAL 2023-10-02T18:49:34,848 # This is the folder path to remove from the paths in the output. 2023-10-02T18:49:34,848 # 2023-10-02T18:49:34,849 RELATIVE_PATH = SEARCH 2023-10-02T18:49:34,850 ) 2023-10-02T18:49:34,850 ``` 2023-10-02T18:49:34,851 ### NOTES 2023-10-02T18:49:34,852 ``` 2023-10-02T18:49:34,852 Currently all the checks aren't run in parallel, 2023-10-02T18:49:34,853 but sequential order of paths found in glob is not guaranteed. 2023-10-02T18:49:34,854 ``` 2023-10-02T18:49:34,854 ``` 2023-10-02T18:49:34,855 Each check suite found by the glob is started by 2023-10-02T18:49:34,855 a process with a flask API, that is opened on the first available port found. 2023-10-02T18:49:34,856 ``` 2023-10-02T18:49:35,366 running bdist_wheel 2023-10-02T18:49:35,456 running build 2023-10-02T18:49:35,457 running build_py 2023-10-02T18:49:35,483 creating build 2023-10-02T18:49:35,483 creating build/lib 2023-10-02T18:49:35,484 creating build/lib/BODY_SCAN 2023-10-02T18:49:35,485 copying src/__init__.py -> build/lib/BODY_SCAN 2023-10-02T18:49:35,487 copying src/START_MULTIPLE_PROCESSES.py -> build/lib/BODY_SCAN 2023-10-02T18:49:35,489 creating build/lib/BODY_SCAN/AGGREGATOR 2023-10-02T18:49:35,490 copying src/AGGREGATOR/START.py -> build/lib/BODY_SCAN/AGGREGATOR 2023-10-02T18:49:35,492 creating build/lib/BODY_SCAN/FUNCTIONS 2023-10-02T18:49:35,493 copying src/FUNCTIONS/START_A_SCAN.py -> build/lib/BODY_SCAN/FUNCTIONS 2023-10-02T18:49:35,494 copying src/FUNCTIONS/START_THE_CORE_KEG.py -> build/lib/BODY_SCAN/FUNCTIONS 2023-10-02T18:49:35,496 copying src/FUNCTIONS/CHECK_STATUS_LOCATION.py -> build/lib/BODY_SCAN/FUNCTIONS 2023-10-02T18:49:35,498 creating build/lib/BODY_SCAN/AGGREGATE 2023-10-02T18:49:35,499 copying src/AGGREGATE/__init__.py -> build/lib/BODY_SCAN/AGGREGATE 2023-10-02T18:49:35,501 creating build/lib/BODY_SCAN/AGGREGATOR/KEG 2023-10-02T18:49:35,502 copying src/AGGREGATOR/KEG/__init__.py -> build/lib/BODY_SCAN/AGGREGATOR/KEG 2023-10-02T18:49:35,504 creating build/lib/BODY_SCAN/PROCESSES 2023-10-02T18:49:35,504 creating build/lib/BODY_SCAN/PROCESSES/SCAN 2023-10-02T18:49:35,505 copying src/PROCESSES/SCAN/START.py -> build/lib/BODY_SCAN/PROCESSES/SCAN 2023-10-02T18:49:35,507 creating build/lib/BODY_SCAN/PROCESSES/SCAN/KEG 2023-10-02T18:49:35,508 copying src/PROCESSES/SCAN/KEG/__init__.py -> build/lib/BODY_SCAN/PROCESSES/SCAN/KEG 2023-10-02T18:49:35,510 copying src/PROCESSES/SCAN/KEG/SCAN.py -> build/lib/BODY_SCAN/PROCESSES/SCAN/KEG 2023-10-02T18:49:35,538 /usr/local/lib/python3.11/dist-packages/setuptools/_distutils/cmd.py:66: SetuptoolsDeprecationWarning: setup.py install is deprecated. 2023-10-02T18:49:35,539 !! 2023-10-02T18:49:35,540 ******************************************************************************** 2023-10-02T18:49:35,540 Please avoid running ``setup.py`` directly. 2023-10-02T18:49:35,541 Instead, use pypa/build, pypa/installer or other 2023-10-02T18:49:35,542 standards-based tools. 2023-10-02T18:49:35,543 See https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html for details. 2023-10-02T18:49:35,543 ******************************************************************************** 2023-10-02T18:49:35,544 !! 2023-10-02T18:49:35,545 self.initialize_options() 2023-10-02T18:49:35,563 installing to build/bdist.linux-armv7l/wheel 2023-10-02T18:49:35,564 running install 2023-10-02T18:49:35,586 running install_lib 2023-10-02T18:49:35,611 creating build/bdist.linux-armv7l 2023-10-02T18:49:35,612 creating build/bdist.linux-armv7l/wheel 2023-10-02T18:49:35,613 creating build/bdist.linux-armv7l/wheel/BODY_SCAN 2023-10-02T18:49:35,615 creating build/bdist.linux-armv7l/wheel/BODY_SCAN/AGGREGATOR 2023-10-02T18:49:35,616 copying build/lib/BODY_SCAN/AGGREGATOR/START.py -> build/bdist.linux-armv7l/wheel/BODY_SCAN/AGGREGATOR 2023-10-02T18:49:35,618 creating build/bdist.linux-armv7l/wheel/BODY_SCAN/AGGREGATOR/KEG 2023-10-02T18:49:35,619 copying build/lib/BODY_SCAN/AGGREGATOR/KEG/__init__.py -> build/bdist.linux-armv7l/wheel/BODY_SCAN/AGGREGATOR/KEG 2023-10-02T18:49:35,620 copying build/lib/BODY_SCAN/__init__.py -> build/bdist.linux-armv7l/wheel/BODY_SCAN 2023-10-02T18:49:35,623 creating build/bdist.linux-armv7l/wheel/BODY_SCAN/PROCESSES 2023-10-02T18:49:35,624 creating build/bdist.linux-armv7l/wheel/BODY_SCAN/PROCESSES/SCAN 2023-10-02T18:49:35,625 copying build/lib/BODY_SCAN/PROCESSES/SCAN/START.py -> build/bdist.linux-armv7l/wheel/BODY_SCAN/PROCESSES/SCAN 2023-10-02T18:49:35,627 creating build/bdist.linux-armv7l/wheel/BODY_SCAN/PROCESSES/SCAN/KEG 2023-10-02T18:49:35,628 copying build/lib/BODY_SCAN/PROCESSES/SCAN/KEG/__init__.py -> build/bdist.linux-armv7l/wheel/BODY_SCAN/PROCESSES/SCAN/KEG 2023-10-02T18:49:35,630 copying build/lib/BODY_SCAN/PROCESSES/SCAN/KEG/SCAN.py -> build/bdist.linux-armv7l/wheel/BODY_SCAN/PROCESSES/SCAN/KEG 2023-10-02T18:49:35,632 copying build/lib/BODY_SCAN/START_MULTIPLE_PROCESSES.py -> build/bdist.linux-armv7l/wheel/BODY_SCAN 2023-10-02T18:49:35,634 creating build/bdist.linux-armv7l/wheel/BODY_SCAN/FUNCTIONS 2023-10-02T18:49:35,635 copying build/lib/BODY_SCAN/FUNCTIONS/START_A_SCAN.py -> build/bdist.linux-armv7l/wheel/BODY_SCAN/FUNCTIONS 2023-10-02T18:49:35,637 copying build/lib/BODY_SCAN/FUNCTIONS/START_THE_CORE_KEG.py -> build/bdist.linux-armv7l/wheel/BODY_SCAN/FUNCTIONS 2023-10-02T18:49:35,638 copying build/lib/BODY_SCAN/FUNCTIONS/CHECK_STATUS_LOCATION.py -> build/bdist.linux-armv7l/wheel/BODY_SCAN/FUNCTIONS 2023-10-02T18:49:35,640 creating build/bdist.linux-armv7l/wheel/BODY_SCAN/AGGREGATE 2023-10-02T18:49:35,640 copying build/lib/BODY_SCAN/AGGREGATE/__init__.py -> build/bdist.linux-armv7l/wheel/BODY_SCAN/AGGREGATE 2023-10-02T18:49:35,642 running install_egg_info 2023-10-02T18:49:35,701 running egg_info 2023-10-02T18:49:35,725 writing BODY_SCAN.egg-info/PKG-INFO 2023-10-02T18:49:35,728 writing dependency_links to BODY_SCAN.egg-info/dependency_links.txt 2023-10-02T18:49:35,729 writing requirements to BODY_SCAN.egg-info/requires.txt 2023-10-02T18:49:35,730 writing top-level names to BODY_SCAN.egg-info/top_level.txt 2023-10-02T18:49:35,759 reading manifest file 'BODY_SCAN.egg-info/SOURCES.txt' 2023-10-02T18:49:35,761 adding license file 'LICENSE' 2023-10-02T18:49:35,763 writing manifest file 'BODY_SCAN.egg-info/SOURCES.txt' 2023-10-02T18:49:35,764 Copying BODY_SCAN.egg-info to build/bdist.linux-armv7l/wheel/BODY_SCAN-0.0.17-py3.11.egg-info 2023-10-02T18:49:35,773 running install_scripts 2023-10-02T18:49:35,787 creating build/bdist.linux-armv7l/wheel/BODY_SCAN-0.0.17.dist-info/WHEEL 2023-10-02T18:49:35,789 creating '/tmp/pip-wheel-lqwfktuq/BODY_SCAN-0.0.17-py3-none-any.whl' and adding 'build/bdist.linux-armv7l/wheel' to it 2023-10-02T18:49:35,791 adding 'BODY_SCAN/START_MULTIPLE_PROCESSES.py' 2023-10-02T18:49:35,792 adding 'BODY_SCAN/__init__.py' 2023-10-02T18:49:35,794 adding 'BODY_SCAN/AGGREGATE/__init__.py' 2023-10-02T18:49:35,796 adding 'BODY_SCAN/AGGREGATOR/START.py' 2023-10-02T18:49:35,797 adding 'BODY_SCAN/AGGREGATOR/KEG/__init__.py' 2023-10-02T18:49:35,799 adding 'BODY_SCAN/FUNCTIONS/CHECK_STATUS_LOCATION.py' 2023-10-02T18:49:35,800 adding 'BODY_SCAN/FUNCTIONS/START_A_SCAN.py' 2023-10-02T18:49:35,801 adding 'BODY_SCAN/FUNCTIONS/START_THE_CORE_KEG.py' 2023-10-02T18:49:35,804 adding 'BODY_SCAN/PROCESSES/SCAN/START.py' 2023-10-02T18:49:35,805 adding 'BODY_SCAN/PROCESSES/SCAN/KEG/SCAN.py' 2023-10-02T18:49:35,807 adding 'BODY_SCAN/PROCESSES/SCAN/KEG/__init__.py' 2023-10-02T18:49:35,809 adding 'BODY_SCAN-0.0.17.dist-info/LICENSE' 2023-10-02T18:49:35,810 adding 'BODY_SCAN-0.0.17.dist-info/METADATA' 2023-10-02T18:49:35,811 adding 'BODY_SCAN-0.0.17.dist-info/WHEEL' 2023-10-02T18:49:35,812 adding 'BODY_SCAN-0.0.17.dist-info/top_level.txt' 2023-10-02T18:49:35,813 adding 'BODY_SCAN-0.0.17.dist-info/RECORD' 2023-10-02T18:49:35,814 removing build/bdist.linux-armv7l/wheel 2023-10-02T18:49:35,933 Building wheel for body-scan (setup.py): finished with status 'done' 2023-10-02T18:49:35,935 Created wheel for body-scan: filename=BODY_SCAN-0.0.17-py3-none-any.whl size=9874 sha256=a7bc1211e58ecece6a095832b16ccfe460a2cb9523e7527df3af1345d0b95546 2023-10-02T18:49:35,937 Stored in directory: /tmp/pip-ephem-wheel-cache-zyb077p5/wheels/3f/65/5d/4f7cd7566a3fa0d51dde89ca4e3e6501c58f962ce651d41688 2023-10-02T18:49:35,946 Successfully built body-scan 2023-10-02T18:49:35,950 Removed build tracker: '/tmp/pip-build-tracker-_vjudo4z'