2023-10-13T05:38:48,533 Created temporary directory: /tmp/pip-build-tracker-_0x98mxj 2023-10-13T05:38:48,534 Initialized build tracking at /tmp/pip-build-tracker-_0x98mxj 2023-10-13T05:38:48,535 Created build tracker: /tmp/pip-build-tracker-_0x98mxj 2023-10-13T05:38:48,535 Entered build tracker: /tmp/pip-build-tracker-_0x98mxj 2023-10-13T05:38:48,536 Created temporary directory: /tmp/pip-wheel-g0fkxlea 2023-10-13T05:38:48,539 Created temporary directory: /tmp/pip-ephem-wheel-cache-zyiqeyld 2023-10-13T05:38:48,561 Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple 2023-10-13T05:38:48,564 2 location(s) to search for versions of body-scan: 2023-10-13T05:38:48,564 * https://pypi.org/simple/body-scan/ 2023-10-13T05:38:48,564 * https://www.piwheels.org/simple/body-scan/ 2023-10-13T05:38:48,565 Fetching project page and analyzing links: https://pypi.org/simple/body-scan/ 2023-10-13T05:38:48,566 Getting page https://pypi.org/simple/body-scan/ 2023-10-13T05:38:48,567 Found index url https://pypi.org/simple/ 2023-10-13T05:38:48,783 Fetched page https://pypi.org/simple/body-scan/ as application/vnd.pypi.simple.v1+json 2023-10-13T05:38:48,788 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:38:48,789 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:38:48,790 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:38:48,790 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:38:48,791 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:38:48,792 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:38:48,793 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:38:48,794 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:38:48,794 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:38:48,795 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:38:48,796 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:38:48,797 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:38:48,797 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:38:48,798 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:38:48,799 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:38:48,800 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:38:48,800 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:38:48,801 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:38:48,801 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:38:48,802 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:38:48,803 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:38:48,803 Fetching project page and analyzing links: https://www.piwheels.org/simple/body-scan/ 2023-10-13T05:38:48,804 Getting page https://www.piwheels.org/simple/body-scan/ 2023-10-13T05:38:48,805 Found index url https://www.piwheels.org/simple/ 2023-10-13T05:38:48,973 Fetched page https://www.piwheels.org/simple/body-scan/ as text/html 2023-10-13T05:38:48,978 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:38:48,979 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:38:48,980 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:38:48,980 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:38:48,981 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:38:48,982 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:38:48,982 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:38:48,983 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:38:48,984 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:38:48,984 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:38:48,985 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:38:48,985 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:38:48,986 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:38:48,986 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:38:48,987 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:38:48,987 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:38:48,988 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:38:48,988 Skipping link: not a file: https://www.piwheels.org/simple/body-scan/ 2023-10-13T05:38:48,989 Skipping link: not a file: https://pypi.org/simple/body-scan/ 2023-10-13T05:38:49,010 Given no hashes to check 1 links for project 'body-scan': discarding no candidates 2023-10-13T05:38:49,029 Collecting body-scan==0.0.21 2023-10-13T05:38:49,031 Created temporary directory: /tmp/pip-unpack-tz8b1qt_ 2023-10-13T05:38:49,245 Downloading BODY_SCAN-0.0.21.tar.gz (7.7 kB) 2023-10-13T05:38:49,300 Added body-scan==0.0.21 from https://files.pythonhosted.org/packages/93/6d/df362c1f36ce5e054cbebbd4aa8d1438139fea5e16058edfe40fa2fa6594/BODY_SCAN-0.0.21.tar.gz to build tracker '/tmp/pip-build-tracker-_0x98mxj' 2023-10-13T05:38:49,302 Running setup.py (path:/tmp/pip-wheel-g0fkxlea/body-scan_e3810917ebc840e3bc8aff56a817e376/setup.py) egg_info for package body-scan 2023-10-13T05:38:49,303 Created temporary directory: /tmp/pip-pip-egg-info-s3r9tq7y 2023-10-13T05:38:49,304 Preparing metadata (setup.py): started 2023-10-13T05:38:49,305 Running command python setup.py egg_info 2023-10-13T05:38:50,621 # BODY SCAN 2023-10-13T05:38:50,623 ## EXAMPLE OUTPUT: 2023-10-13T05:38:50,623 ```JSON 2023-10-13T05:38:50,624 { 2023-10-13T05:38:50,624 "PATHS": [ 2023-10-13T05:38:50,625 { 2023-10-13T05:38:50,626 "PATH": "PATH_1_HEALTH.py", 2023-10-13T05:38:50,626 "STATS": { 2023-10-13T05:38:50,627 "PASSES": 2, 2023-10-13T05:38:50,628 "ALARMS": 1 2023-10-13T05:38:50,628 }, 2023-10-13T05:38:50,629 "CHECKS": [ 2023-10-13T05:38:50,629 { 2023-10-13T05:38:50,630 "CHECK": "CHECK 1", 2023-10-13T05:38:50,630 "PASSED": true, 2023-10-13T05:38:50,631 "ELAPSED": [ 2023-10-13T05:38:50,631 5.320599666447379e-05, 2023-10-13T05:38:50,632 "SECONDS" 2023-10-13T05:38:50,632 ] 2023-10-13T05:38:50,633 }, 2023-10-13T05:38:50,633 { 2023-10-13T05:38:50,633 "CHECK": "CHECK 2", 2023-10-13T05:38:50,634 "PASSED": true, 2023-10-13T05:38:50,634 "ELAPSED": [ 2023-10-13T05:38:50,635 1.0949999705189839e-05, 2023-10-13T05:38:50,635 "SECONDS" 2023-10-13T05:38:50,636 ] 2023-10-13T05:38:50,636 }, 2023-10-13T05:38:50,637 { 2023-10-13T05:38:50,637 "CHECK": "CHECK 3", 2023-10-13T05:38:50,638 "PASSED": false, 2023-10-13T05:38:50,638 "EXCEPTION": "Exception('NOT 100%')", 2023-10-13T05:38:50,639 "EXCEPTION TRACE": [ 2023-10-13T05:38:50,639 "Traceback (most recent call last):", 2023-10-13T05:38:50,640 " File \"/REPTILIAN_CLIMATES/MODULES/BODY_SCAN/src/SCAN_PROC/KEG/SCAN.py\", line 69, in SCAN", 2023-10-13T05:38:50,640 " CHECKS [ CHECK ] ()", 2023-10-13T05:38:50,641 " File \"\", line 24, in CHECK_3", 2023-10-13T05:38:50,641 "Exception: NOT 100%" 2023-10-13T05:38:50,642 ] 2023-10-13T05:38:50,643 } 2023-10-13T05:38:50,643 ] 2023-10-13T05:38:50,644 }, 2023-10-13T05:38:50,644 { 2023-10-13T05:38:50,645 "PATH": "PATH_2_HEALTH.py", 2023-10-13T05:38:50,645 "EMPTY": true 2023-10-13T05:38:50,646 } 2023-10-13T05:38:50,646 ], 2023-10-13T05:38:50,647 "STATS": { 2023-10-13T05:38:50,648 "EMPTY": 1, 2023-10-13T05:38:50,648 "CHECKS": { 2023-10-13T05:38:50,649 "PASSES": 2, 2023-10-13T05:38:50,649 "ALARMS": 1 2023-10-13T05:38:50,650 } 2023-10-13T05:38:50,651 } 2023-10-13T05:38:50,651 } 2023-10-13T05:38:50,652 ``` 2023-10-13T05:38:50,653 ## HOW TO WRITE CHECKS: 2023-10-13T05:38:50,654 The "CHECKS" dictionary is retrieved with the python "exec" 2023-10-13T05:38:50,655 and then each "CHECK" in "CHECKS" is run. 2023-10-13T05:38:50,656 These checks correspond to the example output shown above. 2023-10-13T05:38:50,657 ``` 2023-10-13T05:38:50,657 PATH_1_HEALTH.py 2023-10-13T05:38:50,658 ``` 2023-10-13T05:38:50,658 ``` 2023-10-13T05:38:50,659 def CHECK_1 (): 2023-10-13T05:38:50,660 print ("CHECK 1") 2023-10-13T05:38:50,661 def CHECK_2 (): 2023-10-13T05:38:50,661 print ("CHECK 2") 2023-10-13T05:38:50,662 def CHECK_3 (): 2023-10-13T05:38:50,663 raise Exception ("NOT 100%") 2023-10-13T05:38:50,664 CHECKS = { 2023-10-13T05:38:50,665 "CHECK 1": CHECK_1, 2023-10-13T05:38:50,665 "CHECK 2": CHECK_2, 2023-10-13T05:38:50,666 "CHECK 3": CHECK_3 2023-10-13T05:38:50,666 } 2023-10-13T05:38:50,667 ``` 2023-10-13T05:38:50,668 ``` 2023-10-13T05:38:50,668 PATH_2_HEALTH.py 2023-10-13T05:38:50,669 ``` 2023-10-13T05:38:50,670 ``` 2023-10-13T05:38:50,670 # 2023-10-13T05:38:50,671 # There isn't a "CHECKS" dictionary present, 2023-10-13T05:38:50,671 # so the scanner reports: 2023-10-13T05:38:50,672 # 2023-10-13T05:38:50,673 # "EMPTY": true 2023-10-13T05:38:50,673 # 2023-10-13T05:38:50,674 ``` 2023-10-13T05:38:50,675 ## HOW TO START THE BODY SCANNER 2023-10-13T05:38:50,676 ```python3 2023-10-13T05:38:50,677 import BODY_SCAN 2023-10-13T05:38:50,678 import pathlib 2023-10-13T05:38:50,678 THIS_FOLDER = pathlib.Path (__file__).parent.resolve () 2023-10-13T05:38:50,679 from os.path import dirname, join, normpath 2023-10-13T05:38:50,680 SEARCH = normpath (join (THIS_FOLDER, "MODULE")) 2023-10-13T05:38:50,681 SCAN = BODY_SCAN.START ( 2023-10-13T05:38:50,681 # 2023-10-13T05:38:50,682 # REQUIRED 2023-10-13T05:38:50,682 # This is all the files that are sent to the scanner. 2023-10-13T05:38:50,683 # 2023-10-13T05:38:50,683 GLOB = SEARCH + '/**/*HEALTH.py', 2023-10-13T05:38:50,684 # 2023-10-13T05:38:50,685 # This runs all the checks in a thread pool, 2023-10-13T05:38:50,685 # so maybe at the same time, more or less. 2023-10-13T05:38:50,686 # 2023-10-13T05:38:50,686 SIMULTANEOUS = True, 2023-10-13T05:38:50,687 # 2023-10-13T05:38:50,688 # OPTIONAL 2023-10-13T05:38:50,688 # These are the folders that are added to "sys.path" 2023-10-13T05:38:50,689 # 2023-10-13T05:38:50,689 MODULE_PATHS = [ 2023-10-13T05:38:50,690 normpath (join (SEARCH, "MODULES")) 2023-10-13T05:38:50,690 ], 2023-10-13T05:38:50,691 # 2023-10-13T05:38:50,692 # OPTIONAL 2023-10-13T05:38:50,692 # This is the folder path to remove from the paths in the output. 2023-10-13T05:38:50,693 # 2023-10-13T05:38:50,693 RELATIVE_PATH = SEARCH 2023-10-13T05:38:50,694 ) 2023-10-13T05:38:50,694 ``` 2023-10-13T05:38:50,695 ### NOTES 2023-10-13T05:38:50,695 ``` 2023-10-13T05:38:50,696 Currently all the checks aren't run in parallel, 2023-10-13T05:38:50,696 but sequential order of paths found in glob is not guaranteed. 2023-10-13T05:38:50,697 ``` 2023-10-13T05:38:50,698 ``` 2023-10-13T05:38:50,698 Each check suite found by the glob is started by 2023-10-13T05:38:50,699 a process with a flask API, that is opened on the first available port found. 2023-10-13T05:38:50,699 ``` 2023-10-13T05:38:50,701 running egg_info 2023-10-13T05:38:50,702 creating /tmp/pip-pip-egg-info-s3r9tq7y/BODY_SCAN.egg-info 2023-10-13T05:38:50,703 writing /tmp/pip-pip-egg-info-s3r9tq7y/BODY_SCAN.egg-info/PKG-INFO 2023-10-13T05:38:50,703 writing dependency_links to /tmp/pip-pip-egg-info-s3r9tq7y/BODY_SCAN.egg-info/dependency_links.txt 2023-10-13T05:38:50,704 writing requirements to /tmp/pip-pip-egg-info-s3r9tq7y/BODY_SCAN.egg-info/requires.txt 2023-10-13T05:38:50,705 writing top-level names to /tmp/pip-pip-egg-info-s3r9tq7y/BODY_SCAN.egg-info/top_level.txt 2023-10-13T05:38:50,705 writing manifest file '/tmp/pip-pip-egg-info-s3r9tq7y/BODY_SCAN.egg-info/SOURCES.txt' 2023-10-13T05:38:50,751 reading manifest file '/tmp/pip-pip-egg-info-s3r9tq7y/BODY_SCAN.egg-info/SOURCES.txt' 2023-10-13T05:38:50,752 adding license file 'LICENSE.HTML' 2023-10-13T05:38:50,754 writing manifest file '/tmp/pip-pip-egg-info-s3r9tq7y/BODY_SCAN.egg-info/SOURCES.txt' 2023-10-13T05:38:50,863 Preparing metadata (setup.py): finished with status 'done' 2023-10-13T05:38:50,867 Source in /tmp/pip-wheel-g0fkxlea/body-scan_e3810917ebc840e3bc8aff56a817e376 has version 0.0.21, which satisfies requirement body-scan==0.0.21 from https://files.pythonhosted.org/packages/93/6d/df362c1f36ce5e054cbebbd4aa8d1438139fea5e16058edfe40fa2fa6594/BODY_SCAN-0.0.21.tar.gz 2023-10-13T05:38:50,868 Removed body-scan==0.0.21 from https://files.pythonhosted.org/packages/93/6d/df362c1f36ce5e054cbebbd4aa8d1438139fea5e16058edfe40fa2fa6594/BODY_SCAN-0.0.21.tar.gz from build tracker '/tmp/pip-build-tracker-_0x98mxj' 2023-10-13T05:38:50,873 Created temporary directory: /tmp/pip-unpack-bwn2gtk8 2023-10-13T05:38:50,874 Created temporary directory: /tmp/pip-unpack-e5oyn2se 2023-10-13T05:38:50,879 Building wheels for collected packages: body-scan 2023-10-13T05:38:50,884 Created temporary directory: /tmp/pip-wheel-i5xyd4it 2023-10-13T05:38:50,885 Building wheel for body-scan (setup.py): started 2023-10-13T05:38:50,886 Destination directory: /tmp/pip-wheel-i5xyd4it 2023-10-13T05:38:50,887 Running command python setup.py bdist_wheel 2023-10-13T05:38:51,298 # BODY SCAN 2023-10-13T05:38:51,299 ## EXAMPLE OUTPUT: 2023-10-13T05:38:51,300 ```JSON 2023-10-13T05:38:51,300 { 2023-10-13T05:38:51,301 "PATHS": [ 2023-10-13T05:38:51,301 { 2023-10-13T05:38:51,302 "PATH": "PATH_1_HEALTH.py", 2023-10-13T05:38:51,303 "STATS": { 2023-10-13T05:38:51,303 "PASSES": 2, 2023-10-13T05:38:51,304 "ALARMS": 1 2023-10-13T05:38:51,304 }, 2023-10-13T05:38:51,305 "CHECKS": [ 2023-10-13T05:38:51,306 { 2023-10-13T05:38:51,306 "CHECK": "CHECK 1", 2023-10-13T05:38:51,307 "PASSED": true, 2023-10-13T05:38:51,308 "ELAPSED": [ 2023-10-13T05:38:51,308 5.320599666447379e-05, 2023-10-13T05:38:51,309 "SECONDS" 2023-10-13T05:38:51,309 ] 2023-10-13T05:38:51,310 }, 2023-10-13T05:38:51,311 { 2023-10-13T05:38:51,311 "CHECK": "CHECK 2", 2023-10-13T05:38:51,312 "PASSED": true, 2023-10-13T05:38:51,313 "ELAPSED": [ 2023-10-13T05:38:51,313 1.0949999705189839e-05, 2023-10-13T05:38:51,314 "SECONDS" 2023-10-13T05:38:51,314 ] 2023-10-13T05:38:51,315 }, 2023-10-13T05:38:51,316 { 2023-10-13T05:38:51,316 "CHECK": "CHECK 3", 2023-10-13T05:38:51,317 "PASSED": false, 2023-10-13T05:38:51,318 "EXCEPTION": "Exception('NOT 100%')", 2023-10-13T05:38:51,318 "EXCEPTION TRACE": [ 2023-10-13T05:38:51,319 "Traceback (most recent call last):", 2023-10-13T05:38:51,320 " File \"/REPTILIAN_CLIMATES/MODULES/BODY_SCAN/src/SCAN_PROC/KEG/SCAN.py\", line 69, in SCAN", 2023-10-13T05:38:51,320 " CHECKS [ CHECK ] ()", 2023-10-13T05:38:51,321 " File \"\", line 24, in CHECK_3", 2023-10-13T05:38:51,322 "Exception: NOT 100%" 2023-10-13T05:38:51,322 ] 2023-10-13T05:38:51,323 } 2023-10-13T05:38:51,324 ] 2023-10-13T05:38:51,325 }, 2023-10-13T05:38:51,325 { 2023-10-13T05:38:51,326 "PATH": "PATH_2_HEALTH.py", 2023-10-13T05:38:51,327 "EMPTY": true 2023-10-13T05:38:51,328 } 2023-10-13T05:38:51,329 ], 2023-10-13T05:38:51,329 "STATS": { 2023-10-13T05:38:51,330 "EMPTY": 1, 2023-10-13T05:38:51,331 "CHECKS": { 2023-10-13T05:38:51,332 "PASSES": 2, 2023-10-13T05:38:51,332 "ALARMS": 1 2023-10-13T05:38:51,333 } 2023-10-13T05:38:51,334 } 2023-10-13T05:38:51,334 } 2023-10-13T05:38:51,335 ``` 2023-10-13T05:38:51,337 ## HOW TO WRITE CHECKS: 2023-10-13T05:38:51,338 The "CHECKS" dictionary is retrieved with the python "exec" 2023-10-13T05:38:51,339 and then each "CHECK" in "CHECKS" is run. 2023-10-13T05:38:51,341 These checks correspond to the example output shown above. 2023-10-13T05:38:51,341 ``` 2023-10-13T05:38:51,342 PATH_1_HEALTH.py 2023-10-13T05:38:51,343 ``` 2023-10-13T05:38:51,344 ``` 2023-10-13T05:38:51,344 def CHECK_1 (): 2023-10-13T05:38:51,345 print ("CHECK 1") 2023-10-13T05:38:51,347 def CHECK_2 (): 2023-10-13T05:38:51,347 print ("CHECK 2") 2023-10-13T05:38:51,349 def CHECK_3 (): 2023-10-13T05:38:51,350 raise Exception ("NOT 100%") 2023-10-13T05:38:51,351 CHECKS = { 2023-10-13T05:38:51,352 "CHECK 1": CHECK_1, 2023-10-13T05:38:51,353 "CHECK 2": CHECK_2, 2023-10-13T05:38:51,354 "CHECK 3": CHECK_3 2023-10-13T05:38:51,355 } 2023-10-13T05:38:51,355 ``` 2023-10-13T05:38:51,356 ``` 2023-10-13T05:38:51,357 PATH_2_HEALTH.py 2023-10-13T05:38:51,358 ``` 2023-10-13T05:38:51,359 ``` 2023-10-13T05:38:51,359 # 2023-10-13T05:38:51,360 # There isn't a "CHECKS" dictionary present, 2023-10-13T05:38:51,360 # so the scanner reports: 2023-10-13T05:38:51,361 # 2023-10-13T05:38:51,362 # "EMPTY": true 2023-10-13T05:38:51,362 # 2023-10-13T05:38:51,363 ``` 2023-10-13T05:38:51,364 ## HOW TO START THE BODY SCANNER 2023-10-13T05:38:51,365 ```python3 2023-10-13T05:38:51,366 import BODY_SCAN 2023-10-13T05:38:51,367 import pathlib 2023-10-13T05:38:51,368 THIS_FOLDER = pathlib.Path (__file__).parent.resolve () 2023-10-13T05:38:51,369 from os.path import dirname, join, normpath 2023-10-13T05:38:51,370 SEARCH = normpath (join (THIS_FOLDER, "MODULE")) 2023-10-13T05:38:51,372 SCAN = BODY_SCAN.START ( 2023-10-13T05:38:51,372 # 2023-10-13T05:38:51,373 # REQUIRED 2023-10-13T05:38:51,373 # This is all the files that are sent to the scanner. 2023-10-13T05:38:51,374 # 2023-10-13T05:38:51,375 GLOB = SEARCH + '/**/*HEALTH.py', 2023-10-13T05:38:51,376 # 2023-10-13T05:38:51,377 # This runs all the checks in a thread pool, 2023-10-13T05:38:51,377 # so maybe at the same time, more or less. 2023-10-13T05:38:51,378 # 2023-10-13T05:38:51,378 SIMULTANEOUS = True, 2023-10-13T05:38:51,380 # 2023-10-13T05:38:51,380 # OPTIONAL 2023-10-13T05:38:51,381 # These are the folders that are added to "sys.path" 2023-10-13T05:38:51,382 # 2023-10-13T05:38:51,382 MODULE_PATHS = [ 2023-10-13T05:38:51,383 normpath (join (SEARCH, "MODULES")) 2023-10-13T05:38:51,383 ], 2023-10-13T05:38:51,385 # 2023-10-13T05:38:51,385 # OPTIONAL 2023-10-13T05:38:51,386 # This is the folder path to remove from the paths in the output. 2023-10-13T05:38:51,387 # 2023-10-13T05:38:51,388 RELATIVE_PATH = SEARCH 2023-10-13T05:38:51,388 ) 2023-10-13T05:38:51,389 ``` 2023-10-13T05:38:51,390 ### NOTES 2023-10-13T05:38:51,391 ``` 2023-10-13T05:38:51,392 Currently all the checks aren't run in parallel, 2023-10-13T05:38:51,392 but sequential order of paths found in glob is not guaranteed. 2023-10-13T05:38:51,393 ``` 2023-10-13T05:38:51,394 ``` 2023-10-13T05:38:51,394 Each check suite found by the glob is started by 2023-10-13T05:38:51,395 a process with a flask API, that is opened on the first available port found. 2023-10-13T05:38:51,396 ``` 2023-10-13T05:38:51,932 running bdist_wheel 2023-10-13T05:38:52,027 running build 2023-10-13T05:38:52,027 running build_py 2023-10-13T05:38:52,054 creating build 2023-10-13T05:38:52,055 creating build/lib 2023-10-13T05:38:52,055 creating build/lib/BODY_SCAN 2023-10-13T05:38:52,057 copying STRUCTURE/MODULES/BODY_SCAN/__init__.py -> build/lib/BODY_SCAN 2023-10-13T05:38:52,059 copying STRUCTURE/MODULES/BODY_SCAN/START_MULTIPLE_PROCESSES.py -> build/lib/BODY_SCAN 2023-10-13T05:38:52,061 creating build/lib/BODY_SCAN/FUNCTIONS 2023-10-13T05:38:52,062 copying STRUCTURE/MODULES/BODY_SCAN/FUNCTIONS/START_A_SCAN.py -> build/lib/BODY_SCAN/FUNCTIONS 2023-10-13T05:38:52,064 copying STRUCTURE/MODULES/BODY_SCAN/FUNCTIONS/CHECK_STATUS_LOCATION.py -> build/lib/BODY_SCAN/FUNCTIONS 2023-10-13T05:38:52,066 creating build/lib/BODY_SCAN/AGGREGATE 2023-10-13T05:38:52,067 copying STRUCTURE/MODULES/BODY_SCAN/AGGREGATE/__init__.py -> build/lib/BODY_SCAN/AGGREGATE 2023-10-13T05:38:52,069 creating build/lib/BODY_SCAN/AGGREGATOR 2023-10-13T05:38:52,070 copying STRUCTURE/MODULES/BODY_SCAN/AGGREGATOR/START.py -> build/lib/BODY_SCAN/AGGREGATOR 2023-10-13T05:38:52,073 creating build/lib/BODY_SCAN/AGGREGATOR/KEG 2023-10-13T05:38:52,074 copying STRUCTURE/MODULES/BODY_SCAN/AGGREGATOR/KEG/__init__.py -> build/lib/BODY_SCAN/AGGREGATOR/KEG 2023-10-13T05:38:52,076 creating build/lib/BODY_SCAN/PROCESSES 2023-10-13T05:38:52,077 creating build/lib/BODY_SCAN/PROCESSES/COLLECT 2023-10-13T05:38:52,078 copying STRUCTURE/MODULES/BODY_SCAN/PROCESSES/COLLECT/PATH.py -> build/lib/BODY_SCAN/PROCESSES/COLLECT 2023-10-13T05:38:52,080 creating build/lib/BODY_SCAN/PROCESSES/SCAN 2023-10-13T05:38:52,081 copying STRUCTURE/MODULES/BODY_SCAN/PROCESSES/SCAN/__init__.py -> build/lib/BODY_SCAN/PROCESSES/SCAN 2023-10-13T05:38:52,083 copying STRUCTURE/MODULES/BODY_SCAN/PROCESSES/SCAN/PATH.py -> build/lib/BODY_SCAN/PROCESSES/SCAN 2023-10-13T05:38:52,085 creating build/lib/BODY_SCAN/PROCESSES/SCAN/KEG 2023-10-13T05:38:52,086 copying STRUCTURE/MODULES/BODY_SCAN/PROCESSES/SCAN/KEG/__init__.py -> build/lib/BODY_SCAN/PROCESSES/SCAN/KEG 2023-10-13T05:38:52,087 copying STRUCTURE/MODULES/BODY_SCAN/PROCESSES/SCAN/KEG/SCAN.py -> build/lib/BODY_SCAN/PROCESSES/SCAN/KEG 2023-10-13T05:38:52,117 /usr/local/lib/python3.11/dist-packages/setuptools/_distutils/cmd.py:66: SetuptoolsDeprecationWarning: setup.py install is deprecated. 2023-10-13T05:38:52,118 !! 2023-10-13T05:38:52,119 ******************************************************************************** 2023-10-13T05:38:52,119 Please avoid running ``setup.py`` directly. 2023-10-13T05:38:52,120 Instead, use pypa/build, pypa/installer or other 2023-10-13T05:38:52,120 standards-based tools. 2023-10-13T05:38:52,121 See https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html for details. 2023-10-13T05:38:52,122 ******************************************************************************** 2023-10-13T05:38:52,123 !! 2023-10-13T05:38:52,123 self.initialize_options() 2023-10-13T05:38:52,143 installing to build/bdist.linux-armv7l/wheel 2023-10-13T05:38:52,144 running install 2023-10-13T05:38:52,168 running install_lib 2023-10-13T05:38:52,192 creating build/bdist.linux-armv7l 2023-10-13T05:38:52,193 creating build/bdist.linux-armv7l/wheel 2023-10-13T05:38:52,194 creating build/bdist.linux-armv7l/wheel/BODY_SCAN 2023-10-13T05:38:52,195 copying build/lib/BODY_SCAN/__init__.py -> build/bdist.linux-armv7l/wheel/BODY_SCAN 2023-10-13T05:38:52,197 creating build/bdist.linux-armv7l/wheel/BODY_SCAN/FUNCTIONS 2023-10-13T05:38:52,198 copying build/lib/BODY_SCAN/FUNCTIONS/START_A_SCAN.py -> build/bdist.linux-armv7l/wheel/BODY_SCAN/FUNCTIONS 2023-10-13T05:38:52,200 copying build/lib/BODY_SCAN/FUNCTIONS/CHECK_STATUS_LOCATION.py -> build/bdist.linux-armv7l/wheel/BODY_SCAN/FUNCTIONS 2023-10-13T05:38:52,202 creating build/bdist.linux-armv7l/wheel/BODY_SCAN/AGGREGATE 2023-10-13T05:38:52,203 copying build/lib/BODY_SCAN/AGGREGATE/__init__.py -> build/bdist.linux-armv7l/wheel/BODY_SCAN/AGGREGATE 2023-10-13T05:38:52,205 creating build/bdist.linux-armv7l/wheel/BODY_SCAN/AGGREGATOR 2023-10-13T05:38:52,206 copying build/lib/BODY_SCAN/AGGREGATOR/START.py -> build/bdist.linux-armv7l/wheel/BODY_SCAN/AGGREGATOR 2023-10-13T05:38:52,208 creating build/bdist.linux-armv7l/wheel/BODY_SCAN/AGGREGATOR/KEG 2023-10-13T05:38:52,209 copying build/lib/BODY_SCAN/AGGREGATOR/KEG/__init__.py -> build/bdist.linux-armv7l/wheel/BODY_SCAN/AGGREGATOR/KEG 2023-10-13T05:38:52,211 copying build/lib/BODY_SCAN/START_MULTIPLE_PROCESSES.py -> build/bdist.linux-armv7l/wheel/BODY_SCAN 2023-10-13T05:38:52,213 creating build/bdist.linux-armv7l/wheel/BODY_SCAN/PROCESSES 2023-10-13T05:38:52,214 creating build/bdist.linux-armv7l/wheel/BODY_SCAN/PROCESSES/COLLECT 2023-10-13T05:38:52,215 copying build/lib/BODY_SCAN/PROCESSES/COLLECT/PATH.py -> build/bdist.linux-armv7l/wheel/BODY_SCAN/PROCESSES/COLLECT 2023-10-13T05:38:52,217 creating build/bdist.linux-armv7l/wheel/BODY_SCAN/PROCESSES/SCAN 2023-10-13T05:38:52,218 copying build/lib/BODY_SCAN/PROCESSES/SCAN/__init__.py -> build/bdist.linux-armv7l/wheel/BODY_SCAN/PROCESSES/SCAN 2023-10-13T05:38:52,220 copying build/lib/BODY_SCAN/PROCESSES/SCAN/PATH.py -> build/bdist.linux-armv7l/wheel/BODY_SCAN/PROCESSES/SCAN 2023-10-13T05:38:52,222 creating build/bdist.linux-armv7l/wheel/BODY_SCAN/PROCESSES/SCAN/KEG 2023-10-13T05:38:52,223 copying build/lib/BODY_SCAN/PROCESSES/SCAN/KEG/__init__.py -> build/bdist.linux-armv7l/wheel/BODY_SCAN/PROCESSES/SCAN/KEG 2023-10-13T05:38:52,225 copying build/lib/BODY_SCAN/PROCESSES/SCAN/KEG/SCAN.py -> build/bdist.linux-armv7l/wheel/BODY_SCAN/PROCESSES/SCAN/KEG 2023-10-13T05:38:52,227 running install_egg_info 2023-10-13T05:38:52,286 running egg_info 2023-10-13T05:38:52,311 writing BODY_SCAN.egg-info/PKG-INFO 2023-10-13T05:38:52,314 writing dependency_links to BODY_SCAN.egg-info/dependency_links.txt 2023-10-13T05:38:52,315 writing requirements to BODY_SCAN.egg-info/requires.txt 2023-10-13T05:38:52,316 writing top-level names to BODY_SCAN.egg-info/top_level.txt 2023-10-13T05:38:52,345 reading manifest file 'BODY_SCAN.egg-info/SOURCES.txt' 2023-10-13T05:38:52,347 adding license file 'LICENSE.HTML' 2023-10-13T05:38:52,350 writing manifest file 'BODY_SCAN.egg-info/SOURCES.txt' 2023-10-13T05:38:52,351 Copying BODY_SCAN.egg-info to build/bdist.linux-armv7l/wheel/BODY_SCAN-0.0.21-py3.11.egg-info 2023-10-13T05:38:52,360 running install_scripts 2023-10-13T05:38:52,372 creating build/bdist.linux-armv7l/wheel/BODY_SCAN-0.0.21.dist-info/WHEEL 2023-10-13T05:38:52,374 creating '/tmp/pip-wheel-i5xyd4it/BODY_SCAN-0.0.21-py3-none-any.whl' and adding 'build/bdist.linux-armv7l/wheel' to it 2023-10-13T05:38:52,377 adding 'BODY_SCAN/START_MULTIPLE_PROCESSES.py' 2023-10-13T05:38:52,378 adding 'BODY_SCAN/__init__.py' 2023-10-13T05:38:52,380 adding 'BODY_SCAN/AGGREGATE/__init__.py' 2023-10-13T05:38:52,381 adding 'BODY_SCAN/AGGREGATOR/START.py' 2023-10-13T05:38:52,383 adding 'BODY_SCAN/AGGREGATOR/KEG/__init__.py' 2023-10-13T05:38:52,385 adding 'BODY_SCAN/FUNCTIONS/CHECK_STATUS_LOCATION.py' 2023-10-13T05:38:52,386 adding 'BODY_SCAN/FUNCTIONS/START_A_SCAN.py' 2023-10-13T05:38:52,388 adding 'BODY_SCAN/PROCESSES/COLLECT/PATH.py' 2023-10-13T05:38:52,389 adding 'BODY_SCAN/PROCESSES/SCAN/PATH.py' 2023-10-13T05:38:52,391 adding 'BODY_SCAN/PROCESSES/SCAN/__init__.py' 2023-10-13T05:38:52,393 adding 'BODY_SCAN/PROCESSES/SCAN/KEG/SCAN.py' 2023-10-13T05:38:52,394 adding 'BODY_SCAN/PROCESSES/SCAN/KEG/__init__.py' 2023-10-13T05:38:52,396 adding 'BODY_SCAN-0.0.21.dist-info/LICENSE.HTML' 2023-10-13T05:38:52,397 adding 'BODY_SCAN-0.0.21.dist-info/METADATA' 2023-10-13T05:38:52,398 adding 'BODY_SCAN-0.0.21.dist-info/WHEEL' 2023-10-13T05:38:52,399 adding 'BODY_SCAN-0.0.21.dist-info/top_level.txt' 2023-10-13T05:38:52,400 adding 'BODY_SCAN-0.0.21.dist-info/RECORD' 2023-10-13T05:38:52,401 removing build/bdist.linux-armv7l/wheel 2023-10-13T05:38:52,519 Building wheel for body-scan (setup.py): finished with status 'done' 2023-10-13T05:38:52,522 Created wheel for body-scan: filename=BODY_SCAN-0.0.21-py3-none-any.whl size=11164 sha256=29bfeb8a76e8d7033bd11731e2a14db00cc80c67fa356e8b0e9f56e250a420a2 2023-10-13T05:38:52,523 Stored in directory: /tmp/pip-ephem-wheel-cache-zyiqeyld/wheels/9e/21/82/1b57f67db0543f2a6214bcb1eb6237d176007d4952a579df6c 2023-10-13T05:38:52,533 Successfully built body-scan 2023-10-13T05:38:52,537 Removed build tracker: '/tmp/pip-build-tracker-_0x98mxj'