2023-10-02T18:49:54,398 Created temporary directory: /tmp/pip-build-tracker-knn_siiw 2023-10-02T18:49:54,399 Initialized build tracking at /tmp/pip-build-tracker-knn_siiw 2023-10-02T18:49:54,400 Created build tracker: /tmp/pip-build-tracker-knn_siiw 2023-10-02T18:49:54,400 Entered build tracker: /tmp/pip-build-tracker-knn_siiw 2023-10-02T18:49:54,401 Created temporary directory: /tmp/pip-wheel-ug3j9xhj 2023-10-02T18:49:54,404 Created temporary directory: /tmp/pip-ephem-wheel-cache-9ku2flrb 2023-10-02T18:49:54,426 Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple 2023-10-02T18:49:54,429 2 location(s) to search for versions of body-scan: 2023-10-02T18:49:54,429 * https://pypi.org/simple/body-scan/ 2023-10-02T18:49:54,429 * https://www.piwheels.org/simple/body-scan/ 2023-10-02T18:49:54,430 Fetching project page and analyzing links: https://pypi.org/simple/body-scan/ 2023-10-02T18:49:54,431 Getting page https://pypi.org/simple/body-scan/ 2023-10-02T18:49:54,433 Found index url https://pypi.org/simple/ 2023-10-02T18:49:54,572 Fetched page https://pypi.org/simple/body-scan/ as application/vnd.pypi.simple.v1+json 2023-10-02T18:49:54,576 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:54,576 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:54,577 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:54,577 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:54,578 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:54,579 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:54,580 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:54,581 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:54,581 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:54,582 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:54,583 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:54,583 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:54,584 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:54,585 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:54,585 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:54,586 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:54,587 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:54,587 Fetching project page and analyzing links: https://www.piwheels.org/simple/body-scan/ 2023-10-02T18:49:54,588 Getting page https://www.piwheels.org/simple/body-scan/ 2023-10-02T18:49:54,589 Found index url https://www.piwheels.org/simple/ 2023-10-02T18:49:54,744 Fetched page https://www.piwheels.org/simple/body-scan/ as text/html 2023-10-02T18:49:54,749 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:54,749 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:54,750 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:54,750 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:54,751 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:54,751 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:54,752 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:54,753 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:54,753 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:54,754 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:54,754 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:54,755 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:54,755 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:54,756 Skipping link: not a file: https://www.piwheels.org/simple/body-scan/ 2023-10-02T18:49:54,756 Skipping link: not a file: https://pypi.org/simple/body-scan/ 2023-10-02T18:49:54,776 Given no hashes to check 1 links for project 'body-scan': discarding no candidates 2023-10-02T18:49:54,794 Collecting body-scan==0.0.18 2023-10-02T18:49:54,797 Created temporary directory: /tmp/pip-unpack-2ek0l1hq 2023-10-02T18:49:55,017 Downloading BODY_SCAN-0.0.18.tar.gz (7.2 kB) 2023-10-02T18:49:55,064 Added body-scan==0.0.18 from https://files.pythonhosted.org/packages/fe/0c/4536463d789cd0af663160d6067ee38f781a94d3f32d0813f768043ad5d9/BODY_SCAN-0.0.18.tar.gz to build tracker '/tmp/pip-build-tracker-knn_siiw' 2023-10-02T18:49:55,065 Running setup.py (path:/tmp/pip-wheel-ug3j9xhj/body-scan_3c2e0599b6fd414786bea4b55141e673/setup.py) egg_info for package body-scan 2023-10-02T18:49:55,066 Created temporary directory: /tmp/pip-pip-egg-info-8e4vz4x2 2023-10-02T18:49:55,067 Preparing metadata (setup.py): started 2023-10-02T18:49:55,068 Running command python setup.py egg_info 2023-10-02T18:49:56,117 # BODY SCAN 2023-10-02T18:49:56,118 ## EXAMPLE OUTPUT: 2023-10-02T18:49:56,118 ```JSON 2023-10-02T18:49:56,119 { 2023-10-02T18:49:56,119 "PATHS": [ 2023-10-02T18:49:56,120 { 2023-10-02T18:49:56,120 "PATH": "PATH_1_HEALTH.py", 2023-10-02T18:49:56,121 "STATS": { 2023-10-02T18:49:56,121 "PASSES": 2, 2023-10-02T18:49:56,122 "ALARMS": 1 2023-10-02T18:49:56,123 }, 2023-10-02T18:49:56,123 "CHECKS": [ 2023-10-02T18:49:56,124 { 2023-10-02T18:49:56,124 "CHECK": "CHECK 1", 2023-10-02T18:49:56,125 "PASSED": true, 2023-10-02T18:49:56,125 "ELAPSED": [ 2023-10-02T18:49:56,126 5.320599666447379e-05, 2023-10-02T18:49:56,126 "SECONDS" 2023-10-02T18:49:56,127 ] 2023-10-02T18:49:56,128 }, 2023-10-02T18:49:56,128 { 2023-10-02T18:49:56,129 "CHECK": "CHECK 2", 2023-10-02T18:49:56,129 "PASSED": true, 2023-10-02T18:49:56,130 "ELAPSED": [ 2023-10-02T18:49:56,131 1.0949999705189839e-05, 2023-10-02T18:49:56,131 "SECONDS" 2023-10-02T18:49:56,132 ] 2023-10-02T18:49:56,132 }, 2023-10-02T18:49:56,133 { 2023-10-02T18:49:56,134 "CHECK": "CHECK 3", 2023-10-02T18:49:56,134 "PASSED": false, 2023-10-02T18:49:56,135 "EXCEPTION": "Exception('NOT 100%')", 2023-10-02T18:49:56,135 "EXCEPTION TRACE": [ 2023-10-02T18:49:56,136 "Traceback (most recent call last):", 2023-10-02T18:49:56,136 " File \"/REPTILIAN_CLIMATES/MODULES/BODY_SCAN/src/SCAN_PROC/KEG/SCAN.py\", line 69, in SCAN", 2023-10-02T18:49:56,137 " CHECKS [ CHECK ] ()", 2023-10-02T18:49:56,138 " File \"\", line 24, in CHECK_3", 2023-10-02T18:49:56,138 "Exception: NOT 100%" 2023-10-02T18:49:56,139 ] 2023-10-02T18:49:56,139 } 2023-10-02T18:49:56,140 ] 2023-10-02T18:49:56,141 }, 2023-10-02T18:49:56,141 { 2023-10-02T18:49:56,142 "PATH": "PATH_2_HEALTH.py", 2023-10-02T18:49:56,142 "EMPTY": true 2023-10-02T18:49:56,143 } 2023-10-02T18:49:56,143 ], 2023-10-02T18:49:56,143 "STATS": { 2023-10-02T18:49:56,144 "EMPTY": 1, 2023-10-02T18:49:56,144 "CHECKS": { 2023-10-02T18:49:56,145 "PASSES": 2, 2023-10-02T18:49:56,145 "ALARMS": 1 2023-10-02T18:49:56,146 } 2023-10-02T18:49:56,146 } 2023-10-02T18:49:56,147 } 2023-10-02T18:49:56,147 ``` 2023-10-02T18:49:56,148 ## HOW TO WRITE CHECKS: 2023-10-02T18:49:56,149 The "CHECKS" dictionary is retrieved with the python "exec" 2023-10-02T18:49:56,149 and then each "CHECK" in "CHECKS" is run. 2023-10-02T18:49:56,150 These checks correspond to the example output shown above. 2023-10-02T18:49:56,151 ``` 2023-10-02T18:49:56,151 PATH_1_HEALTH.py 2023-10-02T18:49:56,151 ``` 2023-10-02T18:49:56,152 ``` 2023-10-02T18:49:56,152 def CHECK_1 (): 2023-10-02T18:49:56,153 print ("CHECK 1") 2023-10-02T18:49:56,154 def CHECK_2 (): 2023-10-02T18:49:56,154 print ("CHECK 2") 2023-10-02T18:49:56,155 def CHECK_3 (): 2023-10-02T18:49:56,156 raise Exception ("NOT 100%") 2023-10-02T18:49:56,156 CHECKS = { 2023-10-02T18:49:56,157 "CHECK 1": CHECK_1, 2023-10-02T18:49:56,157 "CHECK 2": CHECK_2, 2023-10-02T18:49:56,158 "CHECK 3": CHECK_3 2023-10-02T18:49:56,158 } 2023-10-02T18:49:56,159 ``` 2023-10-02T18:49:56,159 ``` 2023-10-02T18:49:56,159 PATH_2_HEALTH.py 2023-10-02T18:49:56,160 ``` 2023-10-02T18:49:56,160 ``` 2023-10-02T18:49:56,161 # 2023-10-02T18:49:56,161 # There isn't a "CHECKS" dictionary present, 2023-10-02T18:49:56,162 # so the scanner reports: 2023-10-02T18:49:56,162 # 2023-10-02T18:49:56,163 # "EMPTY": true 2023-10-02T18:49:56,163 # 2023-10-02T18:49:56,164 ``` 2023-10-02T18:49:56,165 ## HOW TO START THE BODY SCANNER 2023-10-02T18:49:56,166 ```python3 2023-10-02T18:49:56,166 import BODY_SCAN 2023-10-02T18:49:56,167 import pathlib 2023-10-02T18:49:56,168 THIS_FOLDER = pathlib.Path (__file__).parent.resolve () 2023-10-02T18:49:56,169 from os.path import dirname, join, normpath 2023-10-02T18:49:56,170 SEARCH = normpath (join (THIS_FOLDER, "MODULE")) 2023-10-02T18:49:56,171 SCAN = BODY_SCAN.START ( 2023-10-02T18:49:56,172 # 2023-10-02T18:49:56,172 # REQUIRED 2023-10-02T18:49:56,173 # This is all the files that are sent to the scanner. 2023-10-02T18:49:56,174 # 2023-10-02T18:49:56,174 GLOB = SEARCH + '/**/*HEALTH.py', 2023-10-02T18:49:56,176 # 2023-10-02T18:49:56,176 # OPTIONAL 2023-10-02T18:49:56,177 # These are the folders that are added to "sys.path" 2023-10-02T18:49:56,177 # 2023-10-02T18:49:56,178 MODULE_PATHS = [ 2023-10-02T18:49:56,178 normpath (join (SEARCH, "MODULES")) 2023-10-02T18:49:56,179 ], 2023-10-02T18:49:56,180 # 2023-10-02T18:49:56,180 # OPTIONAL 2023-10-02T18:49:56,181 # This is the folder path to remove from the paths in the output. 2023-10-02T18:49:56,182 # 2023-10-02T18:49:56,182 RELATIVE_PATH = SEARCH 2023-10-02T18:49:56,183 ) 2023-10-02T18:49:56,183 ``` 2023-10-02T18:49:56,184 ### NOTES 2023-10-02T18:49:56,185 ``` 2023-10-02T18:49:56,185 Currently all the checks aren't run in parallel, 2023-10-02T18:49:56,186 but sequential order of paths found in glob is not guaranteed. 2023-10-02T18:49:56,186 ``` 2023-10-02T18:49:56,187 ``` 2023-10-02T18:49:56,188 Each check suite found by the glob is started by 2023-10-02T18:49:56,188 a process with a flask API, that is opened on the first available port found. 2023-10-02T18:49:56,189 ``` 2023-10-02T18:49:56,190 running egg_info 2023-10-02T18:49:56,191 creating /tmp/pip-pip-egg-info-8e4vz4x2/BODY_SCAN.egg-info 2023-10-02T18:49:56,192 writing /tmp/pip-pip-egg-info-8e4vz4x2/BODY_SCAN.egg-info/PKG-INFO 2023-10-02T18:49:56,192 writing dependency_links to /tmp/pip-pip-egg-info-8e4vz4x2/BODY_SCAN.egg-info/dependency_links.txt 2023-10-02T18:49:56,193 writing requirements to /tmp/pip-pip-egg-info-8e4vz4x2/BODY_SCAN.egg-info/requires.txt 2023-10-02T18:49:56,194 writing top-level names to /tmp/pip-pip-egg-info-8e4vz4x2/BODY_SCAN.egg-info/top_level.txt 2023-10-02T18:49:56,194 writing manifest file '/tmp/pip-pip-egg-info-8e4vz4x2/BODY_SCAN.egg-info/SOURCES.txt' 2023-10-02T18:49:56,247 reading manifest file '/tmp/pip-pip-egg-info-8e4vz4x2/BODY_SCAN.egg-info/SOURCES.txt' 2023-10-02T18:49:56,249 adding license file 'LICENSE' 2023-10-02T18:49:56,250 writing manifest file '/tmp/pip-pip-egg-info-8e4vz4x2/BODY_SCAN.egg-info/SOURCES.txt' 2023-10-02T18:49:56,359 Preparing metadata (setup.py): finished with status 'done' 2023-10-02T18:49:56,363 Source in /tmp/pip-wheel-ug3j9xhj/body-scan_3c2e0599b6fd414786bea4b55141e673 has version 0.0.18, which satisfies requirement body-scan==0.0.18 from https://files.pythonhosted.org/packages/fe/0c/4536463d789cd0af663160d6067ee38f781a94d3f32d0813f768043ad5d9/BODY_SCAN-0.0.18.tar.gz 2023-10-02T18:49:56,364 Removed body-scan==0.0.18 from https://files.pythonhosted.org/packages/fe/0c/4536463d789cd0af663160d6067ee38f781a94d3f32d0813f768043ad5d9/BODY_SCAN-0.0.18.tar.gz from build tracker '/tmp/pip-build-tracker-knn_siiw' 2023-10-02T18:49:56,369 Created temporary directory: /tmp/pip-unpack-02_ltppb 2023-10-02T18:49:56,370 Created temporary directory: /tmp/pip-unpack-w3i9pmu2 2023-10-02T18:49:56,375 Building wheels for collected packages: body-scan 2023-10-02T18:49:56,379 Created temporary directory: /tmp/pip-wheel-emlrndj5 2023-10-02T18:49:56,380 Building wheel for body-scan (setup.py): started 2023-10-02T18:49:56,381 Destination directory: /tmp/pip-wheel-emlrndj5 2023-10-02T18:49:56,381 Running command python setup.py bdist_wheel 2023-10-02T18:49:56,784 # BODY SCAN 2023-10-02T18:49:56,785 ## EXAMPLE OUTPUT: 2023-10-02T18:49:56,786 ```JSON 2023-10-02T18:49:56,786 { 2023-10-02T18:49:56,787 "PATHS": [ 2023-10-02T18:49:56,787 { 2023-10-02T18:49:56,788 "PATH": "PATH_1_HEALTH.py", 2023-10-02T18:49:56,788 "STATS": { 2023-10-02T18:49:56,789 "PASSES": 2, 2023-10-02T18:49:56,790 "ALARMS": 1 2023-10-02T18:49:56,790 }, 2023-10-02T18:49:56,791 "CHECKS": [ 2023-10-02T18:49:56,792 { 2023-10-02T18:49:56,792 "CHECK": "CHECK 1", 2023-10-02T18:49:56,793 "PASSED": true, 2023-10-02T18:49:56,794 "ELAPSED": [ 2023-10-02T18:49:56,794 5.320599666447379e-05, 2023-10-02T18:49:56,795 "SECONDS" 2023-10-02T18:49:56,795 ] 2023-10-02T18:49:56,796 }, 2023-10-02T18:49:56,796 { 2023-10-02T18:49:56,797 "CHECK": "CHECK 2", 2023-10-02T18:49:56,798 "PASSED": true, 2023-10-02T18:49:56,798 "ELAPSED": [ 2023-10-02T18:49:56,799 1.0949999705189839e-05, 2023-10-02T18:49:56,799 "SECONDS" 2023-10-02T18:49:56,800 ] 2023-10-02T18:49:56,800 }, 2023-10-02T18:49:56,801 { 2023-10-02T18:49:56,801 "CHECK": "CHECK 3", 2023-10-02T18:49:56,802 "PASSED": false, 2023-10-02T18:49:56,802 "EXCEPTION": "Exception('NOT 100%')", 2023-10-02T18:49:56,803 "EXCEPTION TRACE": [ 2023-10-02T18:49:56,803 "Traceback (most recent call last):", 2023-10-02T18:49:56,804 " File \"/REPTILIAN_CLIMATES/MODULES/BODY_SCAN/src/SCAN_PROC/KEG/SCAN.py\", line 69, in SCAN", 2023-10-02T18:49:56,805 " CHECKS [ CHECK ] ()", 2023-10-02T18:49:56,805 " File \"\", line 24, in CHECK_3", 2023-10-02T18:49:56,806 "Exception: NOT 100%" 2023-10-02T18:49:56,807 ] 2023-10-02T18:49:56,807 } 2023-10-02T18:49:56,808 ] 2023-10-02T18:49:56,808 }, 2023-10-02T18:49:56,808 { 2023-10-02T18:49:56,809 "PATH": "PATH_2_HEALTH.py", 2023-10-02T18:49:56,809 "EMPTY": true 2023-10-02T18:49:56,810 } 2023-10-02T18:49:56,810 ], 2023-10-02T18:49:56,811 "STATS": { 2023-10-02T18:49:56,811 "EMPTY": 1, 2023-10-02T18:49:56,811 "CHECKS": { 2023-10-02T18:49:56,812 "PASSES": 2, 2023-10-02T18:49:56,812 "ALARMS": 1 2023-10-02T18:49:56,813 } 2023-10-02T18:49:56,813 } 2023-10-02T18:49:56,814 } 2023-10-02T18:49:56,814 ``` 2023-10-02T18:49:56,815 ## HOW TO WRITE CHECKS: 2023-10-02T18:49:56,816 The "CHECKS" dictionary is retrieved with the python "exec" 2023-10-02T18:49:56,816 and then each "CHECK" in "CHECKS" is run. 2023-10-02T18:49:56,817 These checks correspond to the example output shown above. 2023-10-02T18:49:56,818 ``` 2023-10-02T18:49:56,818 PATH_1_HEALTH.py 2023-10-02T18:49:56,819 ``` 2023-10-02T18:49:56,819 ``` 2023-10-02T18:49:56,820 def CHECK_1 (): 2023-10-02T18:49:56,820 print ("CHECK 1") 2023-10-02T18:49:56,821 def CHECK_2 (): 2023-10-02T18:49:56,822 print ("CHECK 2") 2023-10-02T18:49:56,822 def CHECK_3 (): 2023-10-02T18:49:56,823 raise Exception ("NOT 100%") 2023-10-02T18:49:56,824 CHECKS = { 2023-10-02T18:49:56,824 "CHECK 1": CHECK_1, 2023-10-02T18:49:56,825 "CHECK 2": CHECK_2, 2023-10-02T18:49:56,825 "CHECK 3": CHECK_3 2023-10-02T18:49:56,826 } 2023-10-02T18:49:56,826 ``` 2023-10-02T18:49:56,827 ``` 2023-10-02T18:49:56,827 PATH_2_HEALTH.py 2023-10-02T18:49:56,828 ``` 2023-10-02T18:49:56,828 ``` 2023-10-02T18:49:56,829 # 2023-10-02T18:49:56,829 # There isn't a "CHECKS" dictionary present, 2023-10-02T18:49:56,830 # so the scanner reports: 2023-10-02T18:49:56,830 # 2023-10-02T18:49:56,831 # "EMPTY": true 2023-10-02T18:49:56,832 # 2023-10-02T18:49:56,832 ``` 2023-10-02T18:49:56,833 ## HOW TO START THE BODY SCANNER 2023-10-02T18:49:56,834 ```python3 2023-10-02T18:49:56,835 import BODY_SCAN 2023-10-02T18:49:56,836 import pathlib 2023-10-02T18:49:56,837 THIS_FOLDER = pathlib.Path (__file__).parent.resolve () 2023-10-02T18:49:56,838 from os.path import dirname, join, normpath 2023-10-02T18:49:56,838 SEARCH = normpath (join (THIS_FOLDER, "MODULE")) 2023-10-02T18:49:56,840 SCAN = BODY_SCAN.START ( 2023-10-02T18:49:56,840 # 2023-10-02T18:49:56,841 # REQUIRED 2023-10-02T18:49:56,842 # This is all the files that are sent to the scanner. 2023-10-02T18:49:56,842 # 2023-10-02T18:49:56,843 GLOB = SEARCH + '/**/*HEALTH.py', 2023-10-02T18:49:56,844 # 2023-10-02T18:49:56,844 # OPTIONAL 2023-10-02T18:49:56,845 # These are the folders that are added to "sys.path" 2023-10-02T18:49:56,845 # 2023-10-02T18:49:56,846 MODULE_PATHS = [ 2023-10-02T18:49:56,846 normpath (join (SEARCH, "MODULES")) 2023-10-02T18:49:56,847 ], 2023-10-02T18:49:56,848 # 2023-10-02T18:49:56,848 # OPTIONAL 2023-10-02T18:49:56,849 # This is the folder path to remove from the paths in the output. 2023-10-02T18:49:56,850 # 2023-10-02T18:49:56,850 RELATIVE_PATH = SEARCH 2023-10-02T18:49:56,851 ) 2023-10-02T18:49:56,851 ``` 2023-10-02T18:49:56,852 ### NOTES 2023-10-02T18:49:56,853 ``` 2023-10-02T18:49:56,853 Currently all the checks aren't run in parallel, 2023-10-02T18:49:56,854 but sequential order of paths found in glob is not guaranteed. 2023-10-02T18:49:56,855 ``` 2023-10-02T18:49:56,855 ``` 2023-10-02T18:49:56,856 Each check suite found by the glob is started by 2023-10-02T18:49:56,856 a process with a flask API, that is opened on the first available port found. 2023-10-02T18:49:56,857 ``` 2023-10-02T18:49:57,381 running bdist_wheel 2023-10-02T18:49:57,474 running build 2023-10-02T18:49:57,474 running build_py 2023-10-02T18:49:57,501 creating build 2023-10-02T18:49:57,501 creating build/lib 2023-10-02T18:49:57,502 creating build/lib/BODY_SCAN 2023-10-02T18:49:57,503 copying STRUCTURE/MODULES/BODY_SCAN/START_MULTIPLE_PROCESSES.py -> build/lib/BODY_SCAN 2023-10-02T18:49:57,505 copying STRUCTURE/MODULES/BODY_SCAN/__init__.py -> build/lib/BODY_SCAN 2023-10-02T18:49:57,507 creating build/lib/BODY_SCAN/FUNCTIONS 2023-10-02T18:49:57,508 copying STRUCTURE/MODULES/BODY_SCAN/FUNCTIONS/START_THE_CORE_KEG.py -> build/lib/BODY_SCAN/FUNCTIONS 2023-10-02T18:49:57,509 copying STRUCTURE/MODULES/BODY_SCAN/FUNCTIONS/CHECK_STATUS_LOCATION.py -> build/lib/BODY_SCAN/FUNCTIONS 2023-10-02T18:49:57,511 copying STRUCTURE/MODULES/BODY_SCAN/FUNCTIONS/START_A_SCAN.py -> build/lib/BODY_SCAN/FUNCTIONS 2023-10-02T18:49:57,513 creating build/lib/BODY_SCAN/AGGREGATE 2023-10-02T18:49:57,514 copying STRUCTURE/MODULES/BODY_SCAN/AGGREGATE/__init__.py -> build/lib/BODY_SCAN/AGGREGATE 2023-10-02T18:49:57,516 creating build/lib/BODY_SCAN/AGGREGATOR 2023-10-02T18:49:57,517 copying STRUCTURE/MODULES/BODY_SCAN/AGGREGATOR/START.py -> build/lib/BODY_SCAN/AGGREGATOR 2023-10-02T18:49:57,519 creating build/lib/BODY_SCAN/PROCESSES 2023-10-02T18:49:57,520 creating build/lib/BODY_SCAN/PROCESSES/SCAN 2023-10-02T18:49:57,521 copying STRUCTURE/MODULES/BODY_SCAN/PROCESSES/SCAN/START.py -> build/lib/BODY_SCAN/PROCESSES/SCAN 2023-10-02T18:49:57,523 creating build/lib/BODY_SCAN/PROCESSES/SCAN/KEG 2023-10-02T18:49:57,524 copying STRUCTURE/MODULES/BODY_SCAN/PROCESSES/SCAN/KEG/__init__.py -> build/lib/BODY_SCAN/PROCESSES/SCAN/KEG 2023-10-02T18:49:57,525 copying STRUCTURE/MODULES/BODY_SCAN/PROCESSES/SCAN/KEG/SCAN.py -> build/lib/BODY_SCAN/PROCESSES/SCAN/KEG 2023-10-02T18:49:57,528 creating build/lib/BODY_SCAN/AGGREGATOR/KEG 2023-10-02T18:49:57,528 copying STRUCTURE/MODULES/BODY_SCAN/AGGREGATOR/KEG/__init__.py -> build/lib/BODY_SCAN/AGGREGATOR/KEG 2023-10-02T18:49:57,558 /usr/local/lib/python3.11/dist-packages/setuptools/_distutils/cmd.py:66: SetuptoolsDeprecationWarning: setup.py install is deprecated. 2023-10-02T18:49:57,559 !! 2023-10-02T18:49:57,560 ******************************************************************************** 2023-10-02T18:49:57,560 Please avoid running ``setup.py`` directly. 2023-10-02T18:49:57,561 Instead, use pypa/build, pypa/installer or other 2023-10-02T18:49:57,562 standards-based tools. 2023-10-02T18:49:57,563 See https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html for details. 2023-10-02T18:49:57,563 ******************************************************************************** 2023-10-02T18:49:57,564 !! 2023-10-02T18:49:57,565 self.initialize_options() 2023-10-02T18:49:57,582 installing to build/bdist.linux-armv7l/wheel 2023-10-02T18:49:57,583 running install 2023-10-02T18:49:57,606 running install_lib 2023-10-02T18:49:57,630 creating build/bdist.linux-armv7l 2023-10-02T18:49:57,630 creating build/bdist.linux-armv7l/wheel 2023-10-02T18:49:57,632 creating build/bdist.linux-armv7l/wheel/BODY_SCAN 2023-10-02T18:49:57,633 creating build/bdist.linux-armv7l/wheel/BODY_SCAN/FUNCTIONS 2023-10-02T18:49:57,634 copying build/lib/BODY_SCAN/FUNCTIONS/START_THE_CORE_KEG.py -> build/bdist.linux-armv7l/wheel/BODY_SCAN/FUNCTIONS 2023-10-02T18:49:57,636 copying build/lib/BODY_SCAN/FUNCTIONS/CHECK_STATUS_LOCATION.py -> build/bdist.linux-armv7l/wheel/BODY_SCAN/FUNCTIONS 2023-10-02T18:49:57,638 copying build/lib/BODY_SCAN/FUNCTIONS/START_A_SCAN.py -> build/bdist.linux-armv7l/wheel/BODY_SCAN/FUNCTIONS 2023-10-02T18:49:57,640 creating build/bdist.linux-armv7l/wheel/BODY_SCAN/PROCESSES 2023-10-02T18:49:57,641 creating build/bdist.linux-armv7l/wheel/BODY_SCAN/PROCESSES/SCAN 2023-10-02T18:49:57,642 creating build/bdist.linux-armv7l/wheel/BODY_SCAN/PROCESSES/SCAN/KEG 2023-10-02T18:49:57,643 copying build/lib/BODY_SCAN/PROCESSES/SCAN/KEG/__init__.py -> build/bdist.linux-armv7l/wheel/BODY_SCAN/PROCESSES/SCAN/KEG 2023-10-02T18:49:57,645 copying build/lib/BODY_SCAN/PROCESSES/SCAN/KEG/SCAN.py -> build/bdist.linux-armv7l/wheel/BODY_SCAN/PROCESSES/SCAN/KEG 2023-10-02T18:49:57,647 copying build/lib/BODY_SCAN/PROCESSES/SCAN/START.py -> build/bdist.linux-armv7l/wheel/BODY_SCAN/PROCESSES/SCAN 2023-10-02T18:49:57,649 copying build/lib/BODY_SCAN/START_MULTIPLE_PROCESSES.py -> build/bdist.linux-armv7l/wheel/BODY_SCAN 2023-10-02T18:49:57,650 copying build/lib/BODY_SCAN/__init__.py -> build/bdist.linux-armv7l/wheel/BODY_SCAN 2023-10-02T18:49:57,652 creating build/bdist.linux-armv7l/wheel/BODY_SCAN/AGGREGATE 2023-10-02T18:49:57,653 copying build/lib/BODY_SCAN/AGGREGATE/__init__.py -> build/bdist.linux-armv7l/wheel/BODY_SCAN/AGGREGATE 2023-10-02T18:49:57,655 creating build/bdist.linux-armv7l/wheel/BODY_SCAN/AGGREGATOR 2023-10-02T18:49:57,656 creating build/bdist.linux-armv7l/wheel/BODY_SCAN/AGGREGATOR/KEG 2023-10-02T18:49:57,657 copying build/lib/BODY_SCAN/AGGREGATOR/KEG/__init__.py -> build/bdist.linux-armv7l/wheel/BODY_SCAN/AGGREGATOR/KEG 2023-10-02T18:49:57,659 copying build/lib/BODY_SCAN/AGGREGATOR/START.py -> build/bdist.linux-armv7l/wheel/BODY_SCAN/AGGREGATOR 2023-10-02T18:49:57,660 running install_egg_info 2023-10-02T18:49:57,719 running egg_info 2023-10-02T18:49:57,742 writing BODY_SCAN.egg-info/PKG-INFO 2023-10-02T18:49:57,745 writing dependency_links to BODY_SCAN.egg-info/dependency_links.txt 2023-10-02T18:49:57,747 writing requirements to BODY_SCAN.egg-info/requires.txt 2023-10-02T18:49:57,748 writing top-level names to BODY_SCAN.egg-info/top_level.txt 2023-10-02T18:49:57,776 reading manifest file 'BODY_SCAN.egg-info/SOURCES.txt' 2023-10-02T18:49:57,778 adding license file 'LICENSE' 2023-10-02T18:49:57,780 writing manifest file 'BODY_SCAN.egg-info/SOURCES.txt' 2023-10-02T18:49:57,782 Copying BODY_SCAN.egg-info to build/bdist.linux-armv7l/wheel/BODY_SCAN-0.0.18-py3.11.egg-info 2023-10-02T18:49:57,795 running install_scripts 2023-10-02T18:49:57,808 creating build/bdist.linux-armv7l/wheel/BODY_SCAN-0.0.18.dist-info/WHEEL 2023-10-02T18:49:57,810 creating '/tmp/pip-wheel-emlrndj5/BODY_SCAN-0.0.18-py3-none-any.whl' and adding 'build/bdist.linux-armv7l/wheel' to it 2023-10-02T18:49:57,813 adding 'BODY_SCAN/START_MULTIPLE_PROCESSES.py' 2023-10-02T18:49:57,814 adding 'BODY_SCAN/__init__.py' 2023-10-02T18:49:57,816 adding 'BODY_SCAN/AGGREGATE/__init__.py' 2023-10-02T18:49:57,817 adding 'BODY_SCAN/AGGREGATOR/START.py' 2023-10-02T18:49:57,819 adding 'BODY_SCAN/AGGREGATOR/KEG/__init__.py' 2023-10-02T18:49:57,821 adding 'BODY_SCAN/FUNCTIONS/CHECK_STATUS_LOCATION.py' 2023-10-02T18:49:57,822 adding 'BODY_SCAN/FUNCTIONS/START_A_SCAN.py' 2023-10-02T18:49:57,823 adding 'BODY_SCAN/FUNCTIONS/START_THE_CORE_KEG.py' 2023-10-02T18:49:57,825 adding 'BODY_SCAN/PROCESSES/SCAN/START.py' 2023-10-02T18:49:57,827 adding 'BODY_SCAN/PROCESSES/SCAN/KEG/SCAN.py' 2023-10-02T18:49:57,829 adding 'BODY_SCAN/PROCESSES/SCAN/KEG/__init__.py' 2023-10-02T18:49:57,830 adding 'BODY_SCAN-0.0.18.dist-info/LICENSE' 2023-10-02T18:49:57,832 adding 'BODY_SCAN-0.0.18.dist-info/METADATA' 2023-10-02T18:49:57,833 adding 'BODY_SCAN-0.0.18.dist-info/WHEEL' 2023-10-02T18:49:57,834 adding 'BODY_SCAN-0.0.18.dist-info/top_level.txt' 2023-10-02T18:49:57,835 adding 'BODY_SCAN-0.0.18.dist-info/RECORD' 2023-10-02T18:49:57,836 removing build/bdist.linux-armv7l/wheel 2023-10-02T18:49:57,955 Building wheel for body-scan (setup.py): finished with status 'done' 2023-10-02T18:49:57,957 Created wheel for body-scan: filename=BODY_SCAN-0.0.18-py3-none-any.whl size=9876 sha256=ef0307789f7458e893b0c5dbb050b7f558c09c450461a20ddfb5a66b8c307436 2023-10-02T18:49:57,959 Stored in directory: /tmp/pip-ephem-wheel-cache-9ku2flrb/wheels/0b/48/b0/bd3d8e2a2ca9987e58168c12070b7575b3181160e4efe1c88c 2023-10-02T18:49:57,969 Successfully built body-scan 2023-10-02T18:49:57,972 Removed build tracker: '/tmp/pip-build-tracker-knn_siiw'