2023-10-02T18:50:44,729 Created temporary directory: /tmp/pip-build-tracker-d38ddq_r 2023-10-02T18:50:44,730 Initialized build tracking at /tmp/pip-build-tracker-d38ddq_r 2023-10-02T18:50:44,730 Created build tracker: /tmp/pip-build-tracker-d38ddq_r 2023-10-02T18:50:44,731 Entered build tracker: /tmp/pip-build-tracker-d38ddq_r 2023-10-02T18:50:44,732 Created temporary directory: /tmp/pip-wheel-upih1wh2 2023-10-02T18:50:44,735 Created temporary directory: /tmp/pip-ephem-wheel-cache-agt4n96w 2023-10-02T18:50:44,757 Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple 2023-10-02T18:50:44,761 2 location(s) to search for versions of body-scan: 2023-10-02T18:50:44,761 * https://pypi.org/simple/body-scan/ 2023-10-02T18:50:44,761 * https://www.piwheels.org/simple/body-scan/ 2023-10-02T18:50:44,762 Fetching project page and analyzing links: https://pypi.org/simple/body-scan/ 2023-10-02T18:50:44,762 Getting page https://pypi.org/simple/body-scan/ 2023-10-02T18:50:44,764 Found index url https://pypi.org/simple/ 2023-10-02T18:50:44,902 Fetched page https://pypi.org/simple/body-scan/ as application/vnd.pypi.simple.v1+json 2023-10-02T18:50:44,907 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:50:44,907 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:50:44,908 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:50:44,909 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:50:44,909 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:50:44,910 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:50:44,911 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:50:44,912 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:50:44,912 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:50:44,913 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:50:44,914 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:50:44,915 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:50:44,915 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:50:44,916 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:50:44,917 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:50:44,918 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:50:44,918 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:50:44,919 Fetching project page and analyzing links: https://www.piwheels.org/simple/body-scan/ 2023-10-02T18:50:44,920 Getting page https://www.piwheels.org/simple/body-scan/ 2023-10-02T18:50:44,921 Found index url https://www.piwheels.org/simple/ 2023-10-02T18:50:45,082 Fetched page https://www.piwheels.org/simple/body-scan/ as text/html 2023-10-02T18:50:45,087 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:50:45,087 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:50:45,088 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:50:45,089 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:50:45,089 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:50:45,090 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:50:45,091 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:50:45,091 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:50:45,092 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:50:45,092 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:50:45,093 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:50:45,094 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:50:45,095 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:50:45,095 Skipping link: not a file: https://www.piwheels.org/simple/body-scan/ 2023-10-02T18:50:45,095 Skipping link: not a file: https://pypi.org/simple/body-scan/ 2023-10-02T18:50:45,117 Given no hashes to check 1 links for project 'body-scan': discarding no candidates 2023-10-02T18:50:45,137 Collecting body-scan==0.0.20 2023-10-02T18:50:45,139 Created temporary directory: /tmp/pip-unpack-879lxvme 2023-10-02T18:50:45,362 Downloading BODY_SCAN-0.0.20.tar.gz (7.1 kB) 2023-10-02T18:50:45,408 Added body-scan==0.0.20 from https://files.pythonhosted.org/packages/bc/a4/64783f579d22ef1abc746160acddc0e45647fac921396c25e74ddf55bc70/BODY_SCAN-0.0.20.tar.gz to build tracker '/tmp/pip-build-tracker-d38ddq_r' 2023-10-02T18:50:45,410 Running setup.py (path:/tmp/pip-wheel-upih1wh2/body-scan_7b3190dae26044b6bf9007b26a09ac4f/setup.py) egg_info for package body-scan 2023-10-02T18:50:45,411 Created temporary directory: /tmp/pip-pip-egg-info-grbrro54 2023-10-02T18:50:45,412 Preparing metadata (setup.py): started 2023-10-02T18:50:45,413 Running command python setup.py egg_info 2023-10-02T18:50:46,472 # BODY SCAN 2023-10-02T18:50:46,473 ## EXAMPLE OUTPUT: 2023-10-02T18:50:46,474 ```JSON 2023-10-02T18:50:46,474 { 2023-10-02T18:50:46,475 "PATHS": [ 2023-10-02T18:50:46,475 { 2023-10-02T18:50:46,476 "PATH": "PATH_1_HEALTH.py", 2023-10-02T18:50:46,476 "STATS": { 2023-10-02T18:50:46,477 "PASSES": 2, 2023-10-02T18:50:46,477 "ALARMS": 1 2023-10-02T18:50:46,478 }, 2023-10-02T18:50:46,479 "CHECKS": [ 2023-10-02T18:50:46,479 { 2023-10-02T18:50:46,480 "CHECK": "CHECK 1", 2023-10-02T18:50:46,481 "PASSED": true, 2023-10-02T18:50:46,481 "ELAPSED": [ 2023-10-02T18:50:46,482 5.320599666447379e-05, 2023-10-02T18:50:46,483 "SECONDS" 2023-10-02T18:50:46,483 ] 2023-10-02T18:50:46,484 }, 2023-10-02T18:50:46,484 { 2023-10-02T18:50:46,485 "CHECK": "CHECK 2", 2023-10-02T18:50:46,485 "PASSED": true, 2023-10-02T18:50:46,486 "ELAPSED": [ 2023-10-02T18:50:46,486 1.0949999705189839e-05, 2023-10-02T18:50:46,487 "SECONDS" 2023-10-02T18:50:46,487 ] 2023-10-02T18:50:46,488 }, 2023-10-02T18:50:46,489 { 2023-10-02T18:50:46,489 "CHECK": "CHECK 3", 2023-10-02T18:50:46,490 "PASSED": false, 2023-10-02T18:50:46,490 "EXCEPTION": "Exception('NOT 100%')", 2023-10-02T18:50:46,491 "EXCEPTION TRACE": [ 2023-10-02T18:50:46,491 "Traceback (most recent call last):", 2023-10-02T18:50:46,492 " File \"/REPTILIAN_CLIMATES/MODULES/BODY_SCAN/src/SCAN_PROC/KEG/SCAN.py\", line 69, in SCAN", 2023-10-02T18:50:46,493 " CHECKS [ CHECK ] ()", 2023-10-02T18:50:46,493 " File \"\", line 24, in CHECK_3", 2023-10-02T18:50:46,494 "Exception: NOT 100%" 2023-10-02T18:50:46,495 ] 2023-10-02T18:50:46,495 } 2023-10-02T18:50:46,496 ] 2023-10-02T18:50:46,496 }, 2023-10-02T18:50:46,497 { 2023-10-02T18:50:46,497 "PATH": "PATH_2_HEALTH.py", 2023-10-02T18:50:46,497 "EMPTY": true 2023-10-02T18:50:46,498 } 2023-10-02T18:50:46,498 ], 2023-10-02T18:50:46,499 "STATS": { 2023-10-02T18:50:46,499 "EMPTY": 1, 2023-10-02T18:50:46,499 "CHECKS": { 2023-10-02T18:50:46,500 "PASSES": 2, 2023-10-02T18:50:46,500 "ALARMS": 1 2023-10-02T18:50:46,501 } 2023-10-02T18:50:46,501 } 2023-10-02T18:50:46,501 } 2023-10-02T18:50:46,502 ``` 2023-10-02T18:50:46,503 ## HOW TO WRITE CHECKS: 2023-10-02T18:50:46,504 The "CHECKS" dictionary is retrieved with the python "exec" 2023-10-02T18:50:46,504 and then each "CHECK" in "CHECKS" is run. 2023-10-02T18:50:46,505 These checks correspond to the example output shown above. 2023-10-02T18:50:46,506 ``` 2023-10-02T18:50:46,506 PATH_1_HEALTH.py 2023-10-02T18:50:46,507 ``` 2023-10-02T18:50:46,507 ``` 2023-10-02T18:50:46,507 def CHECK_1 (): 2023-10-02T18:50:46,508 print ("CHECK 1") 2023-10-02T18:50:46,509 def CHECK_2 (): 2023-10-02T18:50:46,509 print ("CHECK 2") 2023-10-02T18:50:46,510 def CHECK_3 (): 2023-10-02T18:50:46,511 raise Exception ("NOT 100%") 2023-10-02T18:50:46,511 CHECKS = { 2023-10-02T18:50:46,512 "CHECK 1": CHECK_1, 2023-10-02T18:50:46,512 "CHECK 2": CHECK_2, 2023-10-02T18:50:46,513 "CHECK 3": CHECK_3 2023-10-02T18:50:46,513 } 2023-10-02T18:50:46,514 ``` 2023-10-02T18:50:46,514 ``` 2023-10-02T18:50:46,515 PATH_2_HEALTH.py 2023-10-02T18:50:46,515 ``` 2023-10-02T18:50:46,516 ``` 2023-10-02T18:50:46,516 # 2023-10-02T18:50:46,517 # There isn't a "CHECKS" dictionary present, 2023-10-02T18:50:46,517 # so the scanner reports: 2023-10-02T18:50:46,518 # 2023-10-02T18:50:46,518 # "EMPTY": true 2023-10-02T18:50:46,519 # 2023-10-02T18:50:46,519 ``` 2023-10-02T18:50:46,520 ## HOW TO START THE BODY SCANNER 2023-10-02T18:50:46,521 ```python3 2023-10-02T18:50:46,522 import BODY_SCAN 2023-10-02T18:50:46,523 import pathlib 2023-10-02T18:50:46,524 THIS_FOLDER = pathlib.Path (__file__).parent.resolve () 2023-10-02T18:50:46,525 from os.path import dirname, join, normpath 2023-10-02T18:50:46,526 SEARCH = normpath (join (THIS_FOLDER, "MODULE")) 2023-10-02T18:50:46,527 SCAN = BODY_SCAN.START ( 2023-10-02T18:50:46,528 # 2023-10-02T18:50:46,529 # REQUIRED 2023-10-02T18:50:46,529 # This is all the files that are sent to the scanner. 2023-10-02T18:50:46,530 # 2023-10-02T18:50:46,531 GLOB = SEARCH + '/**/*HEALTH.py', 2023-10-02T18:50:46,532 # 2023-10-02T18:50:46,532 # OPTIONAL 2023-10-02T18:50:46,533 # These are the folders that are added to "sys.path" 2023-10-02T18:50:46,533 # 2023-10-02T18:50:46,534 MODULE_PATHS = [ 2023-10-02T18:50:46,534 normpath (join (SEARCH, "MODULES")) 2023-10-02T18:50:46,535 ], 2023-10-02T18:50:46,536 # 2023-10-02T18:50:46,537 # OPTIONAL 2023-10-02T18:50:46,537 # This is the folder path to remove from the paths in the output. 2023-10-02T18:50:46,538 # 2023-10-02T18:50:46,539 RELATIVE_PATH = SEARCH 2023-10-02T18:50:46,539 ) 2023-10-02T18:50:46,540 ``` 2023-10-02T18:50:46,541 ### NOTES 2023-10-02T18:50:46,542 ``` 2023-10-02T18:50:46,542 Currently all the checks aren't run in parallel, 2023-10-02T18:50:46,543 but sequential order of paths found in glob is not guaranteed. 2023-10-02T18:50:46,544 ``` 2023-10-02T18:50:46,544 ``` 2023-10-02T18:50:46,545 Each check suite found by the glob is started by 2023-10-02T18:50:46,546 a process with a flask API, that is opened on the first available port found. 2023-10-02T18:50:46,546 ``` 2023-10-02T18:50:46,548 running egg_info 2023-10-02T18:50:46,549 creating /tmp/pip-pip-egg-info-grbrro54/BODY_SCAN.egg-info 2023-10-02T18:50:46,549 writing /tmp/pip-pip-egg-info-grbrro54/BODY_SCAN.egg-info/PKG-INFO 2023-10-02T18:50:46,550 writing dependency_links to /tmp/pip-pip-egg-info-grbrro54/BODY_SCAN.egg-info/dependency_links.txt 2023-10-02T18:50:46,551 writing requirements to /tmp/pip-pip-egg-info-grbrro54/BODY_SCAN.egg-info/requires.txt 2023-10-02T18:50:46,551 writing top-level names to /tmp/pip-pip-egg-info-grbrro54/BODY_SCAN.egg-info/top_level.txt 2023-10-02T18:50:46,552 writing manifest file '/tmp/pip-pip-egg-info-grbrro54/BODY_SCAN.egg-info/SOURCES.txt' 2023-10-02T18:50:46,599 reading manifest file '/tmp/pip-pip-egg-info-grbrro54/BODY_SCAN.egg-info/SOURCES.txt' 2023-10-02T18:50:46,600 adding license file 'LICENSE' 2023-10-02T18:50:46,602 writing manifest file '/tmp/pip-pip-egg-info-grbrro54/BODY_SCAN.egg-info/SOURCES.txt' 2023-10-02T18:50:46,712 Preparing metadata (setup.py): finished with status 'done' 2023-10-02T18:50:46,716 Source in /tmp/pip-wheel-upih1wh2/body-scan_7b3190dae26044b6bf9007b26a09ac4f has version 0.0.20, which satisfies requirement body-scan==0.0.20 from https://files.pythonhosted.org/packages/bc/a4/64783f579d22ef1abc746160acddc0e45647fac921396c25e74ddf55bc70/BODY_SCAN-0.0.20.tar.gz 2023-10-02T18:50:46,717 Removed body-scan==0.0.20 from https://files.pythonhosted.org/packages/bc/a4/64783f579d22ef1abc746160acddc0e45647fac921396c25e74ddf55bc70/BODY_SCAN-0.0.20.tar.gz from build tracker '/tmp/pip-build-tracker-d38ddq_r' 2023-10-02T18:50:46,721 Created temporary directory: /tmp/pip-unpack-epx2cwxd 2023-10-02T18:50:46,722 Created temporary directory: /tmp/pip-unpack-z7iv93q4 2023-10-02T18:50:46,728 Building wheels for collected packages: body-scan 2023-10-02T18:50:46,732 Created temporary directory: /tmp/pip-wheel-jl0zs0v6 2023-10-02T18:50:46,733 Building wheel for body-scan (setup.py): started 2023-10-02T18:50:46,734 Destination directory: /tmp/pip-wheel-jl0zs0v6 2023-10-02T18:50:46,735 Running command python setup.py bdist_wheel 2023-10-02T18:50:47,143 # BODY SCAN 2023-10-02T18:50:47,145 ## EXAMPLE OUTPUT: 2023-10-02T18:50:47,145 ```JSON 2023-10-02T18:50:47,146 { 2023-10-02T18:50:47,146 "PATHS": [ 2023-10-02T18:50:47,147 { 2023-10-02T18:50:47,147 "PATH": "PATH_1_HEALTH.py", 2023-10-02T18:50:47,148 "STATS": { 2023-10-02T18:50:47,149 "PASSES": 2, 2023-10-02T18:50:47,149 "ALARMS": 1 2023-10-02T18:50:47,150 }, 2023-10-02T18:50:47,150 "CHECKS": [ 2023-10-02T18:50:47,151 { 2023-10-02T18:50:47,151 "CHECK": "CHECK 1", 2023-10-02T18:50:47,152 "PASSED": true, 2023-10-02T18:50:47,153 "ELAPSED": [ 2023-10-02T18:50:47,153 5.320599666447379e-05, 2023-10-02T18:50:47,154 "SECONDS" 2023-10-02T18:50:47,155 ] 2023-10-02T18:50:47,155 }, 2023-10-02T18:50:47,156 { 2023-10-02T18:50:47,156 "CHECK": "CHECK 2", 2023-10-02T18:50:47,157 "PASSED": true, 2023-10-02T18:50:47,158 "ELAPSED": [ 2023-10-02T18:50:47,158 1.0949999705189839e-05, 2023-10-02T18:50:47,159 "SECONDS" 2023-10-02T18:50:47,159 ] 2023-10-02T18:50:47,160 }, 2023-10-02T18:50:47,160 { 2023-10-02T18:50:47,161 "CHECK": "CHECK 3", 2023-10-02T18:50:47,162 "PASSED": false, 2023-10-02T18:50:47,162 "EXCEPTION": "Exception('NOT 100%')", 2023-10-02T18:50:47,163 "EXCEPTION TRACE": [ 2023-10-02T18:50:47,163 "Traceback (most recent call last):", 2023-10-02T18:50:47,164 " File \"/REPTILIAN_CLIMATES/MODULES/BODY_SCAN/src/SCAN_PROC/KEG/SCAN.py\", line 69, in SCAN", 2023-10-02T18:50:47,165 " CHECKS [ CHECK ] ()", 2023-10-02T18:50:47,165 " File \"\", line 24, in CHECK_3", 2023-10-02T18:50:47,166 "Exception: NOT 100%" 2023-10-02T18:50:47,167 ] 2023-10-02T18:50:47,167 } 2023-10-02T18:50:47,168 ] 2023-10-02T18:50:47,168 }, 2023-10-02T18:50:47,169 { 2023-10-02T18:50:47,169 "PATH": "PATH_2_HEALTH.py", 2023-10-02T18:50:47,170 "EMPTY": true 2023-10-02T18:50:47,170 } 2023-10-02T18:50:47,171 ], 2023-10-02T18:50:47,171 "STATS": { 2023-10-02T18:50:47,172 "EMPTY": 1, 2023-10-02T18:50:47,172 "CHECKS": { 2023-10-02T18:50:47,173 "PASSES": 2, 2023-10-02T18:50:47,173 "ALARMS": 1 2023-10-02T18:50:47,174 } 2023-10-02T18:50:47,174 } 2023-10-02T18:50:47,175 } 2023-10-02T18:50:47,175 ``` 2023-10-02T18:50:47,176 ## HOW TO WRITE CHECKS: 2023-10-02T18:50:47,177 The "CHECKS" dictionary is retrieved with the python "exec" 2023-10-02T18:50:47,177 and then each "CHECK" in "CHECKS" is run. 2023-10-02T18:50:47,178 These checks correspond to the example output shown above. 2023-10-02T18:50:47,179 ``` 2023-10-02T18:50:47,179 PATH_1_HEALTH.py 2023-10-02T18:50:47,180 ``` 2023-10-02T18:50:47,180 ``` 2023-10-02T18:50:47,181 def CHECK_1 (): 2023-10-02T18:50:47,181 print ("CHECK 1") 2023-10-02T18:50:47,182 def CHECK_2 (): 2023-10-02T18:50:47,183 print ("CHECK 2") 2023-10-02T18:50:47,184 def CHECK_3 (): 2023-10-02T18:50:47,184 raise Exception ("NOT 100%") 2023-10-02T18:50:47,185 CHECKS = { 2023-10-02T18:50:47,186 "CHECK 1": CHECK_1, 2023-10-02T18:50:47,186 "CHECK 2": CHECK_2, 2023-10-02T18:50:47,187 "CHECK 3": CHECK_3 2023-10-02T18:50:47,187 } 2023-10-02T18:50:47,188 ``` 2023-10-02T18:50:47,188 ``` 2023-10-02T18:50:47,189 PATH_2_HEALTH.py 2023-10-02T18:50:47,190 ``` 2023-10-02T18:50:47,190 ``` 2023-10-02T18:50:47,191 # 2023-10-02T18:50:47,191 # There isn't a "CHECKS" dictionary present, 2023-10-02T18:50:47,192 # so the scanner reports: 2023-10-02T18:50:47,193 # 2023-10-02T18:50:47,193 # "EMPTY": true 2023-10-02T18:50:47,194 # 2023-10-02T18:50:47,195 ``` 2023-10-02T18:50:47,196 ## HOW TO START THE BODY SCANNER 2023-10-02T18:50:47,197 ```python3 2023-10-02T18:50:47,197 import BODY_SCAN 2023-10-02T18:50:47,199 import pathlib 2023-10-02T18:50:47,199 THIS_FOLDER = pathlib.Path (__file__).parent.resolve () 2023-10-02T18:50:47,200 from os.path import dirname, join, normpath 2023-10-02T18:50:47,201 SEARCH = normpath (join (THIS_FOLDER, "MODULE")) 2023-10-02T18:50:47,203 SCAN = BODY_SCAN.START ( 2023-10-02T18:50:47,203 # 2023-10-02T18:50:47,204 # REQUIRED 2023-10-02T18:50:47,205 # This is all the files that are sent to the scanner. 2023-10-02T18:50:47,205 # 2023-10-02T18:50:47,206 GLOB = SEARCH + '/**/*HEALTH.py', 2023-10-02T18:50:47,207 # 2023-10-02T18:50:47,208 # OPTIONAL 2023-10-02T18:50:47,208 # These are the folders that are added to "sys.path" 2023-10-02T18:50:47,209 # 2023-10-02T18:50:47,210 MODULE_PATHS = [ 2023-10-02T18:50:47,210 normpath (join (SEARCH, "MODULES")) 2023-10-02T18:50:47,211 ], 2023-10-02T18:50:47,212 # 2023-10-02T18:50:47,212 # OPTIONAL 2023-10-02T18:50:47,213 # This is the folder path to remove from the paths in the output. 2023-10-02T18:50:47,214 # 2023-10-02T18:50:47,214 RELATIVE_PATH = SEARCH 2023-10-02T18:50:47,215 ) 2023-10-02T18:50:47,215 ``` 2023-10-02T18:50:47,217 ### NOTES 2023-10-02T18:50:47,217 ``` 2023-10-02T18:50:47,218 Currently all the checks aren't run in parallel, 2023-10-02T18:50:47,218 but sequential order of paths found in glob is not guaranteed. 2023-10-02T18:50:47,219 ``` 2023-10-02T18:50:47,219 ``` 2023-10-02T18:50:47,220 Each check suite found by the glob is started by 2023-10-02T18:50:47,221 a process with a flask API, that is opened on the first available port found. 2023-10-02T18:50:47,221 ``` 2023-10-02T18:50:47,773 running bdist_wheel 2023-10-02T18:50:47,900 running build 2023-10-02T18:50:47,901 running build_py 2023-10-02T18:50:47,929 creating build 2023-10-02T18:50:47,929 creating build/lib 2023-10-02T18:50:47,930 creating build/lib/BODY_SCAN 2023-10-02T18:50:47,931 copying STRUCTURE/MODULES/BODY_SCAN/__init__.py -> build/lib/BODY_SCAN 2023-10-02T18:50:47,933 copying STRUCTURE/MODULES/BODY_SCAN/START_MULTIPLE_PROCESSES.py -> build/lib/BODY_SCAN 2023-10-02T18:50:47,935 creating build/lib/BODY_SCAN/FUNCTIONS 2023-10-02T18:50:47,936 copying STRUCTURE/MODULES/BODY_SCAN/FUNCTIONS/START_THE_CORE_KEG.py -> build/lib/BODY_SCAN/FUNCTIONS 2023-10-02T18:50:47,937 copying STRUCTURE/MODULES/BODY_SCAN/FUNCTIONS/CHECK_STATUS_LOCATION.py -> build/lib/BODY_SCAN/FUNCTIONS 2023-10-02T18:50:47,939 copying STRUCTURE/MODULES/BODY_SCAN/FUNCTIONS/START_A_SCAN.py -> build/lib/BODY_SCAN/FUNCTIONS 2023-10-02T18:50:47,941 creating build/lib/BODY_SCAN/AGGREGATOR 2023-10-02T18:50:47,941 copying STRUCTURE/MODULES/BODY_SCAN/AGGREGATOR/START.py -> build/lib/BODY_SCAN/AGGREGATOR 2023-10-02T18:50:47,944 creating build/lib/BODY_SCAN/AGGREGATE 2023-10-02T18:50:47,945 copying STRUCTURE/MODULES/BODY_SCAN/AGGREGATE/__init__.py -> build/lib/BODY_SCAN/AGGREGATE 2023-10-02T18:50:47,947 creating build/lib/BODY_SCAN/AGGREGATOR/KEG 2023-10-02T18:50:47,948 copying STRUCTURE/MODULES/BODY_SCAN/AGGREGATOR/KEG/__init__.py -> build/lib/BODY_SCAN/AGGREGATOR/KEG 2023-10-02T18:50:47,950 creating build/lib/BODY_SCAN/PROCESSES 2023-10-02T18:50:47,950 creating build/lib/BODY_SCAN/PROCESSES/SCAN 2023-10-02T18:50:47,951 copying STRUCTURE/MODULES/BODY_SCAN/PROCESSES/SCAN/START.py -> build/lib/BODY_SCAN/PROCESSES/SCAN 2023-10-02T18:50:47,953 creating build/lib/BODY_SCAN/PROCESSES/SCAN/KEG 2023-10-02T18:50:47,954 copying STRUCTURE/MODULES/BODY_SCAN/PROCESSES/SCAN/KEG/__init__.py -> build/lib/BODY_SCAN/PROCESSES/SCAN/KEG 2023-10-02T18:50:47,956 copying STRUCTURE/MODULES/BODY_SCAN/PROCESSES/SCAN/KEG/SCAN.py -> build/lib/BODY_SCAN/PROCESSES/SCAN/KEG 2023-10-02T18:50:47,988 /usr/local/lib/python3.11/dist-packages/setuptools/_distutils/cmd.py:66: SetuptoolsDeprecationWarning: setup.py install is deprecated. 2023-10-02T18:50:47,989 !! 2023-10-02T18:50:47,990 ******************************************************************************** 2023-10-02T18:50:47,990 Please avoid running ``setup.py`` directly. 2023-10-02T18:50:47,991 Instead, use pypa/build, pypa/installer or other 2023-10-02T18:50:47,991 standards-based tools. 2023-10-02T18:50:47,993 See https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html for details. 2023-10-02T18:50:47,993 ******************************************************************************** 2023-10-02T18:50:47,994 !! 2023-10-02T18:50:47,995 self.initialize_options() 2023-10-02T18:50:48,013 installing to build/bdist.linux-armv7l/wheel 2023-10-02T18:50:48,014 running install 2023-10-02T18:50:48,038 running install_lib 2023-10-02T18:50:48,063 creating build/bdist.linux-armv7l 2023-10-02T18:50:48,063 creating build/bdist.linux-armv7l/wheel 2023-10-02T18:50:48,065 creating build/bdist.linux-armv7l/wheel/BODY_SCAN 2023-10-02T18:50:48,066 copying build/lib/BODY_SCAN/__init__.py -> build/bdist.linux-armv7l/wheel/BODY_SCAN 2023-10-02T18:50:48,068 creating build/bdist.linux-armv7l/wheel/BODY_SCAN/FUNCTIONS 2023-10-02T18:50:48,069 copying build/lib/BODY_SCAN/FUNCTIONS/START_THE_CORE_KEG.py -> build/bdist.linux-armv7l/wheel/BODY_SCAN/FUNCTIONS 2023-10-02T18:50:48,071 copying build/lib/BODY_SCAN/FUNCTIONS/CHECK_STATUS_LOCATION.py -> build/bdist.linux-armv7l/wheel/BODY_SCAN/FUNCTIONS 2023-10-02T18:50:48,072 copying build/lib/BODY_SCAN/FUNCTIONS/START_A_SCAN.py -> build/bdist.linux-armv7l/wheel/BODY_SCAN/FUNCTIONS 2023-10-02T18:50:48,075 creating build/bdist.linux-armv7l/wheel/BODY_SCAN/AGGREGATOR 2023-10-02T18:50:48,075 copying build/lib/BODY_SCAN/AGGREGATOR/START.py -> build/bdist.linux-armv7l/wheel/BODY_SCAN/AGGREGATOR 2023-10-02T18:50:48,078 creating build/bdist.linux-armv7l/wheel/BODY_SCAN/AGGREGATOR/KEG 2023-10-02T18:50:48,078 copying build/lib/BODY_SCAN/AGGREGATOR/KEG/__init__.py -> build/bdist.linux-armv7l/wheel/BODY_SCAN/AGGREGATOR/KEG 2023-10-02T18:50:48,081 creating build/bdist.linux-armv7l/wheel/BODY_SCAN/AGGREGATE 2023-10-02T18:50:48,082 copying build/lib/BODY_SCAN/AGGREGATE/__init__.py -> build/bdist.linux-armv7l/wheel/BODY_SCAN/AGGREGATE 2023-10-02T18:50:48,084 creating build/bdist.linux-armv7l/wheel/BODY_SCAN/PROCESSES 2023-10-02T18:50:48,085 creating build/bdist.linux-armv7l/wheel/BODY_SCAN/PROCESSES/SCAN 2023-10-02T18:50:48,086 copying build/lib/BODY_SCAN/PROCESSES/SCAN/START.py -> build/bdist.linux-armv7l/wheel/BODY_SCAN/PROCESSES/SCAN 2023-10-02T18:50:48,088 creating build/bdist.linux-armv7l/wheel/BODY_SCAN/PROCESSES/SCAN/KEG 2023-10-02T18:50:48,089 copying build/lib/BODY_SCAN/PROCESSES/SCAN/KEG/__init__.py -> build/bdist.linux-armv7l/wheel/BODY_SCAN/PROCESSES/SCAN/KEG 2023-10-02T18:50:48,091 copying build/lib/BODY_SCAN/PROCESSES/SCAN/KEG/SCAN.py -> build/bdist.linux-armv7l/wheel/BODY_SCAN/PROCESSES/SCAN/KEG 2023-10-02T18:50:48,092 copying build/lib/BODY_SCAN/START_MULTIPLE_PROCESSES.py -> build/bdist.linux-armv7l/wheel/BODY_SCAN 2023-10-02T18:50:48,094 running install_egg_info 2023-10-02T18:50:48,125 running egg_info 2023-10-02T18:50:48,149 writing BODY_SCAN.egg-info/PKG-INFO 2023-10-02T18:50:48,152 writing dependency_links to BODY_SCAN.egg-info/dependency_links.txt 2023-10-02T18:50:48,154 writing requirements to BODY_SCAN.egg-info/requires.txt 2023-10-02T18:50:48,155 writing top-level names to BODY_SCAN.egg-info/top_level.txt 2023-10-02T18:50:48,184 reading manifest file 'BODY_SCAN.egg-info/SOURCES.txt' 2023-10-02T18:50:48,186 adding license file 'LICENSE' 2023-10-02T18:50:48,188 writing manifest file 'BODY_SCAN.egg-info/SOURCES.txt' 2023-10-02T18:50:48,189 Copying BODY_SCAN.egg-info to build/bdist.linux-armv7l/wheel/BODY_SCAN-0.0.20-py3.11.egg-info 2023-10-02T18:50:48,199 running install_scripts 2023-10-02T18:50:48,211 creating build/bdist.linux-armv7l/wheel/BODY_SCAN-0.0.20.dist-info/WHEEL 2023-10-02T18:50:48,214 creating '/tmp/pip-wheel-jl0zs0v6/BODY_SCAN-0.0.20-py3-none-any.whl' and adding 'build/bdist.linux-armv7l/wheel' to it 2023-10-02T18:50:48,216 adding 'BODY_SCAN/START_MULTIPLE_PROCESSES.py' 2023-10-02T18:50:48,217 adding 'BODY_SCAN/__init__.py' 2023-10-02T18:50:48,219 adding 'BODY_SCAN/AGGREGATE/__init__.py' 2023-10-02T18:50:48,221 adding 'BODY_SCAN/AGGREGATOR/START.py' 2023-10-02T18:50:48,222 adding 'BODY_SCAN/AGGREGATOR/KEG/__init__.py' 2023-10-02T18:50:48,224 adding 'BODY_SCAN/FUNCTIONS/CHECK_STATUS_LOCATION.py' 2023-10-02T18:50:48,225 adding 'BODY_SCAN/FUNCTIONS/START_A_SCAN.py' 2023-10-02T18:50:48,226 adding 'BODY_SCAN/FUNCTIONS/START_THE_CORE_KEG.py' 2023-10-02T18:50:48,228 adding 'BODY_SCAN/PROCESSES/SCAN/START.py' 2023-10-02T18:50:48,230 adding 'BODY_SCAN/PROCESSES/SCAN/KEG/SCAN.py' 2023-10-02T18:50:48,232 adding 'BODY_SCAN/PROCESSES/SCAN/KEG/__init__.py' 2023-10-02T18:50:48,234 adding 'BODY_SCAN-0.0.20.dist-info/LICENSE' 2023-10-02T18:50:48,235 adding 'BODY_SCAN-0.0.20.dist-info/METADATA' 2023-10-02T18:50:48,236 adding 'BODY_SCAN-0.0.20.dist-info/WHEEL' 2023-10-02T18:50:48,237 adding 'BODY_SCAN-0.0.20.dist-info/top_level.txt' 2023-10-02T18:50:48,238 adding 'BODY_SCAN-0.0.20.dist-info/RECORD' 2023-10-02T18:50:48,239 removing build/bdist.linux-armv7l/wheel 2023-10-02T18:50:48,359 Building wheel for body-scan (setup.py): finished with status 'done' 2023-10-02T18:50:48,362 Created wheel for body-scan: filename=BODY_SCAN-0.0.20-py3-none-any.whl size=9892 sha256=fb8d5da72e9daa4fd4b17b0a81f315a7413dc041172ff513925092ff841c00b1 2023-10-02T18:50:48,363 Stored in directory: /tmp/pip-ephem-wheel-cache-agt4n96w/wheels/59/34/f8/2e7f7397573b61133b1207738b14b77e9eb1df2702588c5114 2023-10-02T18:50:48,373 Successfully built body-scan 2023-10-02T18:50:48,376 Removed build tracker: '/tmp/pip-build-tracker-d38ddq_r'