2023-10-02T18:50:00,730 Created temporary directory: /tmp/pip-build-tracker-ulxjhuom 2023-10-02T18:50:00,732 Initialized build tracking at /tmp/pip-build-tracker-ulxjhuom 2023-10-02T18:50:00,732 Created build tracker: /tmp/pip-build-tracker-ulxjhuom 2023-10-02T18:50:00,733 Entered build tracker: /tmp/pip-build-tracker-ulxjhuom 2023-10-02T18:50:00,734 Created temporary directory: /tmp/pip-wheel-e9h2vap5 2023-10-02T18:50:00,737 Created temporary directory: /tmp/pip-ephem-wheel-cache-8xvehhx6 2023-10-02T18:50:00,760 Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple 2023-10-02T18:50:00,764 2 location(s) to search for versions of body-scan: 2023-10-02T18:50:00,764 * https://pypi.org/simple/body-scan/ 2023-10-02T18:50:00,764 * https://www.piwheels.org/simple/body-scan/ 2023-10-02T18:50:00,765 Fetching project page and analyzing links: https://pypi.org/simple/body-scan/ 2023-10-02T18:50:00,766 Getting page https://pypi.org/simple/body-scan/ 2023-10-02T18:50:00,767 Found index url https://pypi.org/simple/ 2023-10-02T18:50:00,913 Fetched page https://pypi.org/simple/body-scan/ as application/vnd.pypi.simple.v1+json 2023-10-02T18:50:00,917 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:00,917 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:00,918 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:00,919 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:00,920 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:00,921 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:00,922 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:00,923 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:00,924 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:00,925 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:00,926 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:00,926 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:00,927 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:00,928 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:00,929 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:00,930 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:00,931 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:00,931 Fetching project page and analyzing links: https://www.piwheels.org/simple/body-scan/ 2023-10-02T18:50:00,932 Getting page https://www.piwheels.org/simple/body-scan/ 2023-10-02T18:50:00,933 Found index url https://www.piwheels.org/simple/ 2023-10-02T18:50:01,092 Fetched page https://www.piwheels.org/simple/body-scan/ as text/html 2023-10-02T18:50:01,097 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:01,097 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:01,098 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:01,098 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:01,099 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:01,099 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:01,100 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:01,100 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:01,101 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:01,101 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:01,102 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:01,102 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:01,103 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:01,103 Skipping link: not a file: https://www.piwheels.org/simple/body-scan/ 2023-10-02T18:50:01,104 Skipping link: not a file: https://pypi.org/simple/body-scan/ 2023-10-02T18:50:01,124 Given no hashes to check 1 links for project 'body-scan': discarding no candidates 2023-10-02T18:50:01,142 Collecting body-scan==0.0.19 2023-10-02T18:50:01,144 Created temporary directory: /tmp/pip-unpack-77764aoi 2023-10-02T18:50:01,360 Downloading BODY_SCAN-0.0.19.tar.gz (7.2 kB) 2023-10-02T18:50:01,409 Added body-scan==0.0.19 from https://files.pythonhosted.org/packages/06/ef/d681b5d6e3fac73ea73a92b7405dc0753be266f6277288197a26522acbd8/BODY_SCAN-0.0.19.tar.gz to build tracker '/tmp/pip-build-tracker-ulxjhuom' 2023-10-02T18:50:01,411 Running setup.py (path:/tmp/pip-wheel-e9h2vap5/body-scan_caa14fb0568949b2999d7d31687719f5/setup.py) egg_info for package body-scan 2023-10-02T18:50:01,412 Created temporary directory: /tmp/pip-pip-egg-info-ntg2o3m8 2023-10-02T18:50:01,413 Preparing metadata (setup.py): started 2023-10-02T18:50:01,414 Running command python setup.py egg_info 2023-10-02T18:50:02,477 # BODY SCAN 2023-10-02T18:50:02,478 ## EXAMPLE OUTPUT: 2023-10-02T18:50:02,479 ```JSON 2023-10-02T18:50:02,479 { 2023-10-02T18:50:02,480 "PATHS": [ 2023-10-02T18:50:02,480 { 2023-10-02T18:50:02,481 "PATH": "PATH_1_HEALTH.py", 2023-10-02T18:50:02,481 "STATS": { 2023-10-02T18:50:02,482 "PASSES": 2, 2023-10-02T18:50:02,483 "ALARMS": 1 2023-10-02T18:50:02,483 }, 2023-10-02T18:50:02,484 "CHECKS": [ 2023-10-02T18:50:02,484 { 2023-10-02T18:50:02,485 "CHECK": "CHECK 1", 2023-10-02T18:50:02,485 "PASSED": true, 2023-10-02T18:50:02,486 "ELAPSED": [ 2023-10-02T18:50:02,486 5.320599666447379e-05, 2023-10-02T18:50:02,487 "SECONDS" 2023-10-02T18:50:02,487 ] 2023-10-02T18:50:02,488 }, 2023-10-02T18:50:02,489 { 2023-10-02T18:50:02,489 "CHECK": "CHECK 2", 2023-10-02T18:50:02,490 "PASSED": true, 2023-10-02T18:50:02,490 "ELAPSED": [ 2023-10-02T18:50:02,491 1.0949999705189839e-05, 2023-10-02T18:50:02,491 "SECONDS" 2023-10-02T18:50:02,492 ] 2023-10-02T18:50:02,492 }, 2023-10-02T18:50:02,493 { 2023-10-02T18:50:02,493 "CHECK": "CHECK 3", 2023-10-02T18:50:02,494 "PASSED": false, 2023-10-02T18:50:02,495 "EXCEPTION": "Exception('NOT 100%')", 2023-10-02T18:50:02,495 "EXCEPTION TRACE": [ 2023-10-02T18:50:02,496 "Traceback (most recent call last):", 2023-10-02T18:50:02,496 " File \"/REPTILIAN_CLIMATES/MODULES/BODY_SCAN/src/SCAN_PROC/KEG/SCAN.py\", line 69, in SCAN", 2023-10-02T18:50:02,497 " CHECKS [ CHECK ] ()", 2023-10-02T18:50:02,497 " File \"\", line 24, in CHECK_3", 2023-10-02T18:50:02,498 "Exception: NOT 100%" 2023-10-02T18:50:02,498 ] 2023-10-02T18:50:02,499 } 2023-10-02T18:50:02,500 ] 2023-10-02T18:50:02,500 }, 2023-10-02T18:50:02,501 { 2023-10-02T18:50:02,501 "PATH": "PATH_2_HEALTH.py", 2023-10-02T18:50:02,501 "EMPTY": true 2023-10-02T18:50:02,502 } 2023-10-02T18:50:02,502 ], 2023-10-02T18:50:02,503 "STATS": { 2023-10-02T18:50:02,503 "EMPTY": 1, 2023-10-02T18:50:02,504 "CHECKS": { 2023-10-02T18:50:02,504 "PASSES": 2, 2023-10-02T18:50:02,505 "ALARMS": 1 2023-10-02T18:50:02,505 } 2023-10-02T18:50:02,505 } 2023-10-02T18:50:02,506 } 2023-10-02T18:50:02,506 ``` 2023-10-02T18:50:02,507 ## HOW TO WRITE CHECKS: 2023-10-02T18:50:02,508 The "CHECKS" dictionary is retrieved with the python "exec" 2023-10-02T18:50:02,509 and then each "CHECK" in "CHECKS" is run. 2023-10-02T18:50:02,509 These checks correspond to the example output shown above. 2023-10-02T18:50:02,510 ``` 2023-10-02T18:50:02,510 PATH_1_HEALTH.py 2023-10-02T18:50:02,511 ``` 2023-10-02T18:50:02,511 ``` 2023-10-02T18:50:02,512 def CHECK_1 (): 2023-10-02T18:50:02,512 print ("CHECK 1") 2023-10-02T18:50:02,513 def CHECK_2 (): 2023-10-02T18:50:02,514 print ("CHECK 2") 2023-10-02T18:50:02,515 def CHECK_3 (): 2023-10-02T18:50:02,515 raise Exception ("NOT 100%") 2023-10-02T18:50:02,516 CHECKS = { 2023-10-02T18:50:02,516 "CHECK 1": CHECK_1, 2023-10-02T18:50:02,517 "CHECK 2": CHECK_2, 2023-10-02T18:50:02,517 "CHECK 3": CHECK_3 2023-10-02T18:50:02,518 } 2023-10-02T18:50:02,518 ``` 2023-10-02T18:50:02,519 ``` 2023-10-02T18:50:02,519 PATH_2_HEALTH.py 2023-10-02T18:50:02,520 ``` 2023-10-02T18:50:02,520 ``` 2023-10-02T18:50:02,521 # 2023-10-02T18:50:02,521 # There isn't a "CHECKS" dictionary present, 2023-10-02T18:50:02,522 # so the scanner reports: 2023-10-02T18:50:02,522 # 2023-10-02T18:50:02,523 # "EMPTY": true 2023-10-02T18:50:02,523 # 2023-10-02T18:50:02,524 ``` 2023-10-02T18:50:02,525 ## HOW TO START THE BODY SCANNER 2023-10-02T18:50:02,526 ```python3 2023-10-02T18:50:02,526 import BODY_SCAN 2023-10-02T18:50:02,527 import pathlib 2023-10-02T18:50:02,528 THIS_FOLDER = pathlib.Path (__file__).parent.resolve () 2023-10-02T18:50:02,529 from os.path import dirname, join, normpath 2023-10-02T18:50:02,530 SEARCH = normpath (join (THIS_FOLDER, "MODULE")) 2023-10-02T18:50:02,531 SCAN = BODY_SCAN.START ( 2023-10-02T18:50:02,532 # 2023-10-02T18:50:02,532 # REQUIRED 2023-10-02T18:50:02,533 # This is all the files that are sent to the scanner. 2023-10-02T18:50:02,533 # 2023-10-02T18:50:02,534 GLOB = SEARCH + '/**/*HEALTH.py', 2023-10-02T18:50:02,535 # 2023-10-02T18:50:02,536 # OPTIONAL 2023-10-02T18:50:02,536 # These are the folders that are added to "sys.path" 2023-10-02T18:50:02,537 # 2023-10-02T18:50:02,537 MODULE_PATHS = [ 2023-10-02T18:50:02,538 normpath (join (SEARCH, "MODULES")) 2023-10-02T18:50:02,538 ], 2023-10-02T18:50:02,539 # 2023-10-02T18:50:02,540 # OPTIONAL 2023-10-02T18:50:02,540 # This is the folder path to remove from the paths in the output. 2023-10-02T18:50:02,541 # 2023-10-02T18:50:02,541 RELATIVE_PATH = SEARCH 2023-10-02T18:50:02,542 ) 2023-10-02T18:50:02,542 ``` 2023-10-02T18:50:02,543 ### NOTES 2023-10-02T18:50:02,544 ``` 2023-10-02T18:50:02,544 Currently all the checks aren't run in parallel, 2023-10-02T18:50:02,545 but sequential order of paths found in glob is not guaranteed. 2023-10-02T18:50:02,546 ``` 2023-10-02T18:50:02,546 ``` 2023-10-02T18:50:02,547 Each check suite found by the glob is started by 2023-10-02T18:50:02,547 a process with a flask API, that is opened on the first available port found. 2023-10-02T18:50:02,548 ``` 2023-10-02T18:50:02,549 running egg_info 2023-10-02T18:50:02,550 creating /tmp/pip-pip-egg-info-ntg2o3m8/BODY_SCAN.egg-info 2023-10-02T18:50:02,551 writing /tmp/pip-pip-egg-info-ntg2o3m8/BODY_SCAN.egg-info/PKG-INFO 2023-10-02T18:50:02,551 writing dependency_links to /tmp/pip-pip-egg-info-ntg2o3m8/BODY_SCAN.egg-info/dependency_links.txt 2023-10-02T18:50:02,552 writing requirements to /tmp/pip-pip-egg-info-ntg2o3m8/BODY_SCAN.egg-info/requires.txt 2023-10-02T18:50:02,553 writing top-level names to /tmp/pip-pip-egg-info-ntg2o3m8/BODY_SCAN.egg-info/top_level.txt 2023-10-02T18:50:02,553 writing manifest file '/tmp/pip-pip-egg-info-ntg2o3m8/BODY_SCAN.egg-info/SOURCES.txt' 2023-10-02T18:50:02,620 reading manifest file '/tmp/pip-pip-egg-info-ntg2o3m8/BODY_SCAN.egg-info/SOURCES.txt' 2023-10-02T18:50:02,622 adding license file 'LICENSE' 2023-10-02T18:50:02,624 writing manifest file '/tmp/pip-pip-egg-info-ntg2o3m8/BODY_SCAN.egg-info/SOURCES.txt' 2023-10-02T18:50:02,733 Preparing metadata (setup.py): finished with status 'done' 2023-10-02T18:50:02,737 Source in /tmp/pip-wheel-e9h2vap5/body-scan_caa14fb0568949b2999d7d31687719f5 has version 0.0.19, which satisfies requirement body-scan==0.0.19 from https://files.pythonhosted.org/packages/06/ef/d681b5d6e3fac73ea73a92b7405dc0753be266f6277288197a26522acbd8/BODY_SCAN-0.0.19.tar.gz 2023-10-02T18:50:02,738 Removed body-scan==0.0.19 from https://files.pythonhosted.org/packages/06/ef/d681b5d6e3fac73ea73a92b7405dc0753be266f6277288197a26522acbd8/BODY_SCAN-0.0.19.tar.gz from build tracker '/tmp/pip-build-tracker-ulxjhuom' 2023-10-02T18:50:02,742 Created temporary directory: /tmp/pip-unpack-89j3jsj4 2023-10-02T18:50:02,743 Created temporary directory: /tmp/pip-unpack-k_9gqndz 2023-10-02T18:50:02,748 Building wheels for collected packages: body-scan 2023-10-02T18:50:02,753 Created temporary directory: /tmp/pip-wheel-iqxexyv5 2023-10-02T18:50:02,753 Building wheel for body-scan (setup.py): started 2023-10-02T18:50:02,754 Destination directory: /tmp/pip-wheel-iqxexyv5 2023-10-02T18:50:02,755 Running command python setup.py bdist_wheel 2023-10-02T18:50:03,156 # BODY SCAN 2023-10-02T18:50:03,157 ## EXAMPLE OUTPUT: 2023-10-02T18:50:03,157 ```JSON 2023-10-02T18:50:03,158 { 2023-10-02T18:50:03,158 "PATHS": [ 2023-10-02T18:50:03,159 { 2023-10-02T18:50:03,160 "PATH": "PATH_1_HEALTH.py", 2023-10-02T18:50:03,160 "STATS": { 2023-10-02T18:50:03,161 "PASSES": 2, 2023-10-02T18:50:03,161 "ALARMS": 1 2023-10-02T18:50:03,162 }, 2023-10-02T18:50:03,163 "CHECKS": [ 2023-10-02T18:50:03,163 { 2023-10-02T18:50:03,164 "CHECK": "CHECK 1", 2023-10-02T18:50:03,164 "PASSED": true, 2023-10-02T18:50:03,165 "ELAPSED": [ 2023-10-02T18:50:03,165 5.320599666447379e-05, 2023-10-02T18:50:03,166 "SECONDS" 2023-10-02T18:50:03,167 ] 2023-10-02T18:50:03,167 }, 2023-10-02T18:50:03,168 { 2023-10-02T18:50:03,168 "CHECK": "CHECK 2", 2023-10-02T18:50:03,169 "PASSED": true, 2023-10-02T18:50:03,169 "ELAPSED": [ 2023-10-02T18:50:03,170 1.0949999705189839e-05, 2023-10-02T18:50:03,170 "SECONDS" 2023-10-02T18:50:03,171 ] 2023-10-02T18:50:03,171 }, 2023-10-02T18:50:03,172 { 2023-10-02T18:50:03,173 "CHECK": "CHECK 3", 2023-10-02T18:50:03,173 "PASSED": false, 2023-10-02T18:50:03,174 "EXCEPTION": "Exception('NOT 100%')", 2023-10-02T18:50:03,174 "EXCEPTION TRACE": [ 2023-10-02T18:50:03,175 "Traceback (most recent call last):", 2023-10-02T18:50:03,175 " File \"/REPTILIAN_CLIMATES/MODULES/BODY_SCAN/src/SCAN_PROC/KEG/SCAN.py\", line 69, in SCAN", 2023-10-02T18:50:03,176 " CHECKS [ CHECK ] ()", 2023-10-02T18:50:03,177 " File \"\", line 24, in CHECK_3", 2023-10-02T18:50:03,177 "Exception: NOT 100%" 2023-10-02T18:50:03,178 ] 2023-10-02T18:50:03,179 } 2023-10-02T18:50:03,179 ] 2023-10-02T18:50:03,179 }, 2023-10-02T18:50:03,180 { 2023-10-02T18:50:03,180 "PATH": "PATH_2_HEALTH.py", 2023-10-02T18:50:03,181 "EMPTY": true 2023-10-02T18:50:03,181 } 2023-10-02T18:50:03,182 ], 2023-10-02T18:50:03,182 "STATS": { 2023-10-02T18:50:03,182 "EMPTY": 1, 2023-10-02T18:50:03,183 "CHECKS": { 2023-10-02T18:50:03,183 "PASSES": 2, 2023-10-02T18:50:03,184 "ALARMS": 1 2023-10-02T18:50:03,184 } 2023-10-02T18:50:03,185 } 2023-10-02T18:50:03,185 } 2023-10-02T18:50:03,185 ``` 2023-10-02T18:50:03,186 ## HOW TO WRITE CHECKS: 2023-10-02T18:50:03,187 The "CHECKS" dictionary is retrieved with the python "exec" 2023-10-02T18:50:03,188 and then each "CHECK" in "CHECKS" is run. 2023-10-02T18:50:03,189 These checks correspond to the example output shown above. 2023-10-02T18:50:03,189 ``` 2023-10-02T18:50:03,190 PATH_1_HEALTH.py 2023-10-02T18:50:03,190 ``` 2023-10-02T18:50:03,190 ``` 2023-10-02T18:50:03,191 def CHECK_1 (): 2023-10-02T18:50:03,191 print ("CHECK 1") 2023-10-02T18:50:03,192 def CHECK_2 (): 2023-10-02T18:50:03,193 print ("CHECK 2") 2023-10-02T18:50:03,194 def CHECK_3 (): 2023-10-02T18:50:03,194 raise Exception ("NOT 100%") 2023-10-02T18:50:03,195 CHECKS = { 2023-10-02T18:50:03,196 "CHECK 1": CHECK_1, 2023-10-02T18:50:03,196 "CHECK 2": CHECK_2, 2023-10-02T18:50:03,197 "CHECK 3": CHECK_3 2023-10-02T18:50:03,197 } 2023-10-02T18:50:03,198 ``` 2023-10-02T18:50:03,198 ``` 2023-10-02T18:50:03,199 PATH_2_HEALTH.py 2023-10-02T18:50:03,199 ``` 2023-10-02T18:50:03,200 ``` 2023-10-02T18:50:03,200 # 2023-10-02T18:50:03,201 # There isn't a "CHECKS" dictionary present, 2023-10-02T18:50:03,201 # so the scanner reports: 2023-10-02T18:50:03,202 # 2023-10-02T18:50:03,203 # "EMPTY": true 2023-10-02T18:50:03,203 # 2023-10-02T18:50:03,203 ``` 2023-10-02T18:50:03,205 ## HOW TO START THE BODY SCANNER 2023-10-02T18:50:03,206 ```python3 2023-10-02T18:50:03,206 import BODY_SCAN 2023-10-02T18:50:03,207 import pathlib 2023-10-02T18:50:03,208 THIS_FOLDER = pathlib.Path (__file__).parent.resolve () 2023-10-02T18:50:03,209 from os.path import dirname, join, normpath 2023-10-02T18:50:03,209 SEARCH = normpath (join (THIS_FOLDER, "MODULE")) 2023-10-02T18:50:03,211 SCAN = BODY_SCAN.START ( 2023-10-02T18:50:03,212 # 2023-10-02T18:50:03,212 # REQUIRED 2023-10-02T18:50:03,213 # This is all the files that are sent to the scanner. 2023-10-02T18:50:03,213 # 2023-10-02T18:50:03,214 GLOB = SEARCH + '/**/*HEALTH.py', 2023-10-02T18:50:03,215 # 2023-10-02T18:50:03,216 # OPTIONAL 2023-10-02T18:50:03,216 # These are the folders that are added to "sys.path" 2023-10-02T18:50:03,217 # 2023-10-02T18:50:03,217 MODULE_PATHS = [ 2023-10-02T18:50:03,218 normpath (join (SEARCH, "MODULES")) 2023-10-02T18:50:03,218 ], 2023-10-02T18:50:03,219 # 2023-10-02T18:50:03,220 # OPTIONAL 2023-10-02T18:50:03,220 # This is the folder path to remove from the paths in the output. 2023-10-02T18:50:03,221 # 2023-10-02T18:50:03,222 RELATIVE_PATH = SEARCH 2023-10-02T18:50:03,222 ) 2023-10-02T18:50:03,223 ``` 2023-10-02T18:50:03,224 ### NOTES 2023-10-02T18:50:03,224 ``` 2023-10-02T18:50:03,225 Currently all the checks aren't run in parallel, 2023-10-02T18:50:03,225 but sequential order of paths found in glob is not guaranteed. 2023-10-02T18:50:03,226 ``` 2023-10-02T18:50:03,226 ``` 2023-10-02T18:50:03,227 Each check suite found by the glob is started by 2023-10-02T18:50:03,227 a process with a flask API, that is opened on the first available port found. 2023-10-02T18:50:03,228 ``` 2023-10-02T18:50:03,743 running bdist_wheel 2023-10-02T18:50:03,835 running build 2023-10-02T18:50:03,835 running build_py 2023-10-02T18:50:03,861 creating build 2023-10-02T18:50:03,862 creating build/lib 2023-10-02T18:50:03,862 creating build/lib/BODY_SCAN 2023-10-02T18:50:03,863 copying STRUCTURE/MODULES/BODY_SCAN/START_MULTIPLE_PROCESSES.py -> build/lib/BODY_SCAN 2023-10-02T18:50:03,865 copying STRUCTURE/MODULES/BODY_SCAN/__init__.py -> build/lib/BODY_SCAN 2023-10-02T18:50:03,867 creating build/lib/BODY_SCAN/FUNCTIONS 2023-10-02T18:50:03,868 copying STRUCTURE/MODULES/BODY_SCAN/FUNCTIONS/START_THE_CORE_KEG.py -> build/lib/BODY_SCAN/FUNCTIONS 2023-10-02T18:50:03,870 copying STRUCTURE/MODULES/BODY_SCAN/FUNCTIONS/CHECK_STATUS_LOCATION.py -> build/lib/BODY_SCAN/FUNCTIONS 2023-10-02T18:50:03,871 copying STRUCTURE/MODULES/BODY_SCAN/FUNCTIONS/START_A_SCAN.py -> build/lib/BODY_SCAN/FUNCTIONS 2023-10-02T18:50:03,874 creating build/lib/BODY_SCAN/AGGREGATE 2023-10-02T18:50:03,874 copying STRUCTURE/MODULES/BODY_SCAN/AGGREGATE/__init__.py -> build/lib/BODY_SCAN/AGGREGATE 2023-10-02T18:50:03,877 creating build/lib/BODY_SCAN/AGGREGATOR 2023-10-02T18:50:03,877 copying STRUCTURE/MODULES/BODY_SCAN/AGGREGATOR/START.py -> build/lib/BODY_SCAN/AGGREGATOR 2023-10-02T18:50:03,879 creating build/lib/BODY_SCAN/PROCESSES 2023-10-02T18:50:03,880 creating build/lib/BODY_SCAN/PROCESSES/SCAN 2023-10-02T18:50:03,881 copying STRUCTURE/MODULES/BODY_SCAN/PROCESSES/SCAN/START.py -> build/lib/BODY_SCAN/PROCESSES/SCAN 2023-10-02T18:50:03,883 creating build/lib/BODY_SCAN/PROCESSES/SCAN/KEG 2023-10-02T18:50:03,884 copying STRUCTURE/MODULES/BODY_SCAN/PROCESSES/SCAN/KEG/__init__.py -> build/lib/BODY_SCAN/PROCESSES/SCAN/KEG 2023-10-02T18:50:03,886 copying STRUCTURE/MODULES/BODY_SCAN/PROCESSES/SCAN/KEG/SCAN.py -> build/lib/BODY_SCAN/PROCESSES/SCAN/KEG 2023-10-02T18:50:03,888 creating build/lib/BODY_SCAN/AGGREGATOR/KEG 2023-10-02T18:50:03,889 copying STRUCTURE/MODULES/BODY_SCAN/AGGREGATOR/KEG/__init__.py -> build/lib/BODY_SCAN/AGGREGATOR/KEG 2023-10-02T18:50:03,919 /usr/local/lib/python3.11/dist-packages/setuptools/_distutils/cmd.py:66: SetuptoolsDeprecationWarning: setup.py install is deprecated. 2023-10-02T18:50:03,919 !! 2023-10-02T18:50:03,921 ******************************************************************************** 2023-10-02T18:50:03,921 Please avoid running ``setup.py`` directly. 2023-10-02T18:50:03,922 Instead, use pypa/build, pypa/installer or other 2023-10-02T18:50:03,922 standards-based tools. 2023-10-02T18:50:03,923 See https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html for details. 2023-10-02T18:50:03,924 ******************************************************************************** 2023-10-02T18:50:03,925 !! 2023-10-02T18:50:03,926 self.initialize_options() 2023-10-02T18:50:03,946 installing to build/bdist.linux-armv7l/wheel 2023-10-02T18:50:03,947 running install 2023-10-02T18:50:03,970 running install_lib 2023-10-02T18:50:03,994 creating build/bdist.linux-armv7l 2023-10-02T18:50:03,994 creating build/bdist.linux-armv7l/wheel 2023-10-02T18:50:03,996 creating build/bdist.linux-armv7l/wheel/BODY_SCAN 2023-10-02T18:50:03,997 creating build/bdist.linux-armv7l/wheel/BODY_SCAN/FUNCTIONS 2023-10-02T18:50:03,998 copying build/lib/BODY_SCAN/FUNCTIONS/START_THE_CORE_KEG.py -> build/bdist.linux-armv7l/wheel/BODY_SCAN/FUNCTIONS 2023-10-02T18:50:04,000 copying build/lib/BODY_SCAN/FUNCTIONS/CHECK_STATUS_LOCATION.py -> build/bdist.linux-armv7l/wheel/BODY_SCAN/FUNCTIONS 2023-10-02T18:50:04,002 copying build/lib/BODY_SCAN/FUNCTIONS/START_A_SCAN.py -> build/bdist.linux-armv7l/wheel/BODY_SCAN/FUNCTIONS 2023-10-02T18:50:04,004 creating build/bdist.linux-armv7l/wheel/BODY_SCAN/PROCESSES 2023-10-02T18:50:04,005 creating build/bdist.linux-armv7l/wheel/BODY_SCAN/PROCESSES/SCAN 2023-10-02T18:50:04,006 creating build/bdist.linux-armv7l/wheel/BODY_SCAN/PROCESSES/SCAN/KEG 2023-10-02T18:50:04,007 copying build/lib/BODY_SCAN/PROCESSES/SCAN/KEG/__init__.py -> build/bdist.linux-armv7l/wheel/BODY_SCAN/PROCESSES/SCAN/KEG 2023-10-02T18:50:04,009 copying build/lib/BODY_SCAN/PROCESSES/SCAN/KEG/SCAN.py -> build/bdist.linux-armv7l/wheel/BODY_SCAN/PROCESSES/SCAN/KEG 2023-10-02T18:50:04,011 copying build/lib/BODY_SCAN/PROCESSES/SCAN/START.py -> build/bdist.linux-armv7l/wheel/BODY_SCAN/PROCESSES/SCAN 2023-10-02T18:50:04,013 copying build/lib/BODY_SCAN/START_MULTIPLE_PROCESSES.py -> build/bdist.linux-armv7l/wheel/BODY_SCAN 2023-10-02T18:50:04,015 copying build/lib/BODY_SCAN/__init__.py -> build/bdist.linux-armv7l/wheel/BODY_SCAN 2023-10-02T18:50:04,017 creating build/bdist.linux-armv7l/wheel/BODY_SCAN/AGGREGATE 2023-10-02T18:50:04,017 copying build/lib/BODY_SCAN/AGGREGATE/__init__.py -> build/bdist.linux-armv7l/wheel/BODY_SCAN/AGGREGATE 2023-10-02T18:50:04,019 creating build/bdist.linux-armv7l/wheel/BODY_SCAN/AGGREGATOR 2023-10-02T18:50:04,020 creating build/bdist.linux-armv7l/wheel/BODY_SCAN/AGGREGATOR/KEG 2023-10-02T18:50:04,021 copying build/lib/BODY_SCAN/AGGREGATOR/KEG/__init__.py -> build/bdist.linux-armv7l/wheel/BODY_SCAN/AGGREGATOR/KEG 2023-10-02T18:50:04,023 copying build/lib/BODY_SCAN/AGGREGATOR/START.py -> build/bdist.linux-armv7l/wheel/BODY_SCAN/AGGREGATOR 2023-10-02T18:50:04,025 running install_egg_info 2023-10-02T18:50:04,084 running egg_info 2023-10-02T18:50:04,108 writing BODY_SCAN.egg-info/PKG-INFO 2023-10-02T18:50:04,110 writing dependency_links to BODY_SCAN.egg-info/dependency_links.txt 2023-10-02T18:50:04,112 writing requirements to BODY_SCAN.egg-info/requires.txt 2023-10-02T18:50:04,113 writing top-level names to BODY_SCAN.egg-info/top_level.txt 2023-10-02T18:50:04,141 reading manifest file 'BODY_SCAN.egg-info/SOURCES.txt' 2023-10-02T18:50:04,143 adding license file 'LICENSE' 2023-10-02T18:50:04,145 writing manifest file 'BODY_SCAN.egg-info/SOURCES.txt' 2023-10-02T18:50:04,146 Copying BODY_SCAN.egg-info to build/bdist.linux-armv7l/wheel/BODY_SCAN-0.0.19-py3.11.egg-info 2023-10-02T18:50:04,155 running install_scripts 2023-10-02T18:50:04,168 creating build/bdist.linux-armv7l/wheel/BODY_SCAN-0.0.19.dist-info/WHEEL 2023-10-02T18:50:04,170 creating '/tmp/pip-wheel-iqxexyv5/BODY_SCAN-0.0.19-py3-none-any.whl' and adding 'build/bdist.linux-armv7l/wheel' to it 2023-10-02T18:50:04,172 adding 'BODY_SCAN/START_MULTIPLE_PROCESSES.py' 2023-10-02T18:50:04,173 adding 'BODY_SCAN/__init__.py' 2023-10-02T18:50:04,175 adding 'BODY_SCAN/AGGREGATE/__init__.py' 2023-10-02T18:50:04,177 adding 'BODY_SCAN/AGGREGATOR/START.py' 2023-10-02T18:50:04,179 adding 'BODY_SCAN/AGGREGATOR/KEG/__init__.py' 2023-10-02T18:50:04,180 adding 'BODY_SCAN/FUNCTIONS/CHECK_STATUS_LOCATION.py' 2023-10-02T18:50:04,182 adding 'BODY_SCAN/FUNCTIONS/START_A_SCAN.py' 2023-10-02T18:50:04,183 adding 'BODY_SCAN/FUNCTIONS/START_THE_CORE_KEG.py' 2023-10-02T18:50:04,185 adding 'BODY_SCAN/PROCESSES/SCAN/START.py' 2023-10-02T18:50:04,187 adding 'BODY_SCAN/PROCESSES/SCAN/KEG/SCAN.py' 2023-10-02T18:50:04,188 adding 'BODY_SCAN/PROCESSES/SCAN/KEG/__init__.py' 2023-10-02T18:50:04,190 adding 'BODY_SCAN-0.0.19.dist-info/LICENSE' 2023-10-02T18:50:04,191 adding 'BODY_SCAN-0.0.19.dist-info/METADATA' 2023-10-02T18:50:04,192 adding 'BODY_SCAN-0.0.19.dist-info/WHEEL' 2023-10-02T18:50:04,193 adding 'BODY_SCAN-0.0.19.dist-info/top_level.txt' 2023-10-02T18:50:04,194 adding 'BODY_SCAN-0.0.19.dist-info/RECORD' 2023-10-02T18:50:04,195 removing build/bdist.linux-armv7l/wheel 2023-10-02T18:50:04,313 Building wheel for body-scan (setup.py): finished with status 'done' 2023-10-02T18:50:04,316 Created wheel for body-scan: filename=BODY_SCAN-0.0.19-py3-none-any.whl size=9884 sha256=174e99b1839f7c0ceef0dfb193fa64e1fc0275eab3cb2bed4d08427e579d26a5 2023-10-02T18:50:04,317 Stored in directory: /tmp/pip-ephem-wheel-cache-8xvehhx6/wheels/25/06/67/f7177e7c5cf3bfcd8b765b5ef586ed0d19a53d190f5a4f4885 2023-10-02T18:50:04,327 Successfully built body-scan 2023-10-02T18:50:04,330 Removed build tracker: '/tmp/pip-build-tracker-ulxjhuom'