2023-10-02T13:53:51,148 Created temporary directory: /tmp/pip-build-tracker-4ykhmxw_ 2023-10-02T13:53:51,150 Initialized build tracking at /tmp/pip-build-tracker-4ykhmxw_ 2023-10-02T13:53:51,151 Created build tracker: /tmp/pip-build-tracker-4ykhmxw_ 2023-10-02T13:53:51,151 Entered build tracker: /tmp/pip-build-tracker-4ykhmxw_ 2023-10-02T13:53:51,152 Created temporary directory: /tmp/pip-wheel-yrk0soe1 2023-10-02T13:53:51,156 Created temporary directory: /tmp/pip-ephem-wheel-cache-hz_l67x5 2023-10-02T13:53:51,187 Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple 2023-10-02T13:53:51,191 2 location(s) to search for versions of body-scan: 2023-10-02T13:53:51,191 * https://pypi.org/simple/body-scan/ 2023-10-02T13:53:51,191 * https://www.piwheels.org/simple/body-scan/ 2023-10-02T13:53:51,192 Fetching project page and analyzing links: https://pypi.org/simple/body-scan/ 2023-10-02T13:53:51,193 Getting page https://pypi.org/simple/body-scan/ 2023-10-02T13:53:51,194 Found index url https://pypi.org/simple/ 2023-10-02T13:53:51,337 Fetched page https://pypi.org/simple/body-scan/ as application/vnd.pypi.simple.v1+json 2023-10-02T13:53:51,341 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-02T13:53:51,342 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-02T13:53:51,342 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-02T13:53:51,343 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-02T13:53:51,344 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-02T13:53:51,345 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-02T13:53:51,347 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-02T13:53:51,348 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-02T13:53:51,348 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-02T13:53:51,349 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-02T13:53:51,350 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-02T13:53:51,351 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-02T13:53:51,351 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-02T13:53:51,352 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-02T13:53:51,354 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-02T13:53:51,355 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-02T13:53:51,355 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-02T13:53:51,356 Fetching project page and analyzing links: https://www.piwheels.org/simple/body-scan/ 2023-10-02T13:53:51,357 Getting page https://www.piwheels.org/simple/body-scan/ 2023-10-02T13:53:51,358 Found index url https://www.piwheels.org/simple/ 2023-10-02T13:53:51,526 Fetched page https://www.piwheels.org/simple/body-scan/ as text/html 2023-10-02T13:53:51,528 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-02T13:53:51,529 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-02T13:53:51,530 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-02T13:53:51,530 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-02T13:53:51,531 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-02T13:53:51,531 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-02T13:53:51,532 Skipping link: not a file: https://www.piwheels.org/simple/body-scan/ 2023-10-02T13:53:51,532 Skipping link: not a file: https://pypi.org/simple/body-scan/ 2023-10-02T13:53:51,553 Given no hashes to check 1 links for project 'body-scan': discarding no candidates 2023-10-02T13:53:51,574 Collecting body-scan==0.0.11 2023-10-02T13:53:51,577 Created temporary directory: /tmp/pip-unpack-_1dvo5an 2023-10-02T13:53:51,799 Downloading BODY_SCAN-0.0.11.tar.gz (6.0 kB) 2023-10-02T13:53:51,839 Added body-scan==0.0.11 from https://files.pythonhosted.org/packages/d2/39/f97e5e82655f5acba2ae8181371e3aeee766f136902395006f467f75c83e/BODY_SCAN-0.0.11.tar.gz to build tracker '/tmp/pip-build-tracker-4ykhmxw_' 2023-10-02T13:53:51,842 Running setup.py (path:/tmp/pip-wheel-yrk0soe1/body-scan_5a42e5466abc4b1abedf6a757c0681cb/setup.py) egg_info for package body-scan 2023-10-02T13:53:51,843 Created temporary directory: /tmp/pip-pip-egg-info-d10i3br8 2023-10-02T13:53:51,843 Preparing metadata (setup.py): started 2023-10-02T13:53:51,845 Running command python setup.py egg_info 2023-10-02T13:53:52,858 # BODY SCAN 2023-10-02T13:53:52,859 ## EXAMPLE OUTPUT: 2023-10-02T13:53:52,860 ```JSON 2023-10-02T13:53:52,860 { 2023-10-02T13:53:52,861 "PATHS": [ 2023-10-02T13:53:52,861 { 2023-10-02T13:53:52,862 "PATH": "PATH_1_HEALTH.py", 2023-10-02T13:53:52,862 "STATS": { 2023-10-02T13:53:52,862 "PASSES": 2, 2023-10-02T13:53:52,863 "ALARMS": 1 2023-10-02T13:53:52,863 }, 2023-10-02T13:53:52,864 "CHECKS": [ 2023-10-02T13:53:52,864 { 2023-10-02T13:53:52,865 "CHECK": "CHECK 1", 2023-10-02T13:53:52,865 "PASSED": true, 2023-10-02T13:53:52,866 "ELAPSED": [ 2023-10-02T13:53:52,866 5.320599666447379e-05, 2023-10-02T13:53:52,867 "SECONDS" 2023-10-02T13:53:52,867 ] 2023-10-02T13:53:52,867 }, 2023-10-02T13:53:52,868 { 2023-10-02T13:53:52,868 "CHECK": "CHECK 2", 2023-10-02T13:53:52,869 "PASSED": true, 2023-10-02T13:53:52,869 "ELAPSED": [ 2023-10-02T13:53:52,870 1.0949999705189839e-05, 2023-10-02T13:53:52,870 "SECONDS" 2023-10-02T13:53:52,871 ] 2023-10-02T13:53:52,871 }, 2023-10-02T13:53:52,872 { 2023-10-02T13:53:52,872 "CHECK": "CHECK 3", 2023-10-02T13:53:52,873 "PASSED": false, 2023-10-02T13:53:52,873 "EXCEPTION": "Exception('NOT 100%')", 2023-10-02T13:53:52,874 "EXCEPTION TRACE": [ 2023-10-02T13:53:52,874 "Traceback (most recent call last):", 2023-10-02T13:53:52,875 " File \"/REPTILIAN_CLIMATES/MODULES/BODY_SCAN/src/SCAN_PROC/KEG/SCAN.py\", line 69, in SCAN", 2023-10-02T13:53:52,875 " CHECKS [ CHECK ] ()", 2023-10-02T13:53:52,876 " File \"\", line 24, in CHECK_3", 2023-10-02T13:53:52,876 "Exception: NOT 100%" 2023-10-02T13:53:52,877 ] 2023-10-02T13:53:52,877 } 2023-10-02T13:53:52,878 ] 2023-10-02T13:53:52,878 }, 2023-10-02T13:53:52,879 { 2023-10-02T13:53:52,880 "PATH": "PATH_2_HEALTH.py", 2023-10-02T13:53:52,880 "EMPTY": true 2023-10-02T13:53:52,881 } 2023-10-02T13:53:52,881 ], 2023-10-02T13:53:52,882 "STATS": { 2023-10-02T13:53:52,883 "EMPTY": 1, 2023-10-02T13:53:52,883 "CHECKS": { 2023-10-02T13:53:52,884 "PASSES": 2, 2023-10-02T13:53:52,884 "ALARMS": 1 2023-10-02T13:53:52,885 } 2023-10-02T13:53:52,886 } 2023-10-02T13:53:52,886 } 2023-10-02T13:53:52,887 ``` 2023-10-02T13:53:52,888 ## HOW TO WRITE CHECKS: 2023-10-02T13:53:52,889 The "CHECKS" dictionary is retrieved with the python "exec" 2023-10-02T13:53:52,889 and then each "CHECK" in "CHECKS" is run. 2023-10-02T13:53:52,890 These checks correspond to the example output shown above. 2023-10-02T13:53:52,891 ``` 2023-10-02T13:53:52,891 PATH_1_HEALTH.py 2023-10-02T13:53:52,892 ``` 2023-10-02T13:53:52,892 ``` 2023-10-02T13:53:52,893 def CHECK_1 (): 2023-10-02T13:53:52,893 print ("CHECK 1") 2023-10-02T13:53:52,895 def CHECK_2 (): 2023-10-02T13:53:52,895 print ("CHECK 2") 2023-10-02T13:53:52,896 def CHECK_3 (): 2023-10-02T13:53:52,897 raise Exception ("NOT 100%") 2023-10-02T13:53:52,898 CHECKS = { 2023-10-02T13:53:52,898 "CHECK 1": CHECK_1, 2023-10-02T13:53:52,899 "CHECK 2": CHECK_2, 2023-10-02T13:53:52,899 "CHECK 3": CHECK_3 2023-10-02T13:53:52,900 } 2023-10-02T13:53:52,900 ``` 2023-10-02T13:53:52,901 ``` 2023-10-02T13:53:52,902 PATH_2_HEALTH.py 2023-10-02T13:53:52,902 ``` 2023-10-02T13:53:52,903 ``` 2023-10-02T13:53:52,903 # 2023-10-02T13:53:52,904 # There isn't a "CHECKS" dictionary present, 2023-10-02T13:53:52,905 # so the scanner reports: 2023-10-02T13:53:52,905 # 2023-10-02T13:53:52,906 # "EMPTY": true 2023-10-02T13:53:52,907 # 2023-10-02T13:53:52,907 ``` 2023-10-02T13:53:52,908 ## HOW TO START THE BODY SCANNER 2023-10-02T13:53:52,909 ### REQUIRED 2023-10-02T13:53:52,909 ``` 2023-10-02T13:53:52,909 "GLOB" is all the files that are sent to the scanner. 2023-10-02T13:53:52,910 ``` 2023-10-02T13:53:52,911 ### OPTIONAL 2023-10-02T13:53:52,911 ``` 2023-10-02T13:53:52,912 "MODULE_PATHS" is folders that are added to "sys.path" 2023-10-02T13:53:52,912 "RELATIVE_PATH" is the folders to remove from the paths in the output 2023-10-02T13:53:52,912 ``` 2023-10-02T13:53:52,913 ### NOTES 2023-10-02T13:53:52,914 ``` 2023-10-02T13:53:52,914 Currently all the checks aren't run in parallel, 2023-10-02T13:53:52,915 but sequential order of paths found in glob is not guaranteed. 2023-10-02T13:53:52,915 ``` 2023-10-02T13:53:52,916 ```python3 2023-10-02T13:53:52,916 import BODY_SCAN 2023-10-02T13:53:52,917 import pathlib 2023-10-02T13:53:52,918 THIS_FOLDER = pathlib.Path (__file__).parent.resolve () 2023-10-02T13:53:52,919 from os.path import dirname, join, normpath 2023-10-02T13:53:52,919 SEARCH = normpath (join (THIS_FOLDER, "MODULE")) 2023-10-02T13:53:52,920 # 2023-10-02T13:53:52,921 # These are added to the sys.path before scan is started. 2023-10-02T13:53:52,921 # 2023-10-02T13:53:52,922 MODULE_PATH = [ 2023-10-02T13:53:52,922 normpath (join (SEARCH, "MODULES")) 2023-10-02T13:53:52,922 ] 2023-10-02T13:53:52,923 SCAN = BODY_SCAN.START ( 2023-10-02T13:53:52,924 # REQUIRED 2023-10-02T13:53:52,924 GLOB = SEARCH + '/**/*HEALTH.py', 2023-10-02T13:53:52,925 # OPTIONAL 2023-10-02T13:53:52,926 MODULE_PATHS = MODULE_PATH, 2023-10-02T13:53:52,927 # OPTIONAL 2023-10-02T13:53:52,927 RELATIVE_PATH = SEARCH 2023-10-02T13:53:52,928 ) 2023-10-02T13:53:52,928 ``` 2023-10-02T13:53:52,931 running egg_info 2023-10-02T13:53:52,931 creating /tmp/pip-pip-egg-info-d10i3br8/BODY_SCAN.egg-info 2023-10-02T13:53:52,932 writing /tmp/pip-pip-egg-info-d10i3br8/BODY_SCAN.egg-info/PKG-INFO 2023-10-02T13:53:52,932 writing dependency_links to /tmp/pip-pip-egg-info-d10i3br8/BODY_SCAN.egg-info/dependency_links.txt 2023-10-02T13:53:52,933 writing requirements to /tmp/pip-pip-egg-info-d10i3br8/BODY_SCAN.egg-info/requires.txt 2023-10-02T13:53:52,933 writing top-level names to /tmp/pip-pip-egg-info-d10i3br8/BODY_SCAN.egg-info/top_level.txt 2023-10-02T13:53:52,934 writing manifest file '/tmp/pip-pip-egg-info-d10i3br8/BODY_SCAN.egg-info/SOURCES.txt' 2023-10-02T13:53:52,984 reading manifest file '/tmp/pip-pip-egg-info-d10i3br8/BODY_SCAN.egg-info/SOURCES.txt' 2023-10-02T13:53:52,986 adding license file 'LICENSE' 2023-10-02T13:53:52,988 writing manifest file '/tmp/pip-pip-egg-info-d10i3br8/BODY_SCAN.egg-info/SOURCES.txt' 2023-10-02T13:53:53,097 Preparing metadata (setup.py): finished with status 'done' 2023-10-02T13:53:53,101 Source in /tmp/pip-wheel-yrk0soe1/body-scan_5a42e5466abc4b1abedf6a757c0681cb has version 0.0.11, which satisfies requirement body-scan==0.0.11 from https://files.pythonhosted.org/packages/d2/39/f97e5e82655f5acba2ae8181371e3aeee766f136902395006f467f75c83e/BODY_SCAN-0.0.11.tar.gz 2023-10-02T13:53:53,102 Removed body-scan==0.0.11 from https://files.pythonhosted.org/packages/d2/39/f97e5e82655f5acba2ae8181371e3aeee766f136902395006f467f75c83e/BODY_SCAN-0.0.11.tar.gz from build tracker '/tmp/pip-build-tracker-4ykhmxw_' 2023-10-02T13:53:53,106 Created temporary directory: /tmp/pip-unpack-by_op69r 2023-10-02T13:53:53,107 Created temporary directory: /tmp/pip-unpack-5bmey9r1 2023-10-02T13:53:53,113 Building wheels for collected packages: body-scan 2023-10-02T13:53:53,117 Created temporary directory: /tmp/pip-wheel-z8enx522 2023-10-02T13:53:53,118 Building wheel for body-scan (setup.py): started 2023-10-02T13:53:53,120 Destination directory: /tmp/pip-wheel-z8enx522 2023-10-02T13:53:53,120 Running command python setup.py bdist_wheel 2023-10-02T13:53:53,527 # BODY SCAN 2023-10-02T13:53:53,528 ## EXAMPLE OUTPUT: 2023-10-02T13:53:53,529 ```JSON 2023-10-02T13:53:53,529 { 2023-10-02T13:53:53,530 "PATHS": [ 2023-10-02T13:53:53,530 { 2023-10-02T13:53:53,530 "PATH": "PATH_1_HEALTH.py", 2023-10-02T13:53:53,531 "STATS": { 2023-10-02T13:53:53,531 "PASSES": 2, 2023-10-02T13:53:53,532 "ALARMS": 1 2023-10-02T13:53:53,532 }, 2023-10-02T13:53:53,533 "CHECKS": [ 2023-10-02T13:53:53,533 { 2023-10-02T13:53:53,533 "CHECK": "CHECK 1", 2023-10-02T13:53:53,534 "PASSED": true, 2023-10-02T13:53:53,534 "ELAPSED": [ 2023-10-02T13:53:53,535 5.320599666447379e-05, 2023-10-02T13:53:53,535 "SECONDS" 2023-10-02T13:53:53,536 ] 2023-10-02T13:53:53,536 }, 2023-10-02T13:53:53,536 { 2023-10-02T13:53:53,537 "CHECK": "CHECK 2", 2023-10-02T13:53:53,537 "PASSED": true, 2023-10-02T13:53:53,538 "ELAPSED": [ 2023-10-02T13:53:53,538 1.0949999705189839e-05, 2023-10-02T13:53:53,539 "SECONDS" 2023-10-02T13:53:53,539 ] 2023-10-02T13:53:53,540 }, 2023-10-02T13:53:53,540 { 2023-10-02T13:53:53,541 "CHECK": "CHECK 3", 2023-10-02T13:53:53,541 "PASSED": false, 2023-10-02T13:53:53,542 "EXCEPTION": "Exception('NOT 100%')", 2023-10-02T13:53:53,542 "EXCEPTION TRACE": [ 2023-10-02T13:53:53,543 "Traceback (most recent call last):", 2023-10-02T13:53:53,543 " File \"/REPTILIAN_CLIMATES/MODULES/BODY_SCAN/src/SCAN_PROC/KEG/SCAN.py\", line 69, in SCAN", 2023-10-02T13:53:53,544 " CHECKS [ CHECK ] ()", 2023-10-02T13:53:53,544 " File \"\", line 24, in CHECK_3", 2023-10-02T13:53:53,545 "Exception: NOT 100%" 2023-10-02T13:53:53,546 ] 2023-10-02T13:53:53,546 } 2023-10-02T13:53:53,547 ] 2023-10-02T13:53:53,547 }, 2023-10-02T13:53:53,548 { 2023-10-02T13:53:53,548 "PATH": "PATH_2_HEALTH.py", 2023-10-02T13:53:53,549 "EMPTY": true 2023-10-02T13:53:53,549 } 2023-10-02T13:53:53,550 ], 2023-10-02T13:53:53,551 "STATS": { 2023-10-02T13:53:53,551 "EMPTY": 1, 2023-10-02T13:53:53,552 "CHECKS": { 2023-10-02T13:53:53,552 "PASSES": 2, 2023-10-02T13:53:53,553 "ALARMS": 1 2023-10-02T13:53:53,554 } 2023-10-02T13:53:53,554 } 2023-10-02T13:53:53,555 } 2023-10-02T13:53:53,555 ``` 2023-10-02T13:53:53,556 ## HOW TO WRITE CHECKS: 2023-10-02T13:53:53,557 The "CHECKS" dictionary is retrieved with the python "exec" 2023-10-02T13:53:53,558 and then each "CHECK" in "CHECKS" is run. 2023-10-02T13:53:53,559 These checks correspond to the example output shown above. 2023-10-02T13:53:53,560 ``` 2023-10-02T13:53:53,560 PATH_1_HEALTH.py 2023-10-02T13:53:53,561 ``` 2023-10-02T13:53:53,561 ``` 2023-10-02T13:53:53,562 def CHECK_1 (): 2023-10-02T13:53:53,563 print ("CHECK 1") 2023-10-02T13:53:53,564 def CHECK_2 (): 2023-10-02T13:53:53,564 print ("CHECK 2") 2023-10-02T13:53:53,565 def CHECK_3 (): 2023-10-02T13:53:53,566 raise Exception ("NOT 100%") 2023-10-02T13:53:53,567 CHECKS = { 2023-10-02T13:53:53,568 "CHECK 1": CHECK_1, 2023-10-02T13:53:53,568 "CHECK 2": CHECK_2, 2023-10-02T13:53:53,569 "CHECK 3": CHECK_3 2023-10-02T13:53:53,569 } 2023-10-02T13:53:53,570 ``` 2023-10-02T13:53:53,571 ``` 2023-10-02T13:53:53,572 PATH_2_HEALTH.py 2023-10-02T13:53:53,572 ``` 2023-10-02T13:53:53,573 ``` 2023-10-02T13:53:53,574 # 2023-10-02T13:53:53,574 # There isn't a "CHECKS" dictionary present, 2023-10-02T13:53:53,575 # so the scanner reports: 2023-10-02T13:53:53,575 # 2023-10-02T13:53:53,576 # "EMPTY": true 2023-10-02T13:53:53,576 # 2023-10-02T13:53:53,577 ``` 2023-10-02T13:53:53,578 ## HOW TO START THE BODY SCANNER 2023-10-02T13:53:53,579 ### REQUIRED 2023-10-02T13:53:53,579 ``` 2023-10-02T13:53:53,579 "GLOB" is all the files that are sent to the scanner. 2023-10-02T13:53:53,580 ``` 2023-10-02T13:53:53,581 ### OPTIONAL 2023-10-02T13:53:53,581 ``` 2023-10-02T13:53:53,582 "MODULE_PATHS" is folders that are added to "sys.path" 2023-10-02T13:53:53,582 "RELATIVE_PATH" is the folders to remove from the paths in the output 2023-10-02T13:53:53,582 ``` 2023-10-02T13:53:53,583 ### NOTES 2023-10-02T13:53:53,584 ``` 2023-10-02T13:53:53,584 Currently all the checks aren't run in parallel, 2023-10-02T13:53:53,585 but sequential order of paths found in glob is not guaranteed. 2023-10-02T13:53:53,585 ``` 2023-10-02T13:53:53,586 ```python3 2023-10-02T13:53:53,586 import BODY_SCAN 2023-10-02T13:53:53,587 import pathlib 2023-10-02T13:53:53,588 THIS_FOLDER = pathlib.Path (__file__).parent.resolve () 2023-10-02T13:53:53,588 from os.path import dirname, join, normpath 2023-10-02T13:53:53,589 SEARCH = normpath (join (THIS_FOLDER, "MODULE")) 2023-10-02T13:53:53,590 # 2023-10-02T13:53:53,590 # These are added to the sys.path before scan is started. 2023-10-02T13:53:53,591 # 2023-10-02T13:53:53,591 MODULE_PATH = [ 2023-10-02T13:53:53,592 normpath (join (SEARCH, "MODULES")) 2023-10-02T13:53:53,592 ] 2023-10-02T13:53:53,593 SCAN = BODY_SCAN.START ( 2023-10-02T13:53:53,594 # REQUIRED 2023-10-02T13:53:53,594 GLOB = SEARCH + '/**/*HEALTH.py', 2023-10-02T13:53:53,595 # OPTIONAL 2023-10-02T13:53:53,595 MODULE_PATHS = MODULE_PATH, 2023-10-02T13:53:53,596 # OPTIONAL 2023-10-02T13:53:53,597 RELATIVE_PATH = SEARCH 2023-10-02T13:53:53,598 ) 2023-10-02T13:53:53,598 ``` 2023-10-02T13:53:54,131 running bdist_wheel 2023-10-02T13:53:54,224 running build 2023-10-02T13:53:54,225 running build_py 2023-10-02T13:53:54,251 creating build 2023-10-02T13:53:54,252 creating build/lib 2023-10-02T13:53:54,252 creating build/lib/BODY_SCAN 2023-10-02T13:53:54,254 copying src/__init__.py -> build/lib/BODY_SCAN 2023-10-02T13:53:54,256 copying src/START_MULTIPLE_PROCESSES.py -> build/lib/BODY_SCAN 2023-10-02T13:53:54,258 creating build/lib/BODY_SCAN/SCAN_PROC 2023-10-02T13:53:54,258 copying src/SCAN_PROC/__init__.py -> build/lib/BODY_SCAN/SCAN_PROC 2023-10-02T13:53:54,261 creating build/lib/BODY_SCAN/FUNCTIONS 2023-10-02T13:53:54,262 copying src/FUNCTIONS/START_A_SCAN.py -> build/lib/BODY_SCAN/FUNCTIONS 2023-10-02T13:53:54,263 copying src/FUNCTIONS/CHECK_STATUS_LOCATION.py -> build/lib/BODY_SCAN/FUNCTIONS 2023-10-02T13:53:54,266 creating build/lib/BODY_SCAN/AGGREGATE 2023-10-02T13:53:54,267 copying src/AGGREGATE/__init__.py -> build/lib/BODY_SCAN/AGGREGATE 2023-10-02T13:53:54,269 creating build/lib/BODY_SCAN/SCAN_PROC/KEG 2023-10-02T13:53:54,270 copying src/SCAN_PROC/KEG/__init__.py -> build/lib/BODY_SCAN/SCAN_PROC/KEG 2023-10-02T13:53:54,272 copying src/SCAN_PROC/KEG/SCAN.py -> build/lib/BODY_SCAN/SCAN_PROC/KEG 2023-10-02T13:53:54,300 /usr/local/lib/python3.11/dist-packages/setuptools/_distutils/cmd.py:66: SetuptoolsDeprecationWarning: setup.py install is deprecated. 2023-10-02T13:53:54,300 !! 2023-10-02T13:53:54,301 ******************************************************************************** 2023-10-02T13:53:54,302 Please avoid running ``setup.py`` directly. 2023-10-02T13:53:54,302 Instead, use pypa/build, pypa/installer or other 2023-10-02T13:53:54,303 standards-based tools. 2023-10-02T13:53:54,304 See https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html for details. 2023-10-02T13:53:54,305 ******************************************************************************** 2023-10-02T13:53:54,306 !! 2023-10-02T13:53:54,307 self.initialize_options() 2023-10-02T13:53:54,325 installing to build/bdist.linux-armv7l/wheel 2023-10-02T13:53:54,326 running install 2023-10-02T13:53:54,350 running install_lib 2023-10-02T13:53:54,373 creating build/bdist.linux-armv7l 2023-10-02T13:53:54,374 creating build/bdist.linux-armv7l/wheel 2023-10-02T13:53:54,375 creating build/bdist.linux-armv7l/wheel/BODY_SCAN 2023-10-02T13:53:54,376 copying build/lib/BODY_SCAN/__init__.py -> build/bdist.linux-armv7l/wheel/BODY_SCAN 2023-10-02T13:53:54,378 creating build/bdist.linux-armv7l/wheel/BODY_SCAN/SCAN_PROC 2023-10-02T13:53:54,379 copying build/lib/BODY_SCAN/SCAN_PROC/__init__.py -> build/bdist.linux-armv7l/wheel/BODY_SCAN/SCAN_PROC 2023-10-02T13:53:54,381 creating build/bdist.linux-armv7l/wheel/BODY_SCAN/SCAN_PROC/KEG 2023-10-02T13:53:54,382 copying build/lib/BODY_SCAN/SCAN_PROC/KEG/__init__.py -> build/bdist.linux-armv7l/wheel/BODY_SCAN/SCAN_PROC/KEG 2023-10-02T13:53:54,384 copying build/lib/BODY_SCAN/SCAN_PROC/KEG/SCAN.py -> build/bdist.linux-armv7l/wheel/BODY_SCAN/SCAN_PROC/KEG 2023-10-02T13:53:54,386 copying build/lib/BODY_SCAN/START_MULTIPLE_PROCESSES.py -> build/bdist.linux-armv7l/wheel/BODY_SCAN 2023-10-02T13:53:54,388 creating build/bdist.linux-armv7l/wheel/BODY_SCAN/FUNCTIONS 2023-10-02T13:53:54,389 copying build/lib/BODY_SCAN/FUNCTIONS/START_A_SCAN.py -> build/bdist.linux-armv7l/wheel/BODY_SCAN/FUNCTIONS 2023-10-02T13:53:54,390 copying build/lib/BODY_SCAN/FUNCTIONS/CHECK_STATUS_LOCATION.py -> build/bdist.linux-armv7l/wheel/BODY_SCAN/FUNCTIONS 2023-10-02T13:53:54,392 creating build/bdist.linux-armv7l/wheel/BODY_SCAN/AGGREGATE 2023-10-02T13:53:54,393 copying build/lib/BODY_SCAN/AGGREGATE/__init__.py -> build/bdist.linux-armv7l/wheel/BODY_SCAN/AGGREGATE 2023-10-02T13:53:54,395 running install_egg_info 2023-10-02T13:53:54,453 running egg_info 2023-10-02T13:53:54,477 writing BODY_SCAN.egg-info/PKG-INFO 2023-10-02T13:53:54,480 writing dependency_links to BODY_SCAN.egg-info/dependency_links.txt 2023-10-02T13:53:54,481 writing requirements to BODY_SCAN.egg-info/requires.txt 2023-10-02T13:53:54,483 writing top-level names to BODY_SCAN.egg-info/top_level.txt 2023-10-02T13:53:54,510 reading manifest file 'BODY_SCAN.egg-info/SOURCES.txt' 2023-10-02T13:53:54,512 adding license file 'LICENSE' 2023-10-02T13:53:54,514 writing manifest file 'BODY_SCAN.egg-info/SOURCES.txt' 2023-10-02T13:53:54,515 Copying BODY_SCAN.egg-info to build/bdist.linux-armv7l/wheel/BODY_SCAN-0.0.11-py3.11.egg-info 2023-10-02T13:53:54,524 running install_scripts 2023-10-02T13:53:54,536 creating build/bdist.linux-armv7l/wheel/BODY_SCAN-0.0.11.dist-info/WHEEL 2023-10-02T13:53:54,538 creating '/tmp/pip-wheel-z8enx522/BODY_SCAN-0.0.11-py3-none-any.whl' and adding 'build/bdist.linux-armv7l/wheel' to it 2023-10-02T13:53:54,540 adding 'BODY_SCAN/START_MULTIPLE_PROCESSES.py' 2023-10-02T13:53:54,542 adding 'BODY_SCAN/__init__.py' 2023-10-02T13:53:54,544 adding 'BODY_SCAN/AGGREGATE/__init__.py' 2023-10-02T13:53:54,545 adding 'BODY_SCAN/FUNCTIONS/CHECK_STATUS_LOCATION.py' 2023-10-02T13:53:54,547 adding 'BODY_SCAN/FUNCTIONS/START_A_SCAN.py' 2023-10-02T13:53:54,548 adding 'BODY_SCAN/SCAN_PROC/__init__.py' 2023-10-02T13:53:54,550 adding 'BODY_SCAN/SCAN_PROC/KEG/SCAN.py' 2023-10-02T13:53:54,552 adding 'BODY_SCAN/SCAN_PROC/KEG/__init__.py' 2023-10-02T13:53:54,553 adding 'BODY_SCAN-0.0.11.dist-info/LICENSE' 2023-10-02T13:53:54,555 adding 'BODY_SCAN-0.0.11.dist-info/METADATA' 2023-10-02T13:53:54,556 adding 'BODY_SCAN-0.0.11.dist-info/WHEEL' 2023-10-02T13:53:54,557 adding 'BODY_SCAN-0.0.11.dist-info/top_level.txt' 2023-10-02T13:53:54,557 adding 'BODY_SCAN-0.0.11.dist-info/RECORD' 2023-10-02T13:53:54,559 removing build/bdist.linux-armv7l/wheel 2023-10-02T13:53:54,676 Building wheel for body-scan (setup.py): finished with status 'done' 2023-10-02T13:53:54,679 Created wheel for body-scan: filename=BODY_SCAN-0.0.11-py3-none-any.whl size=7897 sha256=c44320cba95859a174b73fcfc745fc84303ee6538c7eb22127f2eba8b90c3172 2023-10-02T13:53:54,680 Stored in directory: /tmp/pip-ephem-wheel-cache-hz_l67x5/wheels/5e/48/d6/6348b8dc510958999b826ce84319334adebe88fcf2f2aaac1c 2023-10-02T13:53:54,690 Successfully built body-scan 2023-10-02T13:53:54,693 Removed build tracker: '/tmp/pip-build-tracker-4ykhmxw_'