2023-10-13T05:39:11,721 Created temporary directory: /tmp/pip-build-tracker-k_50nqon 2023-10-13T05:39:11,722 Initialized build tracking at /tmp/pip-build-tracker-k_50nqon 2023-10-13T05:39:11,723 Created build tracker: /tmp/pip-build-tracker-k_50nqon 2023-10-13T05:39:11,723 Entered build tracker: /tmp/pip-build-tracker-k_50nqon 2023-10-13T05:39:11,724 Created temporary directory: /tmp/pip-wheel-u_cfa8l5 2023-10-13T05:39:11,727 Created temporary directory: /tmp/pip-ephem-wheel-cache-_c1c_l60 2023-10-13T05:39:11,749 Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple 2023-10-13T05:39:11,753 2 location(s) to search for versions of body-scan: 2023-10-13T05:39:11,753 * https://pypi.org/simple/body-scan/ 2023-10-13T05:39:11,753 * https://www.piwheels.org/simple/body-scan/ 2023-10-13T05:39:11,753 Fetching project page and analyzing links: https://pypi.org/simple/body-scan/ 2023-10-13T05:39:11,754 Getting page https://pypi.org/simple/body-scan/ 2023-10-13T05:39:11,756 Found index url https://pypi.org/simple/ 2023-10-13T05:39:11,898 Fetched page https://pypi.org/simple/body-scan/ as application/vnd.pypi.simple.v1+json 2023-10-13T05:39:11,903 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-13T05:39:11,904 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-13T05:39:11,904 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-13T05:39:11,905 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-13T05:39:11,906 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-13T05:39:11,906 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-13T05:39:11,907 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-13T05:39:11,907 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-13T05:39:11,908 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-13T05:39:11,909 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-13T05:39:11,909 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-13T05:39:11,910 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-13T05:39:11,910 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-13T05:39:11,911 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-13T05:39:11,912 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-13T05:39:11,913 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-13T05:39:11,913 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-13T05:39:11,914 Found link https://files.pythonhosted.org/packages/93/6d/df362c1f36ce5e054cbebbd4aa8d1438139fea5e16058edfe40fa2fa6594/BODY_SCAN-0.0.21.tar.gz (from https://pypi.org/simple/body-scan/), version: 0.0.21 2023-10-13T05:39:11,915 Found link https://files.pythonhosted.org/packages/c6/83/cbcaf38e8e16f828bce294dc7af40a6f9bcb4d6b56e665b89d8d7ba1c489/BODY_SCAN-0.0.22.tar.gz (from https://pypi.org/simple/body-scan/), version: 0.0.22 2023-10-13T05:39:11,915 Found link https://files.pythonhosted.org/packages/09/c3/8907db4800fb59544af2b994894454fa55dc5e6ab965b7f3574a96973211/BODY_SCAN-0.0.23.tar.gz (from https://pypi.org/simple/body-scan/), version: 0.0.23 2023-10-13T05:39:11,916 Found link https://files.pythonhosted.org/packages/dc/ef/dec8e813a3ec038f3993c89b338bba750f3ec3eefd82c6132bf1e7f2cc51/BODY_SCAN-0.0.24.tar.gz (from https://pypi.org/simple/body-scan/), version: 0.0.24 2023-10-13T05:39:11,916 Fetching project page and analyzing links: https://www.piwheels.org/simple/body-scan/ 2023-10-13T05:39:11,917 Getting page https://www.piwheels.org/simple/body-scan/ 2023-10-13T05:39:11,918 Found index url https://www.piwheels.org/simple/ 2023-10-13T05:39:12,087 Fetched page https://www.piwheels.org/simple/body-scan/ as text/html 2023-10-13T05:39:12,093 Skipping link: No binaries permitted for body-scan: https://www.piwheels.org/simple/body-scan/BODY_SCAN-0.0.20-py3-none-any.whl#sha256=fb8d5da72e9daa4fd4b17b0a81f315a7413dc041172ff513925092ff841c00b1 (from https://www.piwheels.org/simple/body-scan/) 2023-10-13T05:39:12,093 Skipping link: No binaries permitted for body-scan: https://www.piwheels.org/simple/body-scan/BODY_SCAN-0.0.19-py3-none-any.whl#sha256=174e99b1839f7c0ceef0dfb193fa64e1fc0275eab3cb2bed4d08427e579d26a5 (from https://www.piwheels.org/simple/body-scan/) 2023-10-13T05:39:12,094 Skipping link: No binaries permitted for body-scan: https://www.piwheels.org/simple/body-scan/BODY_SCAN-0.0.18-py3-none-any.whl#sha256=ef0307789f7458e893b0c5dbb050b7f558c09c450461a20ddfb5a66b8c307436 (from https://www.piwheels.org/simple/body-scan/) 2023-10-13T05:39:12,094 Skipping link: No binaries permitted for body-scan: https://www.piwheels.org/simple/body-scan/BODY_SCAN-0.0.17-py3-none-any.whl#sha256=a7bc1211e58ecece6a095832b16ccfe460a2cb9523e7527df3af1345d0b95546 (from https://www.piwheels.org/simple/body-scan/) 2023-10-13T05:39:12,095 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-13T05:39:12,095 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-13T05:39:12,096 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-13T05:39:12,097 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-13T05:39:12,097 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-13T05:39:12,098 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-13T05:39:12,098 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-13T05:39:12,099 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-13T05:39:12,099 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-13T05:39:12,100 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-13T05:39:12,100 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-13T05:39:12,101 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-13T05:39:12,101 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-13T05:39:12,102 Skipping link: not a file: https://www.piwheels.org/simple/body-scan/ 2023-10-13T05:39:12,102 Skipping link: not a file: https://pypi.org/simple/body-scan/ 2023-10-13T05:39:12,123 Given no hashes to check 1 links for project 'body-scan': discarding no candidates 2023-10-13T05:39:12,142 Collecting body-scan==0.0.22 2023-10-13T05:39:12,144 Created temporary directory: /tmp/pip-unpack-8l2l_3hp 2023-10-13T05:39:12,357 Downloading BODY_SCAN-0.0.22.tar.gz (7.8 kB) 2023-10-13T05:39:12,406 Added body-scan==0.0.22 from https://files.pythonhosted.org/packages/c6/83/cbcaf38e8e16f828bce294dc7af40a6f9bcb4d6b56e665b89d8d7ba1c489/BODY_SCAN-0.0.22.tar.gz to build tracker '/tmp/pip-build-tracker-k_50nqon' 2023-10-13T05:39:12,408 Running setup.py (path:/tmp/pip-wheel-u_cfa8l5/body-scan_a5d0281f3fd44395b04148c5373a4498/setup.py) egg_info for package body-scan 2023-10-13T05:39:12,409 Created temporary directory: /tmp/pip-pip-egg-info-tjq1m8kv 2023-10-13T05:39:12,409 Preparing metadata (setup.py): started 2023-10-13T05:39:12,411 Running command python setup.py egg_info 2023-10-13T05:39:15,661 # BODY SCAN 2023-10-13T05:39:15,663 ## EXAMPLE OUTPUT: 2023-10-13T05:39:15,664 ```JSON 2023-10-13T05:39:15,665 { 2023-10-13T05:39:15,666 "PATHS": [ 2023-10-13T05:39:15,667 { 2023-10-13T05:39:15,668 "PATH": "PATH_1_HEALTH.py", 2023-10-13T05:39:15,670 "STATS": { 2023-10-13T05:39:15,671 "PASSES": 2, 2023-10-13T05:39:15,672 "ALARMS": 1 2023-10-13T05:39:15,673 }, 2023-10-13T05:39:15,674 "CHECKS": [ 2023-10-13T05:39:15,675 { 2023-10-13T05:39:15,675 "CHECK": "CHECK 1", 2023-10-13T05:39:15,676 "PASSED": true, 2023-10-13T05:39:15,677 "ELAPSED": [ 2023-10-13T05:39:15,678 5.320599666447379e-05, 2023-10-13T05:39:15,679 "SECONDS" 2023-10-13T05:39:15,680 ] 2023-10-13T05:39:15,681 }, 2023-10-13T05:39:15,682 { 2023-10-13T05:39:15,683 "CHECK": "CHECK 2", 2023-10-13T05:39:15,684 "PASSED": true, 2023-10-13T05:39:15,685 "ELAPSED": [ 2023-10-13T05:39:15,686 1.0949999705189839e-05, 2023-10-13T05:39:15,687 "SECONDS" 2023-10-13T05:39:15,687 ] 2023-10-13T05:39:15,688 }, 2023-10-13T05:39:15,689 { 2023-10-13T05:39:15,690 "CHECK": "CHECK 3", 2023-10-13T05:39:15,691 "PASSED": false, 2023-10-13T05:39:15,692 "EXCEPTION": "Exception('NOT 100%')", 2023-10-13T05:39:15,693 "EXCEPTION TRACE": [ 2023-10-13T05:39:15,693 "Traceback (most recent call last):", 2023-10-13T05:39:15,694 " File \"/REPTILIAN_CLIMATES/MODULES/BODY_SCAN/src/SCAN_PROC/KEG/SCAN.py\", line 69, in SCAN", 2023-10-13T05:39:15,695 " CHECKS [ CHECK ] ()", 2023-10-13T05:39:15,696 " File \"\", line 24, in CHECK_3", 2023-10-13T05:39:15,697 "Exception: NOT 100%" 2023-10-13T05:39:15,698 ] 2023-10-13T05:39:15,700 } 2023-10-13T05:39:15,701 ] 2023-10-13T05:39:15,703 }, 2023-10-13T05:39:15,704 { 2023-10-13T05:39:15,705 "PATH": "PATH_2_HEALTH.py", 2023-10-13T05:39:15,706 "EMPTY": true 2023-10-13T05:39:15,707 } 2023-10-13T05:39:15,708 ], 2023-10-13T05:39:15,709 "STATS": { 2023-10-13T05:39:15,710 "EMPTY": 1, 2023-10-13T05:39:15,711 "CHECKS": { 2023-10-13T05:39:15,712 "PASSES": 2, 2023-10-13T05:39:15,713 "ALARMS": 1 2023-10-13T05:39:15,714 } 2023-10-13T05:39:15,715 } 2023-10-13T05:39:15,716 } 2023-10-13T05:39:15,717 ``` 2023-10-13T05:39:15,720 ## HOW TO WRITE CHECKS: 2023-10-13T05:39:15,722 The "CHECKS" dictionary is retrieved with the python "exec" 2023-10-13T05:39:15,723 and then each "CHECK" in "CHECKS" is run. 2023-10-13T05:39:15,725 These checks correspond to the example output shown above. 2023-10-13T05:39:15,726 ``` 2023-10-13T05:39:15,727 PATH_1_HEALTH.py 2023-10-13T05:39:15,727 ``` 2023-10-13T05:39:15,728 ``` 2023-10-13T05:39:15,729 def CHECK_1 (): 2023-10-13T05:39:15,730 print ("CHECK 1") 2023-10-13T05:39:15,732 def CHECK_2 (): 2023-10-13T05:39:15,733 print ("CHECK 2") 2023-10-13T05:39:15,735 def CHECK_3 (): 2023-10-13T05:39:15,735 raise Exception ("NOT 100%") 2023-10-13T05:39:15,737 CHECKS = { 2023-10-13T05:39:15,737 "CHECK 1": CHECK_1, 2023-10-13T05:39:15,738 "CHECK 2": CHECK_2, 2023-10-13T05:39:15,739 "CHECK 3": CHECK_3 2023-10-13T05:39:15,739 } 2023-10-13T05:39:15,740 ``` 2023-10-13T05:39:15,740 ``` 2023-10-13T05:39:15,741 PATH_2_HEALTH.py 2023-10-13T05:39:15,742 ``` 2023-10-13T05:39:15,742 ``` 2023-10-13T05:39:15,743 # 2023-10-13T05:39:15,744 # There isn't a "CHECKS" dictionary present, 2023-10-13T05:39:15,744 # so the scanner reports: 2023-10-13T05:39:15,745 # 2023-10-13T05:39:15,746 # "EMPTY": true 2023-10-13T05:39:15,746 # 2023-10-13T05:39:15,747 ``` 2023-10-13T05:39:15,749 ## HOW TO START THE BODY SCANNER 2023-10-13T05:39:15,750 ```python3 2023-10-13T05:39:15,751 import BODY_SCAN 2023-10-13T05:39:15,752 import pathlib 2023-10-13T05:39:15,752 THIS_FOLDER = pathlib.Path (__file__).parent.resolve () 2023-10-13T05:39:15,753 from os.path import dirname, join, normpath 2023-10-13T05:39:15,754 SEARCH = normpath (join (THIS_FOLDER, "MODULE")) 2023-10-13T05:39:15,756 SCAN = BODY_SCAN.START ( 2023-10-13T05:39:15,756 # 2023-10-13T05:39:15,757 # REQUIRED 2023-10-13T05:39:15,757 # This is all the files that are sent to the scanner. 2023-10-13T05:39:15,758 # 2023-10-13T05:39:15,758 GLOB = SEARCH + '/**/*HEALTH.py', 2023-10-13T05:39:15,759 # 2023-10-13T05:39:15,760 # This runs all the checks in a thread pool, 2023-10-13T05:39:15,760 # so maybe at the same time, more or less. 2023-10-13T05:39:15,761 # 2023-10-13T05:39:15,762 SIMULTANEOUS = True, 2023-10-13T05:39:15,763 # 2023-10-13T05:39:15,763 # OPTIONAL 2023-10-13T05:39:15,764 # These are the folders that are added to "sys.path" 2023-10-13T05:39:15,764 # 2023-10-13T05:39:15,765 MODULE_PATHS = [ 2023-10-13T05:39:15,765 normpath (join (SEARCH, "MODULES")) 2023-10-13T05:39:15,766 ], 2023-10-13T05:39:15,767 # 2023-10-13T05:39:15,767 # OPTIONAL 2023-10-13T05:39:15,768 # This is the folder path to remove from the paths in the output. 2023-10-13T05:39:15,768 # 2023-10-13T05:39:15,769 RELATIVE_PATH = SEARCH 2023-10-13T05:39:15,769 ) 2023-10-13T05:39:15,770 ``` 2023-10-13T05:39:15,771 ### NOTES 2023-10-13T05:39:15,771 ``` 2023-10-13T05:39:15,772 Currently all the checks aren't run in parallel, 2023-10-13T05:39:15,773 but sequential order of paths found in glob is not guaranteed. 2023-10-13T05:39:15,773 ``` 2023-10-13T05:39:15,774 ``` 2023-10-13T05:39:15,774 Each check suite found by the glob is started by 2023-10-13T05:39:15,775 a process with a flask API, that is opened on the first available port found. 2023-10-13T05:39:15,776 ``` 2023-10-13T05:39:15,778 running egg_info 2023-10-13T05:39:15,779 creating /tmp/pip-pip-egg-info-tjq1m8kv/BODY_SCAN.egg-info 2023-10-13T05:39:15,779 writing /tmp/pip-pip-egg-info-tjq1m8kv/BODY_SCAN.egg-info/PKG-INFO 2023-10-13T05:39:15,780 writing dependency_links to /tmp/pip-pip-egg-info-tjq1m8kv/BODY_SCAN.egg-info/dependency_links.txt 2023-10-13T05:39:15,781 writing requirements to /tmp/pip-pip-egg-info-tjq1m8kv/BODY_SCAN.egg-info/requires.txt 2023-10-13T05:39:15,781 writing top-level names to /tmp/pip-pip-egg-info-tjq1m8kv/BODY_SCAN.egg-info/top_level.txt 2023-10-13T05:39:15,784 writing manifest file '/tmp/pip-pip-egg-info-tjq1m8kv/BODY_SCAN.egg-info/SOURCES.txt' 2023-10-13T05:39:15,840 reading manifest file '/tmp/pip-pip-egg-info-tjq1m8kv/BODY_SCAN.egg-info/SOURCES.txt' 2023-10-13T05:39:15,842 adding license file 'LICENSE.HTML' 2023-10-13T05:39:15,845 writing manifest file '/tmp/pip-pip-egg-info-tjq1m8kv/BODY_SCAN.egg-info/SOURCES.txt' 2023-10-13T05:39:15,952 Preparing metadata (setup.py): finished with status 'done' 2023-10-13T05:39:15,957 Source in /tmp/pip-wheel-u_cfa8l5/body-scan_a5d0281f3fd44395b04148c5373a4498 has version 0.0.22, which satisfies requirement body-scan==0.0.22 from https://files.pythonhosted.org/packages/c6/83/cbcaf38e8e16f828bce294dc7af40a6f9bcb4d6b56e665b89d8d7ba1c489/BODY_SCAN-0.0.22.tar.gz 2023-10-13T05:39:15,959 Removed body-scan==0.0.22 from https://files.pythonhosted.org/packages/c6/83/cbcaf38e8e16f828bce294dc7af40a6f9bcb4d6b56e665b89d8d7ba1c489/BODY_SCAN-0.0.22.tar.gz from build tracker '/tmp/pip-build-tracker-k_50nqon' 2023-10-13T05:39:15,964 Created temporary directory: /tmp/pip-unpack-w8vmr88q 2023-10-13T05:39:15,965 Created temporary directory: /tmp/pip-unpack-gdv4i36e 2023-10-13T05:39:15,971 Building wheels for collected packages: body-scan 2023-10-13T05:39:15,976 Created temporary directory: /tmp/pip-wheel-4_77e6x5 2023-10-13T05:39:15,977 Building wheel for body-scan (setup.py): started 2023-10-13T05:39:15,978 Destination directory: /tmp/pip-wheel-4_77e6x5 2023-10-13T05:39:15,979 Running command python setup.py bdist_wheel 2023-10-13T05:39:16,394 # BODY SCAN 2023-10-13T05:39:16,394 ## EXAMPLE OUTPUT: 2023-10-13T05:39:16,395 ```JSON 2023-10-13T05:39:16,395 { 2023-10-13T05:39:16,396 "PATHS": [ 2023-10-13T05:39:16,396 { 2023-10-13T05:39:16,397 "PATH": "PATH_1_HEALTH.py", 2023-10-13T05:39:16,397 "STATS": { 2023-10-13T05:39:16,398 "PASSES": 2, 2023-10-13T05:39:16,398 "ALARMS": 1 2023-10-13T05:39:16,398 }, 2023-10-13T05:39:16,399 "CHECKS": [ 2023-10-13T05:39:16,399 { 2023-10-13T05:39:16,400 "CHECK": "CHECK 1", 2023-10-13T05:39:16,400 "PASSED": true, 2023-10-13T05:39:16,401 "ELAPSED": [ 2023-10-13T05:39:16,401 5.320599666447379e-05, 2023-10-13T05:39:16,402 "SECONDS" 2023-10-13T05:39:16,402 ] 2023-10-13T05:39:16,403 }, 2023-10-13T05:39:16,403 { 2023-10-13T05:39:16,403 "CHECK": "CHECK 2", 2023-10-13T05:39:16,404 "PASSED": true, 2023-10-13T05:39:16,404 "ELAPSED": [ 2023-10-13T05:39:16,405 1.0949999705189839e-05, 2023-10-13T05:39:16,405 "SECONDS" 2023-10-13T05:39:16,406 ] 2023-10-13T05:39:16,406 }, 2023-10-13T05:39:16,407 { 2023-10-13T05:39:16,407 "CHECK": "CHECK 3", 2023-10-13T05:39:16,408 "PASSED": false, 2023-10-13T05:39:16,408 "EXCEPTION": "Exception('NOT 100%')", 2023-10-13T05:39:16,409 "EXCEPTION TRACE": [ 2023-10-13T05:39:16,409 "Traceback (most recent call last):", 2023-10-13T05:39:16,410 " File \"/REPTILIAN_CLIMATES/MODULES/BODY_SCAN/src/SCAN_PROC/KEG/SCAN.py\", line 69, in SCAN", 2023-10-13T05:39:16,411 " CHECKS [ CHECK ] ()", 2023-10-13T05:39:16,411 " File \"\", line 24, in CHECK_3", 2023-10-13T05:39:16,412 "Exception: NOT 100%" 2023-10-13T05:39:16,412 ] 2023-10-13T05:39:16,413 } 2023-10-13T05:39:16,414 ] 2023-10-13T05:39:16,414 }, 2023-10-13T05:39:16,415 { 2023-10-13T05:39:16,415 "PATH": "PATH_2_HEALTH.py", 2023-10-13T05:39:16,416 "EMPTY": true 2023-10-13T05:39:16,417 } 2023-10-13T05:39:16,417 ], 2023-10-13T05:39:16,418 "STATS": { 2023-10-13T05:39:16,418 "EMPTY": 1, 2023-10-13T05:39:16,419 "CHECKS": { 2023-10-13T05:39:16,419 "PASSES": 2, 2023-10-13T05:39:16,420 "ALARMS": 1 2023-10-13T05:39:16,421 } 2023-10-13T05:39:16,421 } 2023-10-13T05:39:16,422 } 2023-10-13T05:39:16,422 ``` 2023-10-13T05:39:16,423 ## HOW TO WRITE CHECKS: 2023-10-13T05:39:16,424 The "CHECKS" dictionary is retrieved with the python "exec" 2023-10-13T05:39:16,425 and then each "CHECK" in "CHECKS" is run. 2023-10-13T05:39:16,426 These checks correspond to the example output shown above. 2023-10-13T05:39:16,427 ``` 2023-10-13T05:39:16,427 PATH_1_HEALTH.py 2023-10-13T05:39:16,428 ``` 2023-10-13T05:39:16,428 ``` 2023-10-13T05:39:16,429 def CHECK_1 (): 2023-10-13T05:39:16,429 print ("CHECK 1") 2023-10-13T05:39:16,431 def CHECK_2 (): 2023-10-13T05:39:16,431 print ("CHECK 2") 2023-10-13T05:39:16,432 def CHECK_3 (): 2023-10-13T05:39:16,433 raise Exception ("NOT 100%") 2023-10-13T05:39:16,435 CHECKS = { 2023-10-13T05:39:16,435 "CHECK 1": CHECK_1, 2023-10-13T05:39:16,436 "CHECK 2": CHECK_2, 2023-10-13T05:39:16,436 "CHECK 3": CHECK_3 2023-10-13T05:39:16,437 } 2023-10-13T05:39:16,438 ``` 2023-10-13T05:39:16,438 ``` 2023-10-13T05:39:16,439 PATH_2_HEALTH.py 2023-10-13T05:39:16,440 ``` 2023-10-13T05:39:16,441 ``` 2023-10-13T05:39:16,441 # 2023-10-13T05:39:16,441 # There isn't a "CHECKS" dictionary present, 2023-10-13T05:39:16,442 # so the scanner reports: 2023-10-13T05:39:16,442 # 2023-10-13T05:39:16,443 # "EMPTY": true 2023-10-13T05:39:16,443 # 2023-10-13T05:39:16,443 ``` 2023-10-13T05:39:16,444 ## HOW TO START THE BODY SCANNER 2023-10-13T05:39:16,445 ```python3 2023-10-13T05:39:16,446 import BODY_SCAN 2023-10-13T05:39:16,447 import pathlib 2023-10-13T05:39:16,447 THIS_FOLDER = pathlib.Path (__file__).parent.resolve () 2023-10-13T05:39:16,448 from os.path import dirname, join, normpath 2023-10-13T05:39:16,448 SEARCH = normpath (join (THIS_FOLDER, "MODULE")) 2023-10-13T05:39:16,450 SCAN = BODY_SCAN.START ( 2023-10-13T05:39:16,450 # 2023-10-13T05:39:16,450 # REQUIRED 2023-10-13T05:39:16,451 # This is all the files that are sent to the scanner. 2023-10-13T05:39:16,451 # 2023-10-13T05:39:16,452 GLOB = SEARCH + '/**/*HEALTH.py', 2023-10-13T05:39:16,453 # 2023-10-13T05:39:16,453 # This runs all the checks in a thread pool, 2023-10-13T05:39:16,454 # so maybe at the same time, more or less. 2023-10-13T05:39:16,454 # 2023-10-13T05:39:16,455 SIMULTANEOUS = True, 2023-10-13T05:39:16,455 # 2023-10-13T05:39:16,456 # OPTIONAL 2023-10-13T05:39:16,456 # These are the folders that are added to "sys.path" 2023-10-13T05:39:16,457 # 2023-10-13T05:39:16,457 MODULE_PATHS = [ 2023-10-13T05:39:16,458 normpath (join (SEARCH, "MODULES")) 2023-10-13T05:39:16,458 ], 2023-10-13T05:39:16,459 # 2023-10-13T05:39:16,460 # OPTIONAL 2023-10-13T05:39:16,460 # This is the folder path to remove from the paths in the output. 2023-10-13T05:39:16,461 # 2023-10-13T05:39:16,462 RELATIVE_PATH = SEARCH 2023-10-13T05:39:16,462 ) 2023-10-13T05:39:16,463 ``` 2023-10-13T05:39:16,464 ### NOTES 2023-10-13T05:39:16,464 ``` 2023-10-13T05:39:16,465 Currently all the checks aren't run in parallel, 2023-10-13T05:39:16,466 but sequential order of paths found in glob is not guaranteed. 2023-10-13T05:39:16,466 ``` 2023-10-13T05:39:16,467 ``` 2023-10-13T05:39:16,468 Each check suite found by the glob is started by 2023-10-13T05:39:16,468 a process with a flask API, that is opened on the first available port found. 2023-10-13T05:39:16,469 ``` 2023-10-13T05:39:16,989 running bdist_wheel 2023-10-13T05:39:17,084 running build 2023-10-13T05:39:17,085 running build_py 2023-10-13T05:39:17,111 creating build 2023-10-13T05:39:17,112 creating build/lib 2023-10-13T05:39:17,113 creating build/lib/BODY_SCAN 2023-10-13T05:39:17,115 copying STRUCTURE/MODULES/BODY_SCAN/__init__.py -> build/lib/BODY_SCAN 2023-10-13T05:39:17,117 copying STRUCTURE/MODULES/BODY_SCAN/START_MULTIPLE_PROCESSES.py -> build/lib/BODY_SCAN 2023-10-13T05:39:17,119 creating build/lib/BODY_SCAN/FUNCTIONS 2023-10-13T05:39:17,124 copying STRUCTURE/MODULES/BODY_SCAN/FUNCTIONS/START_A_SCAN.py -> build/lib/BODY_SCAN/FUNCTIONS 2023-10-13T05:39:17,126 copying STRUCTURE/MODULES/BODY_SCAN/FUNCTIONS/CHECK_STATUS_LOCATION.py -> build/lib/BODY_SCAN/FUNCTIONS 2023-10-13T05:39:17,128 creating build/lib/BODY_SCAN/AGGREGATE 2023-10-13T05:39:17,129 copying STRUCTURE/MODULES/BODY_SCAN/AGGREGATE/__init__.py -> build/lib/BODY_SCAN/AGGREGATE 2023-10-13T05:39:17,132 creating build/lib/BODY_SCAN/AGGREGATOR 2023-10-13T05:39:17,133 copying STRUCTURE/MODULES/BODY_SCAN/AGGREGATOR/START.py -> build/lib/BODY_SCAN/AGGREGATOR 2023-10-13T05:39:17,135 creating build/lib/BODY_SCAN/AGGREGATOR/KEG 2023-10-13T05:39:17,136 copying STRUCTURE/MODULES/BODY_SCAN/AGGREGATOR/KEG/__init__.py -> build/lib/BODY_SCAN/AGGREGATOR/KEG 2023-10-13T05:39:17,139 creating build/lib/BODY_SCAN/PROCESSES 2023-10-13T05:39:17,139 creating build/lib/BODY_SCAN/PROCESSES/COLLECT 2023-10-13T05:39:17,141 copying STRUCTURE/MODULES/BODY_SCAN/PROCESSES/COLLECT/PATH.py -> build/lib/BODY_SCAN/PROCESSES/COLLECT 2023-10-13T05:39:17,144 creating build/lib/BODY_SCAN/PROCESSES/SCAN 2023-10-13T05:39:17,145 copying STRUCTURE/MODULES/BODY_SCAN/PROCESSES/SCAN/__init__.py -> build/lib/BODY_SCAN/PROCESSES/SCAN 2023-10-13T05:39:17,147 copying STRUCTURE/MODULES/BODY_SCAN/PROCESSES/SCAN/PATH.py -> build/lib/BODY_SCAN/PROCESSES/SCAN 2023-10-13T05:39:17,149 creating build/lib/BODY_SCAN/PROCESSES/SCAN/KEG 2023-10-13T05:39:17,150 copying STRUCTURE/MODULES/BODY_SCAN/PROCESSES/SCAN/KEG/__init__.py -> build/lib/BODY_SCAN/PROCESSES/SCAN/KEG 2023-10-13T05:39:17,152 copying STRUCTURE/MODULES/BODY_SCAN/PROCESSES/SCAN/KEG/SCAN.py -> build/lib/BODY_SCAN/PROCESSES/SCAN/KEG 2023-10-13T05:39:17,183 /usr/local/lib/python3.11/dist-packages/setuptools/_distutils/cmd.py:66: SetuptoolsDeprecationWarning: setup.py install is deprecated. 2023-10-13T05:39:17,184 !! 2023-10-13T05:39:17,185 ******************************************************************************** 2023-10-13T05:39:17,185 Please avoid running ``setup.py`` directly. 2023-10-13T05:39:17,186 Instead, use pypa/build, pypa/installer or other 2023-10-13T05:39:17,186 standards-based tools. 2023-10-13T05:39:17,187 See https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html for details. 2023-10-13T05:39:17,188 ******************************************************************************** 2023-10-13T05:39:17,189 !! 2023-10-13T05:39:17,189 self.initialize_options() 2023-10-13T05:39:17,208 installing to build/bdist.linux-armv7l/wheel 2023-10-13T05:39:17,208 running install 2023-10-13T05:39:17,232 running install_lib 2023-10-13T05:39:17,257 creating build/bdist.linux-armv7l 2023-10-13T05:39:17,258 creating build/bdist.linux-armv7l/wheel 2023-10-13T05:39:17,259 creating build/bdist.linux-armv7l/wheel/BODY_SCAN 2023-10-13T05:39:17,260 copying build/lib/BODY_SCAN/__init__.py -> build/bdist.linux-armv7l/wheel/BODY_SCAN 2023-10-13T05:39:17,263 creating build/bdist.linux-armv7l/wheel/BODY_SCAN/FUNCTIONS 2023-10-13T05:39:17,264 copying build/lib/BODY_SCAN/FUNCTIONS/START_A_SCAN.py -> build/bdist.linux-armv7l/wheel/BODY_SCAN/FUNCTIONS 2023-10-13T05:39:17,266 copying build/lib/BODY_SCAN/FUNCTIONS/CHECK_STATUS_LOCATION.py -> build/bdist.linux-armv7l/wheel/BODY_SCAN/FUNCTIONS 2023-10-13T05:39:17,269 creating build/bdist.linux-armv7l/wheel/BODY_SCAN/AGGREGATE 2023-10-13T05:39:17,270 copying build/lib/BODY_SCAN/AGGREGATE/__init__.py -> build/bdist.linux-armv7l/wheel/BODY_SCAN/AGGREGATE 2023-10-13T05:39:17,273 creating build/bdist.linux-armv7l/wheel/BODY_SCAN/AGGREGATOR 2023-10-13T05:39:17,273 copying build/lib/BODY_SCAN/AGGREGATOR/START.py -> build/bdist.linux-armv7l/wheel/BODY_SCAN/AGGREGATOR 2023-10-13T05:39:17,276 creating build/bdist.linux-armv7l/wheel/BODY_SCAN/AGGREGATOR/KEG 2023-10-13T05:39:17,277 copying build/lib/BODY_SCAN/AGGREGATOR/KEG/__init__.py -> build/bdist.linux-armv7l/wheel/BODY_SCAN/AGGREGATOR/KEG 2023-10-13T05:39:17,279 copying build/lib/BODY_SCAN/START_MULTIPLE_PROCESSES.py -> build/bdist.linux-armv7l/wheel/BODY_SCAN 2023-10-13T05:39:17,281 creating build/bdist.linux-armv7l/wheel/BODY_SCAN/PROCESSES 2023-10-13T05:39:17,282 creating build/bdist.linux-armv7l/wheel/BODY_SCAN/PROCESSES/COLLECT 2023-10-13T05:39:17,283 copying build/lib/BODY_SCAN/PROCESSES/COLLECT/PATH.py -> build/bdist.linux-armv7l/wheel/BODY_SCAN/PROCESSES/COLLECT 2023-10-13T05:39:17,286 creating build/bdist.linux-armv7l/wheel/BODY_SCAN/PROCESSES/SCAN 2023-10-13T05:39:17,287 copying build/lib/BODY_SCAN/PROCESSES/SCAN/__init__.py -> build/bdist.linux-armv7l/wheel/BODY_SCAN/PROCESSES/SCAN 2023-10-13T05:39:17,289 copying build/lib/BODY_SCAN/PROCESSES/SCAN/PATH.py -> build/bdist.linux-armv7l/wheel/BODY_SCAN/PROCESSES/SCAN 2023-10-13T05:39:17,291 creating build/bdist.linux-armv7l/wheel/BODY_SCAN/PROCESSES/SCAN/KEG 2023-10-13T05:39:17,292 copying build/lib/BODY_SCAN/PROCESSES/SCAN/KEG/__init__.py -> build/bdist.linux-armv7l/wheel/BODY_SCAN/PROCESSES/SCAN/KEG 2023-10-13T05:39:17,295 copying build/lib/BODY_SCAN/PROCESSES/SCAN/KEG/SCAN.py -> build/bdist.linux-armv7l/wheel/BODY_SCAN/PROCESSES/SCAN/KEG 2023-10-13T05:39:17,297 running install_egg_info 2023-10-13T05:39:17,358 running egg_info 2023-10-13T05:39:17,382 writing BODY_SCAN.egg-info/PKG-INFO 2023-10-13T05:39:17,385 writing dependency_links to BODY_SCAN.egg-info/dependency_links.txt 2023-10-13T05:39:17,386 writing requirements to BODY_SCAN.egg-info/requires.txt 2023-10-13T05:39:17,387 writing top-level names to BODY_SCAN.egg-info/top_level.txt 2023-10-13T05:39:17,417 reading manifest file 'BODY_SCAN.egg-info/SOURCES.txt' 2023-10-13T05:39:17,419 adding license file 'LICENSE.HTML' 2023-10-13T05:39:17,421 writing manifest file 'BODY_SCAN.egg-info/SOURCES.txt' 2023-10-13T05:39:17,423 Copying BODY_SCAN.egg-info to build/bdist.linux-armv7l/wheel/BODY_SCAN-0.0.22-py3.11.egg-info 2023-10-13T05:39:17,432 running install_scripts 2023-10-13T05:39:17,445 creating build/bdist.linux-armv7l/wheel/BODY_SCAN-0.0.22.dist-info/WHEEL 2023-10-13T05:39:17,447 creating '/tmp/pip-wheel-4_77e6x5/BODY_SCAN-0.0.22-py3-none-any.whl' and adding 'build/bdist.linux-armv7l/wheel' to it 2023-10-13T05:39:17,450 adding 'BODY_SCAN/START_MULTIPLE_PROCESSES.py' 2023-10-13T05:39:17,451 adding 'BODY_SCAN/__init__.py' 2023-10-13T05:39:17,453 adding 'BODY_SCAN/AGGREGATE/__init__.py' 2023-10-13T05:39:17,455 adding 'BODY_SCAN/AGGREGATOR/START.py' 2023-10-13T05:39:17,456 adding 'BODY_SCAN/AGGREGATOR/KEG/__init__.py' 2023-10-13T05:39:17,458 adding 'BODY_SCAN/FUNCTIONS/CHECK_STATUS_LOCATION.py' 2023-10-13T05:39:17,459 adding 'BODY_SCAN/FUNCTIONS/START_A_SCAN.py' 2023-10-13T05:39:17,461 adding 'BODY_SCAN/PROCESSES/COLLECT/PATH.py' 2023-10-13T05:39:17,463 adding 'BODY_SCAN/PROCESSES/SCAN/PATH.py' 2023-10-13T05:39:17,464 adding 'BODY_SCAN/PROCESSES/SCAN/__init__.py' 2023-10-13T05:39:17,466 adding 'BODY_SCAN/PROCESSES/SCAN/KEG/SCAN.py' 2023-10-13T05:39:17,467 adding 'BODY_SCAN/PROCESSES/SCAN/KEG/__init__.py' 2023-10-13T05:39:17,469 adding 'BODY_SCAN-0.0.22.dist-info/LICENSE.HTML' 2023-10-13T05:39:17,471 adding 'BODY_SCAN-0.0.22.dist-info/METADATA' 2023-10-13T05:39:17,472 adding 'BODY_SCAN-0.0.22.dist-info/WHEEL' 2023-10-13T05:39:17,473 adding 'BODY_SCAN-0.0.22.dist-info/top_level.txt' 2023-10-13T05:39:17,473 adding 'BODY_SCAN-0.0.22.dist-info/RECORD' 2023-10-13T05:39:17,475 removing build/bdist.linux-armv7l/wheel 2023-10-13T05:39:17,597 Building wheel for body-scan (setup.py): finished with status 'done' 2023-10-13T05:39:17,600 Created wheel for body-scan: filename=BODY_SCAN-0.0.22-py3-none-any.whl size=11218 sha256=039ac124d8d04acd44d925221d9fb084a024ee981927d2d83f5b9dff972165b0 2023-10-13T05:39:17,601 Stored in directory: /tmp/pip-ephem-wheel-cache-_c1c_l60/wheels/88/35/43/b4b6231be00be2dd63059b3b323a94e2c90d41f5e0fc5c01a7 2023-10-13T05:39:17,611 Successfully built body-scan 2023-10-13T05:39:17,614 Removed build tracker: '/tmp/pip-build-tracker-k_50nqon'