2023-10-02T17:54:53,666 Created temporary directory: /tmp/pip-build-tracker-arph_ttv 2023-10-02T17:54:53,667 Initialized build tracking at /tmp/pip-build-tracker-arph_ttv 2023-10-02T17:54:53,667 Created build tracker: /tmp/pip-build-tracker-arph_ttv 2023-10-02T17:54:53,668 Entered build tracker: /tmp/pip-build-tracker-arph_ttv 2023-10-02T17:54:53,669 Created temporary directory: /tmp/pip-wheel-p1213f9f 2023-10-02T17:54:53,672 Created temporary directory: /tmp/pip-ephem-wheel-cache-5pz6n2vn 2023-10-02T17:54:53,693 Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple 2023-10-02T17:54:53,697 2 location(s) to search for versions of body-scan: 2023-10-02T17:54:53,697 * https://pypi.org/simple/body-scan/ 2023-10-02T17:54:53,697 * https://www.piwheels.org/simple/body-scan/ 2023-10-02T17:54:53,697 Fetching project page and analyzing links: https://pypi.org/simple/body-scan/ 2023-10-02T17:54:53,698 Getting page https://pypi.org/simple/body-scan/ 2023-10-02T17:54:53,700 Found index url https://pypi.org/simple/ 2023-10-02T17:54:53,838 Fetched page https://pypi.org/simple/body-scan/ as application/vnd.pypi.simple.v1+json 2023-10-02T17:54:53,842 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-02T17:54:53,843 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-02T17:54:53,843 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-02T17:54:53,844 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-02T17:54:53,845 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-02T17:54:53,845 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-02T17:54:53,846 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-02T17:54:53,847 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-02T17:54:53,847 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-02T17:54:53,848 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-02T17:54:53,849 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-02T17:54:53,849 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-02T17:54:53,850 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-02T17:54:53,851 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-02T17:54:53,852 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-02T17:54:53,852 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-02T17:54:53,853 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-02T17:54:53,854 Fetching project page and analyzing links: https://www.piwheels.org/simple/body-scan/ 2023-10-02T17:54:53,854 Getting page https://www.piwheels.org/simple/body-scan/ 2023-10-02T17:54:53,855 Found index url https://www.piwheels.org/simple/ 2023-10-02T17:54:54,019 Fetched page https://www.piwheels.org/simple/body-scan/ as text/html 2023-10-02T17:54:54,023 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-02T17:54:54,024 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-02T17:54:54,024 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-02T17:54:54,025 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-02T17:54:54,026 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-02T17:54:54,026 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-02T17:54:54,027 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-02T17:54:54,027 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-02T17:54:54,028 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-02T17:54:54,028 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-02T17:54:54,029 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-02T17:54:54,029 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-02T17:54:54,030 Skipping link: not a file: https://www.piwheels.org/simple/body-scan/ 2023-10-02T17:54:54,031 Skipping link: not a file: https://pypi.org/simple/body-scan/ 2023-10-02T17:54:54,052 Given no hashes to check 1 links for project 'body-scan': discarding no candidates 2023-10-02T17:54:54,072 Collecting body-scan==0.0.16 2023-10-02T17:54:54,074 Created temporary directory: /tmp/pip-unpack-jbfnx0zg 2023-10-02T17:54:54,286 Downloading BODY_SCAN-0.0.16.tar.gz (7.0 kB) 2023-10-02T17:54:54,331 Added body-scan==0.0.16 from https://files.pythonhosted.org/packages/4a/7b/2bf405077a418312446509ddabd2c8d002e8af140f7793ccddf28678961d/BODY_SCAN-0.0.16.tar.gz to build tracker '/tmp/pip-build-tracker-arph_ttv' 2023-10-02T17:54:54,333 Running setup.py (path:/tmp/pip-wheel-p1213f9f/body-scan_bddf1879aec34cf8831d62880250bd50/setup.py) egg_info for package body-scan 2023-10-02T17:54:54,334 Created temporary directory: /tmp/pip-pip-egg-info-za50ymao 2023-10-02T17:54:54,335 Preparing metadata (setup.py): started 2023-10-02T17:54:54,336 Running command python setup.py egg_info 2023-10-02T17:54:55,380 # BODY SCAN 2023-10-02T17:54:55,381 ## EXAMPLE OUTPUT: 2023-10-02T17:54:55,382 ```JSON 2023-10-02T17:54:55,382 { 2023-10-02T17:54:55,383 "PATHS": [ 2023-10-02T17:54:55,383 { 2023-10-02T17:54:55,384 "PATH": "PATH_1_HEALTH.py", 2023-10-02T17:54:55,385 "STATS": { 2023-10-02T17:54:55,385 "PASSES": 2, 2023-10-02T17:54:55,386 "ALARMS": 1 2023-10-02T17:54:55,386 }, 2023-10-02T17:54:55,387 "CHECKS": [ 2023-10-02T17:54:55,387 { 2023-10-02T17:54:55,388 "CHECK": "CHECK 1", 2023-10-02T17:54:55,389 "PASSED": true, 2023-10-02T17:54:55,389 "ELAPSED": [ 2023-10-02T17:54:55,390 5.320599666447379e-05, 2023-10-02T17:54:55,390 "SECONDS" 2023-10-02T17:54:55,391 ] 2023-10-02T17:54:55,391 }, 2023-10-02T17:54:55,392 { 2023-10-02T17:54:55,393 "CHECK": "CHECK 2", 2023-10-02T17:54:55,393 "PASSED": true, 2023-10-02T17:54:55,394 "ELAPSED": [ 2023-10-02T17:54:55,394 1.0949999705189839e-05, 2023-10-02T17:54:55,395 "SECONDS" 2023-10-02T17:54:55,395 ] 2023-10-02T17:54:55,396 }, 2023-10-02T17:54:55,396 { 2023-10-02T17:54:55,397 "CHECK": "CHECK 3", 2023-10-02T17:54:55,398 "PASSED": false, 2023-10-02T17:54:55,398 "EXCEPTION": "Exception('NOT 100%')", 2023-10-02T17:54:55,399 "EXCEPTION TRACE": [ 2023-10-02T17:54:55,399 "Traceback (most recent call last):", 2023-10-02T17:54:55,400 " File \"/REPTILIAN_CLIMATES/MODULES/BODY_SCAN/src/SCAN_PROC/KEG/SCAN.py\", line 69, in SCAN", 2023-10-02T17:54:55,400 " CHECKS [ CHECK ] ()", 2023-10-02T17:54:55,401 " File \"\", line 24, in CHECK_3", 2023-10-02T17:54:55,401 "Exception: NOT 100%" 2023-10-02T17:54:55,402 ] 2023-10-02T17:54:55,403 } 2023-10-02T17:54:55,403 ] 2023-10-02T17:54:55,404 }, 2023-10-02T17:54:55,404 { 2023-10-02T17:54:55,405 "PATH": "PATH_2_HEALTH.py", 2023-10-02T17:54:55,406 "EMPTY": true 2023-10-02T17:54:55,406 } 2023-10-02T17:54:55,407 ], 2023-10-02T17:54:55,407 "STATS": { 2023-10-02T17:54:55,408 "EMPTY": 1, 2023-10-02T17:54:55,408 "CHECKS": { 2023-10-02T17:54:55,408 "PASSES": 2, 2023-10-02T17:54:55,409 "ALARMS": 1 2023-10-02T17:54:55,409 } 2023-10-02T17:54:55,409 } 2023-10-02T17:54:55,410 } 2023-10-02T17:54:55,410 ``` 2023-10-02T17:54:55,411 ## HOW TO WRITE CHECKS: 2023-10-02T17:54:55,412 The "CHECKS" dictionary is retrieved with the python "exec" 2023-10-02T17:54:55,412 and then each "CHECK" in "CHECKS" is run. 2023-10-02T17:54:55,413 These checks correspond to the example output shown above. 2023-10-02T17:54:55,413 ``` 2023-10-02T17:54:55,414 PATH_1_HEALTH.py 2023-10-02T17:54:55,414 ``` 2023-10-02T17:54:55,415 ``` 2023-10-02T17:54:55,415 def CHECK_1 (): 2023-10-02T17:54:55,416 print ("CHECK 1") 2023-10-02T17:54:55,416 def CHECK_2 (): 2023-10-02T17:54:55,417 print ("CHECK 2") 2023-10-02T17:54:55,418 def CHECK_3 (): 2023-10-02T17:54:55,418 raise Exception ("NOT 100%") 2023-10-02T17:54:55,419 CHECKS = { 2023-10-02T17:54:55,419 "CHECK 1": CHECK_1, 2023-10-02T17:54:55,420 "CHECK 2": CHECK_2, 2023-10-02T17:54:55,420 "CHECK 3": CHECK_3 2023-10-02T17:54:55,421 } 2023-10-02T17:54:55,421 ``` 2023-10-02T17:54:55,422 ``` 2023-10-02T17:54:55,422 PATH_2_HEALTH.py 2023-10-02T17:54:55,423 ``` 2023-10-02T17:54:55,423 ``` 2023-10-02T17:54:55,423 # 2023-10-02T17:54:55,424 # There isn't a "CHECKS" dictionary present, 2023-10-02T17:54:55,424 # so the scanner reports: 2023-10-02T17:54:55,425 # 2023-10-02T17:54:55,425 # "EMPTY": true 2023-10-02T17:54:55,426 # 2023-10-02T17:54:55,427 ``` 2023-10-02T17:54:55,428 ## HOW TO START THE BODY SCANNER 2023-10-02T17:54:55,429 ```python3 2023-10-02T17:54:55,429 import BODY_SCAN 2023-10-02T17:54:55,430 import pathlib 2023-10-02T17:54:55,431 THIS_FOLDER = pathlib.Path (__file__).parent.resolve () 2023-10-02T17:54:55,432 from os.path import dirname, join, normpath 2023-10-02T17:54:55,432 SEARCH = normpath (join (THIS_FOLDER, "MODULE")) 2023-10-02T17:54:55,434 SCAN = BODY_SCAN.START ( 2023-10-02T17:54:55,435 # 2023-10-02T17:54:55,435 # REQUIRED 2023-10-02T17:54:55,436 # This is all the files that are sent to the scanner. 2023-10-02T17:54:55,436 # 2023-10-02T17:54:55,437 GLOB = SEARCH + '/**/*HEALTH.py', 2023-10-02T17:54:55,438 # 2023-10-02T17:54:55,439 # OPTIONAL 2023-10-02T17:54:55,439 # These are the folders that are added to "sys.path" 2023-10-02T17:54:55,440 # 2023-10-02T17:54:55,441 MODULE_PATHS = [ 2023-10-02T17:54:55,441 normpath (join (SEARCH, "MODULES")) 2023-10-02T17:54:55,442 ], 2023-10-02T17:54:55,443 # 2023-10-02T17:54:55,444 # OPTIONAL 2023-10-02T17:54:55,444 # This is the folder path to remove from the paths in the output. 2023-10-02T17:54:55,445 # 2023-10-02T17:54:55,445 RELATIVE_PATH = SEARCH 2023-10-02T17:54:55,446 ) 2023-10-02T17:54:55,446 ``` 2023-10-02T17:54:55,448 ### NOTES 2023-10-02T17:54:55,448 ``` 2023-10-02T17:54:55,449 Currently all the checks aren't run in parallel, 2023-10-02T17:54:55,449 but sequential order of paths found in glob is not guaranteed. 2023-10-02T17:54:55,450 ``` 2023-10-02T17:54:55,450 ``` 2023-10-02T17:54:55,451 Each check suite found by the glob is started by 2023-10-02T17:54:55,451 a process with a flask API, that is opened on the first available port found. 2023-10-02T17:54:55,452 ``` 2023-10-02T17:54:55,454 running egg_info 2023-10-02T17:54:55,454 creating /tmp/pip-pip-egg-info-za50ymao/BODY_SCAN.egg-info 2023-10-02T17:54:55,455 writing /tmp/pip-pip-egg-info-za50ymao/BODY_SCAN.egg-info/PKG-INFO 2023-10-02T17:54:55,456 writing dependency_links to /tmp/pip-pip-egg-info-za50ymao/BODY_SCAN.egg-info/dependency_links.txt 2023-10-02T17:54:55,456 writing requirements to /tmp/pip-pip-egg-info-za50ymao/BODY_SCAN.egg-info/requires.txt 2023-10-02T17:54:55,457 writing top-level names to /tmp/pip-pip-egg-info-za50ymao/BODY_SCAN.egg-info/top_level.txt 2023-10-02T17:54:55,457 writing manifest file '/tmp/pip-pip-egg-info-za50ymao/BODY_SCAN.egg-info/SOURCES.txt' 2023-10-02T17:54:55,516 reading manifest file '/tmp/pip-pip-egg-info-za50ymao/BODY_SCAN.egg-info/SOURCES.txt' 2023-10-02T17:54:55,517 adding license file 'LICENSE' 2023-10-02T17:54:55,519 writing manifest file '/tmp/pip-pip-egg-info-za50ymao/BODY_SCAN.egg-info/SOURCES.txt' 2023-10-02T17:54:55,630 Preparing metadata (setup.py): finished with status 'done' 2023-10-02T17:54:55,634 Source in /tmp/pip-wheel-p1213f9f/body-scan_bddf1879aec34cf8831d62880250bd50 has version 0.0.16, which satisfies requirement body-scan==0.0.16 from https://files.pythonhosted.org/packages/4a/7b/2bf405077a418312446509ddabd2c8d002e8af140f7793ccddf28678961d/BODY_SCAN-0.0.16.tar.gz 2023-10-02T17:54:55,635 Removed body-scan==0.0.16 from https://files.pythonhosted.org/packages/4a/7b/2bf405077a418312446509ddabd2c8d002e8af140f7793ccddf28678961d/BODY_SCAN-0.0.16.tar.gz from build tracker '/tmp/pip-build-tracker-arph_ttv' 2023-10-02T17:54:55,639 Created temporary directory: /tmp/pip-unpack-xbra2680 2023-10-02T17:54:55,640 Created temporary directory: /tmp/pip-unpack-5gebrnmv 2023-10-02T17:54:55,645 Building wheels for collected packages: body-scan 2023-10-02T17:54:55,649 Created temporary directory: /tmp/pip-wheel-mx3ksy9x 2023-10-02T17:54:55,650 Building wheel for body-scan (setup.py): started 2023-10-02T17:54:55,651 Destination directory: /tmp/pip-wheel-mx3ksy9x 2023-10-02T17:54:55,651 Running command python setup.py bdist_wheel 2023-10-02T17:54:56,056 # BODY SCAN 2023-10-02T17:54:56,057 ## EXAMPLE OUTPUT: 2023-10-02T17:54:56,058 ```JSON 2023-10-02T17:54:56,058 { 2023-10-02T17:54:56,059 "PATHS": [ 2023-10-02T17:54:56,059 { 2023-10-02T17:54:56,060 "PATH": "PATH_1_HEALTH.py", 2023-10-02T17:54:56,060 "STATS": { 2023-10-02T17:54:56,061 "PASSES": 2, 2023-10-02T17:54:56,062 "ALARMS": 1 2023-10-02T17:54:56,062 }, 2023-10-02T17:54:56,063 "CHECKS": [ 2023-10-02T17:54:56,063 { 2023-10-02T17:54:56,064 "CHECK": "CHECK 1", 2023-10-02T17:54:56,064 "PASSED": true, 2023-10-02T17:54:56,065 "ELAPSED": [ 2023-10-02T17:54:56,066 5.320599666447379e-05, 2023-10-02T17:54:56,066 "SECONDS" 2023-10-02T17:54:56,067 ] 2023-10-02T17:54:56,067 }, 2023-10-02T17:54:56,068 { 2023-10-02T17:54:56,068 "CHECK": "CHECK 2", 2023-10-02T17:54:56,069 "PASSED": true, 2023-10-02T17:54:56,070 "ELAPSED": [ 2023-10-02T17:54:56,070 1.0949999705189839e-05, 2023-10-02T17:54:56,071 "SECONDS" 2023-10-02T17:54:56,071 ] 2023-10-02T17:54:56,072 }, 2023-10-02T17:54:56,072 { 2023-10-02T17:54:56,073 "CHECK": "CHECK 3", 2023-10-02T17:54:56,073 "PASSED": false, 2023-10-02T17:54:56,074 "EXCEPTION": "Exception('NOT 100%')", 2023-10-02T17:54:56,074 "EXCEPTION TRACE": [ 2023-10-02T17:54:56,075 "Traceback (most recent call last):", 2023-10-02T17:54:56,075 " File \"/REPTILIAN_CLIMATES/MODULES/BODY_SCAN/src/SCAN_PROC/KEG/SCAN.py\", line 69, in SCAN", 2023-10-02T17:54:56,076 " CHECKS [ CHECK ] ()", 2023-10-02T17:54:56,076 " File \"\", line 24, in CHECK_3", 2023-10-02T17:54:56,077 "Exception: NOT 100%" 2023-10-02T17:54:56,078 ] 2023-10-02T17:54:56,078 } 2023-10-02T17:54:56,079 ] 2023-10-02T17:54:56,079 }, 2023-10-02T17:54:56,080 { 2023-10-02T17:54:56,081 "PATH": "PATH_2_HEALTH.py", 2023-10-02T17:54:56,081 "EMPTY": true 2023-10-02T17:54:56,082 } 2023-10-02T17:54:56,082 ], 2023-10-02T17:54:56,082 "STATS": { 2023-10-02T17:54:56,083 "EMPTY": 1, 2023-10-02T17:54:56,083 "CHECKS": { 2023-10-02T17:54:56,084 "PASSES": 2, 2023-10-02T17:54:56,084 "ALARMS": 1 2023-10-02T17:54:56,085 } 2023-10-02T17:54:56,085 } 2023-10-02T17:54:56,085 } 2023-10-02T17:54:56,086 ``` 2023-10-02T17:54:56,087 ## HOW TO WRITE CHECKS: 2023-10-02T17:54:56,088 The "CHECKS" dictionary is retrieved with the python "exec" 2023-10-02T17:54:56,088 and then each "CHECK" in "CHECKS" is run. 2023-10-02T17:54:56,089 These checks correspond to the example output shown above. 2023-10-02T17:54:56,090 ``` 2023-10-02T17:54:56,090 PATH_1_HEALTH.py 2023-10-02T17:54:56,090 ``` 2023-10-02T17:54:56,091 ``` 2023-10-02T17:54:56,091 def CHECK_1 (): 2023-10-02T17:54:56,092 print ("CHECK 1") 2023-10-02T17:54:56,093 def CHECK_2 (): 2023-10-02T17:54:56,093 print ("CHECK 2") 2023-10-02T17:54:56,094 def CHECK_3 (): 2023-10-02T17:54:56,094 raise Exception ("NOT 100%") 2023-10-02T17:54:56,095 CHECKS = { 2023-10-02T17:54:56,096 "CHECK 1": CHECK_1, 2023-10-02T17:54:56,096 "CHECK 2": CHECK_2, 2023-10-02T17:54:56,097 "CHECK 3": CHECK_3 2023-10-02T17:54:56,097 } 2023-10-02T17:54:56,097 ``` 2023-10-02T17:54:56,098 ``` 2023-10-02T17:54:56,098 PATH_2_HEALTH.py 2023-10-02T17:54:56,099 ``` 2023-10-02T17:54:56,099 ``` 2023-10-02T17:54:56,100 # 2023-10-02T17:54:56,100 # There isn't a "CHECKS" dictionary present, 2023-10-02T17:54:56,101 # so the scanner reports: 2023-10-02T17:54:56,101 # 2023-10-02T17:54:56,102 # "EMPTY": true 2023-10-02T17:54:56,102 # 2023-10-02T17:54:56,103 ``` 2023-10-02T17:54:56,104 ## HOW TO START THE BODY SCANNER 2023-10-02T17:54:56,105 ```python3 2023-10-02T17:54:56,106 import BODY_SCAN 2023-10-02T17:54:56,107 import pathlib 2023-10-02T17:54:56,107 THIS_FOLDER = pathlib.Path (__file__).parent.resolve () 2023-10-02T17:54:56,108 from os.path import dirname, join, normpath 2023-10-02T17:54:56,109 SEARCH = normpath (join (THIS_FOLDER, "MODULE")) 2023-10-02T17:54:56,111 SCAN = BODY_SCAN.START ( 2023-10-02T17:54:56,111 # 2023-10-02T17:54:56,112 # REQUIRED 2023-10-02T17:54:56,112 # This is all the files that are sent to the scanner. 2023-10-02T17:54:56,113 # 2023-10-02T17:54:56,114 GLOB = SEARCH + '/**/*HEALTH.py', 2023-10-02T17:54:56,115 # 2023-10-02T17:54:56,115 # OPTIONAL 2023-10-02T17:54:56,116 # These are the folders that are added to "sys.path" 2023-10-02T17:54:56,117 # 2023-10-02T17:54:56,117 MODULE_PATHS = [ 2023-10-02T17:54:56,118 normpath (join (SEARCH, "MODULES")) 2023-10-02T17:54:56,118 ], 2023-10-02T17:54:56,119 # 2023-10-02T17:54:56,120 # OPTIONAL 2023-10-02T17:54:56,120 # This is the folder path to remove from the paths in the output. 2023-10-02T17:54:56,121 # 2023-10-02T17:54:56,121 RELATIVE_PATH = SEARCH 2023-10-02T17:54:56,122 ) 2023-10-02T17:54:56,123 ``` 2023-10-02T17:54:56,124 ### NOTES 2023-10-02T17:54:56,124 ``` 2023-10-02T17:54:56,125 Currently all the checks aren't run in parallel, 2023-10-02T17:54:56,125 but sequential order of paths found in glob is not guaranteed. 2023-10-02T17:54:56,126 ``` 2023-10-02T17:54:56,126 ``` 2023-10-02T17:54:56,127 Each check suite found by the glob is started by 2023-10-02T17:54:56,128 a process with a flask API, that is opened on the first available port found. 2023-10-02T17:54:56,128 ``` 2023-10-02T17:54:56,668 running bdist_wheel 2023-10-02T17:54:56,799 running build 2023-10-02T17:54:56,800 running build_py 2023-10-02T17:54:56,827 creating build 2023-10-02T17:54:56,828 creating build/lib 2023-10-02T17:54:56,828 creating build/lib/BODY_SCAN 2023-10-02T17:54:56,830 copying src/__init__.py -> build/lib/BODY_SCAN 2023-10-02T17:54:56,832 copying src/START_MULTIPLE_PROCESSES.py -> build/lib/BODY_SCAN 2023-10-02T17:54:56,834 creating build/lib/BODY_SCAN/FUNCTIONS 2023-10-02T17:54:56,835 copying src/FUNCTIONS/START_THE_CORE_KEG.py -> build/lib/BODY_SCAN/FUNCTIONS 2023-10-02T17:54:56,836 copying src/FUNCTIONS/CHECK_STATUS_LOCATION.py -> build/lib/BODY_SCAN/FUNCTIONS 2023-10-02T17:54:56,838 copying src/FUNCTIONS/START_A_SCAN.py -> build/lib/BODY_SCAN/FUNCTIONS 2023-10-02T17:54:56,840 creating build/lib/BODY_SCAN/AGGREGATOR 2023-10-02T17:54:56,841 copying src/AGGREGATOR/START.py -> build/lib/BODY_SCAN/AGGREGATOR 2023-10-02T17:54:56,843 creating build/lib/BODY_SCAN/AGGREGATE 2023-10-02T17:54:56,844 copying src/AGGREGATE/__init__.py -> build/lib/BODY_SCAN/AGGREGATE 2023-10-02T17:54:56,846 creating build/lib/BODY_SCAN/AGGREGATOR/KEG 2023-10-02T17:54:56,847 copying src/AGGREGATOR/KEG/__init__.py -> build/lib/BODY_SCAN/AGGREGATOR/KEG 2023-10-02T17:54:56,849 creating build/lib/BODY_SCAN/PROCESSES 2023-10-02T17:54:56,850 creating build/lib/BODY_SCAN/PROCESSES/SCAN 2023-10-02T17:54:56,851 copying src/PROCESSES/SCAN/START.py -> build/lib/BODY_SCAN/PROCESSES/SCAN 2023-10-02T17:54:56,853 creating build/lib/BODY_SCAN/PROCESSES/SCAN/KEG 2023-10-02T17:54:56,854 copying src/PROCESSES/SCAN/KEG/__init__.py -> build/lib/BODY_SCAN/PROCESSES/SCAN/KEG 2023-10-02T17:54:56,856 copying src/PROCESSES/SCAN/KEG/SCAN.py -> build/lib/BODY_SCAN/PROCESSES/SCAN/KEG 2023-10-02T17:54:56,889 /usr/local/lib/python3.11/dist-packages/setuptools/_distutils/cmd.py:66: SetuptoolsDeprecationWarning: setup.py install is deprecated. 2023-10-02T17:54:56,889 !! 2023-10-02T17:54:56,890 ******************************************************************************** 2023-10-02T17:54:56,891 Please avoid running ``setup.py`` directly. 2023-10-02T17:54:56,891 Instead, use pypa/build, pypa/installer or other 2023-10-02T17:54:56,892 standards-based tools. 2023-10-02T17:54:56,893 See https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html for details. 2023-10-02T17:54:56,893 ******************************************************************************** 2023-10-02T17:54:56,894 !! 2023-10-02T17:54:56,895 self.initialize_options() 2023-10-02T17:54:56,915 installing to build/bdist.linux-armv7l/wheel 2023-10-02T17:54:56,916 running install 2023-10-02T17:54:56,939 running install_lib 2023-10-02T17:54:56,964 creating build/bdist.linux-armv7l 2023-10-02T17:54:56,965 creating build/bdist.linux-armv7l/wheel 2023-10-02T17:54:56,966 creating build/bdist.linux-armv7l/wheel/BODY_SCAN 2023-10-02T17:54:56,967 copying build/lib/BODY_SCAN/__init__.py -> build/bdist.linux-armv7l/wheel/BODY_SCAN 2023-10-02T17:54:56,969 creating build/bdist.linux-armv7l/wheel/BODY_SCAN/FUNCTIONS 2023-10-02T17:54:56,970 copying build/lib/BODY_SCAN/FUNCTIONS/START_THE_CORE_KEG.py -> build/bdist.linux-armv7l/wheel/BODY_SCAN/FUNCTIONS 2023-10-02T17:54:56,972 copying build/lib/BODY_SCAN/FUNCTIONS/CHECK_STATUS_LOCATION.py -> build/bdist.linux-armv7l/wheel/BODY_SCAN/FUNCTIONS 2023-10-02T17:54:56,974 copying build/lib/BODY_SCAN/FUNCTIONS/START_A_SCAN.py -> build/bdist.linux-armv7l/wheel/BODY_SCAN/FUNCTIONS 2023-10-02T17:54:56,976 creating build/bdist.linux-armv7l/wheel/BODY_SCAN/AGGREGATOR 2023-10-02T17:54:56,977 copying build/lib/BODY_SCAN/AGGREGATOR/START.py -> build/bdist.linux-armv7l/wheel/BODY_SCAN/AGGREGATOR 2023-10-02T17:54:56,979 creating build/bdist.linux-armv7l/wheel/BODY_SCAN/AGGREGATOR/KEG 2023-10-02T17:54:56,980 copying build/lib/BODY_SCAN/AGGREGATOR/KEG/__init__.py -> build/bdist.linux-armv7l/wheel/BODY_SCAN/AGGREGATOR/KEG 2023-10-02T17:54:56,982 creating build/bdist.linux-armv7l/wheel/BODY_SCAN/AGGREGATE 2023-10-02T17:54:56,983 copying build/lib/BODY_SCAN/AGGREGATE/__init__.py -> build/bdist.linux-armv7l/wheel/BODY_SCAN/AGGREGATE 2023-10-02T17:54:56,985 creating build/bdist.linux-armv7l/wheel/BODY_SCAN/PROCESSES 2023-10-02T17:54:56,987 creating build/bdist.linux-armv7l/wheel/BODY_SCAN/PROCESSES/SCAN 2023-10-02T17:54:56,988 copying build/lib/BODY_SCAN/PROCESSES/SCAN/START.py -> build/bdist.linux-armv7l/wheel/BODY_SCAN/PROCESSES/SCAN 2023-10-02T17:54:56,990 creating build/bdist.linux-armv7l/wheel/BODY_SCAN/PROCESSES/SCAN/KEG 2023-10-02T17:54:56,991 copying build/lib/BODY_SCAN/PROCESSES/SCAN/KEG/__init__.py -> build/bdist.linux-armv7l/wheel/BODY_SCAN/PROCESSES/SCAN/KEG 2023-10-02T17:54:56,992 copying build/lib/BODY_SCAN/PROCESSES/SCAN/KEG/SCAN.py -> build/bdist.linux-armv7l/wheel/BODY_SCAN/PROCESSES/SCAN/KEG 2023-10-02T17:54:56,994 copying build/lib/BODY_SCAN/START_MULTIPLE_PROCESSES.py -> build/bdist.linux-armv7l/wheel/BODY_SCAN 2023-10-02T17:54:56,996 running install_egg_info 2023-10-02T17:54:57,027 running egg_info 2023-10-02T17:54:57,051 writing BODY_SCAN.egg-info/PKG-INFO 2023-10-02T17:54:57,054 writing dependency_links to BODY_SCAN.egg-info/dependency_links.txt 2023-10-02T17:54:57,055 writing requirements to BODY_SCAN.egg-info/requires.txt 2023-10-02T17:54:57,056 writing top-level names to BODY_SCAN.egg-info/top_level.txt 2023-10-02T17:54:57,085 reading manifest file 'BODY_SCAN.egg-info/SOURCES.txt' 2023-10-02T17:54:57,087 adding license file 'LICENSE' 2023-10-02T17:54:57,089 writing manifest file 'BODY_SCAN.egg-info/SOURCES.txt' 2023-10-02T17:54:57,090 Copying BODY_SCAN.egg-info to build/bdist.linux-armv7l/wheel/BODY_SCAN-0.0.16-py3.11.egg-info 2023-10-02T17:54:57,099 running install_scripts 2023-10-02T17:54:57,111 creating build/bdist.linux-armv7l/wheel/BODY_SCAN-0.0.16.dist-info/WHEEL 2023-10-02T17:54:57,113 creating '/tmp/pip-wheel-mx3ksy9x/BODY_SCAN-0.0.16-py3-none-any.whl' and adding 'build/bdist.linux-armv7l/wheel' to it 2023-10-02T17:54:57,115 adding 'BODY_SCAN/START_MULTIPLE_PROCESSES.py' 2023-10-02T17:54:57,116 adding 'BODY_SCAN/__init__.py' 2023-10-02T17:54:57,118 adding 'BODY_SCAN/AGGREGATE/__init__.py' 2023-10-02T17:54:57,120 adding 'BODY_SCAN/AGGREGATOR/START.py' 2023-10-02T17:54:57,121 adding 'BODY_SCAN/AGGREGATOR/KEG/__init__.py' 2023-10-02T17:54:57,123 adding 'BODY_SCAN/FUNCTIONS/CHECK_STATUS_LOCATION.py' 2023-10-02T17:54:57,124 adding 'BODY_SCAN/FUNCTIONS/START_A_SCAN.py' 2023-10-02T17:54:57,126 adding 'BODY_SCAN/FUNCTIONS/START_THE_CORE_KEG.py' 2023-10-02T17:54:57,128 adding 'BODY_SCAN/PROCESSES/SCAN/START.py' 2023-10-02T17:54:57,129 adding 'BODY_SCAN/PROCESSES/SCAN/KEG/SCAN.py' 2023-10-02T17:54:57,131 adding 'BODY_SCAN/PROCESSES/SCAN/KEG/__init__.py' 2023-10-02T17:54:57,133 adding 'BODY_SCAN-0.0.16.dist-info/LICENSE' 2023-10-02T17:54:57,134 adding 'BODY_SCAN-0.0.16.dist-info/METADATA' 2023-10-02T17:54:57,135 adding 'BODY_SCAN-0.0.16.dist-info/WHEEL' 2023-10-02T17:54:57,136 adding 'BODY_SCAN-0.0.16.dist-info/top_level.txt' 2023-10-02T17:54:57,137 adding 'BODY_SCAN-0.0.16.dist-info/RECORD' 2023-10-02T17:54:57,138 removing build/bdist.linux-armv7l/wheel 2023-10-02T17:54:57,258 Building wheel for body-scan (setup.py): finished with status 'done' 2023-10-02T17:54:57,260 Created wheel for body-scan: filename=BODY_SCAN-0.0.16-py3-none-any.whl size=9563 sha256=1f82675129d38de9d734567dbfd8010c9268d3269bee38a0912d397d30d531be 2023-10-02T17:54:57,262 Stored in directory: /tmp/pip-ephem-wheel-cache-5pz6n2vn/wheels/5f/b2/76/eafca775eb55a517d9df3d13f2fcc06fb33991180db1a2d91a 2023-10-02T17:54:57,271 Successfully built body-scan 2023-10-02T17:54:57,274 Removed build tracker: '/tmp/pip-build-tracker-arph_ttv'