From 5f15f33793c24dfd327db33492ff485c0f0ac6de Mon Sep 17 00:00:00 2001 From: christophkloeffel Date: Mon, 26 Feb 2024 19:57:35 +0100 Subject: [PATCH 1/3] adds the cpp_raw lobster tool for simplified text extraction of c and c++ code --- CHANGELOG.md | 4 + Makefile | 1 + Pipfile | 17 + Pipfile.lock | 355 +++++++++++++++++++++ README.md | 3 +- lobster/tools/cpp/cpp.py | 2 +- lobster/tools/cpp_raw/__init__.py | 0 lobster/tools/cpp_raw/cpp_raw.py | 221 +++++++++++++ packages/lobster-metapackage/README.md | 1 + packages/lobster-metapackage/setup.py | 1 - packages/lobster-monolithic/setup.py | 2 - packages/lobster-tool-codebeamer/setup.py | 1 - packages/lobster-tool-cpp/setup.py | 1 - packages/lobster-tool-cpp_raw/Makefile | 5 + packages/lobster-tool-cpp_raw/README.md | 27 ++ packages/lobster-tool-cpp_raw/entrypoints | 1 + packages/lobster-tool-cpp_raw/requirements | 0 packages/lobster-tool-cpp_raw/setup.py | 71 +++++ packages/lobster-tool-json/setup.py | 1 - packages/lobster-tool-python/setup.py | 1 - packages/lobster-tool-trlc/setup.py | 1 - test-unit/test_json.py | 1 - 22 files changed, 706 insertions(+), 11 deletions(-) create mode 100644 Pipfile create mode 100644 Pipfile.lock create mode 100644 lobster/tools/cpp_raw/__init__.py create mode 100755 lobster/tools/cpp_raw/cpp_raw.py create mode 100644 packages/lobster-tool-cpp_raw/Makefile create mode 100644 packages/lobster-tool-cpp_raw/README.md create mode 100644 packages/lobster-tool-cpp_raw/entrypoints create mode 100644 packages/lobster-tool-cpp_raw/requirements create mode 100644 packages/lobster-tool-cpp_raw/setup.py diff --git a/CHANGELOG.md b/CHANGELOG.md index 9946023b..a9284e66 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,10 @@ ### 0.9.17-dev +* Adds a simplified version of the `lobster-cpp` tool, called + `lobster-cpp_raw`. This tool does not have any dependendies unlike + `lobster-cpp`. It is also less accurate, but might be useful in + some cases. ### 0.9.16 diff --git a/Makefile b/Makefile index fa4eccc7..0e5b51af 100644 --- a/Makefile +++ b/Makefile @@ -26,6 +26,7 @@ packages: make -C packages/lobster-tool-trlc make -C packages/lobster-tool-codebeamer make -C packages/lobster-tool-cpp + make -C packages/lobster-tool-cpp_raw make -C packages/lobster-tool-gtest make -C packages/lobster-tool-json make -C packages/lobster-tool-python diff --git a/Pipfile b/Pipfile new file mode 100644 index 00000000..349d0ada --- /dev/null +++ b/Pipfile @@ -0,0 +1,17 @@ +[[source]] +url = "https://pypi.org/simple" +verify_ssl = true +name = "pypi" + +[packages] +trlc = "*" +libcst = "*" +requests = "*" + +[dev-packages] +setuptools = "*" +pycodestyle = "*" +pylint = "*" + +[requires] +python_version = "3.12" diff --git a/Pipfile.lock b/Pipfile.lock new file mode 100644 index 00000000..08c833f9 --- /dev/null +++ b/Pipfile.lock @@ -0,0 +1,355 @@ +{ + "_meta": { + "hash": { + "sha256": "77173743c2a74dafb5aab75d47e6b9b588bc333f339ac04a15bc1e3a4104c0ab" + }, + "pipfile-spec": 6, + "requires": { + "python_version": "3.12" + }, + "sources": [ + { + "name": "pypi", + "url": "https://pypi.org/simple", + "verify_ssl": true + } + ] + }, + "default": { + "certifi": { + "hashes": [ + "sha256:0569859f95fc761b18b45ef421b1290a0f65f147e92a1e5eb3e635f9a5e4e66f", + "sha256:dc383c07b76109f368f6106eee2b593b04a011ea4d55f652c6ca24a754d1cdd1" + ], + "markers": "python_version >= '3.6'", + "version": "==2024.2.2" + }, + "charset-normalizer": { + "hashes": [ + "sha256:06435b539f889b1f6f4ac1758871aae42dc3a8c0e24ac9e60c2384973ad73027", + "sha256:06a81e93cd441c56a9b65d8e1d043daeb97a3d0856d177d5c90ba85acb3db087", + "sha256:0a55554a2fa0d408816b3b5cedf0045f4b8e1a6065aec45849de2d6f3f8e9786", + "sha256:0b2b64d2bb6d3fb9112bafa732def486049e63de9618b5843bcdd081d8144cd8", + "sha256:10955842570876604d404661fbccbc9c7e684caf432c09c715ec38fbae45ae09", + "sha256:122c7fa62b130ed55f8f285bfd56d5f4b4a5b503609d181f9ad85e55c89f4185", + "sha256:1ceae2f17a9c33cb48e3263960dc5fc8005351ee19db217e9b1bb15d28c02574", + "sha256:1d3193f4a680c64b4b6a9115943538edb896edc190f0b222e73761716519268e", + "sha256:1f79682fbe303db92bc2b1136016a38a42e835d932bab5b3b1bfcfbf0640e519", + "sha256:2127566c664442652f024c837091890cb1942c30937add288223dc895793f898", + "sha256:22afcb9f253dac0696b5a4be4a1c0f8762f8239e21b99680099abd9b2b1b2269", + "sha256:25baf083bf6f6b341f4121c2f3c548875ee6f5339300e08be3f2b2ba1721cdd3", + "sha256:2e81c7b9c8979ce92ed306c249d46894776a909505d8f5a4ba55b14206e3222f", + "sha256:3287761bc4ee9e33561a7e058c72ac0938c4f57fe49a09eae428fd88aafe7bb6", + "sha256:34d1c8da1e78d2e001f363791c98a272bb734000fcef47a491c1e3b0505657a8", + "sha256:37e55c8e51c236f95b033f6fb391d7d7970ba5fe7ff453dad675e88cf303377a", + "sha256:3d47fa203a7bd9c5b6cee4736ee84ca03b8ef23193c0d1ca99b5089f72645c73", + "sha256:3e4d1f6587322d2788836a99c69062fbb091331ec940e02d12d179c1d53e25fc", + "sha256:42cb296636fcc8b0644486d15c12376cb9fa75443e00fb25de0b8602e64c1714", + "sha256:45485e01ff4d3630ec0d9617310448a8702f70e9c01906b0d0118bdf9d124cf2", + "sha256:4a78b2b446bd7c934f5dcedc588903fb2f5eec172f3d29e52a9096a43722adfc", + "sha256:4ab2fe47fae9e0f9dee8c04187ce5d09f48eabe611be8259444906793ab7cbce", + "sha256:4d0d1650369165a14e14e1e47b372cfcb31d6ab44e6e33cb2d4e57265290044d", + "sha256:549a3a73da901d5bc3ce8d24e0600d1fa85524c10287f6004fbab87672bf3e1e", + "sha256:55086ee1064215781fff39a1af09518bc9255b50d6333f2e4c74ca09fac6a8f6", + "sha256:572c3763a264ba47b3cf708a44ce965d98555f618ca42c926a9c1616d8f34269", + "sha256:573f6eac48f4769d667c4442081b1794f52919e7edada77495aaed9236d13a96", + "sha256:5b4c145409bef602a690e7cfad0a15a55c13320ff7a3ad7ca59c13bb8ba4d45d", + "sha256:6463effa3186ea09411d50efc7d85360b38d5f09b870c48e4600f63af490e56a", + "sha256:65f6f63034100ead094b8744b3b97965785388f308a64cf8d7c34f2f2e5be0c4", + "sha256:663946639d296df6a2bb2aa51b60a2454ca1cb29835324c640dafb5ff2131a77", + "sha256:6897af51655e3691ff853668779c7bad41579facacf5fd7253b0133308cf000d", + "sha256:68d1f8a9e9e37c1223b656399be5d6b448dea850bed7d0f87a8311f1ff3dabb0", + "sha256:6ac7ffc7ad6d040517be39eb591cac5ff87416c2537df6ba3cba3bae290c0fed", + "sha256:6b3251890fff30ee142c44144871185dbe13b11bab478a88887a639655be1068", + "sha256:6c4caeef8fa63d06bd437cd4bdcf3ffefe6738fb1b25951440d80dc7df8c03ac", + "sha256:6ef1d82a3af9d3eecdba2321dc1b3c238245d890843e040e41e470ffa64c3e25", + "sha256:753f10e867343b4511128c6ed8c82f7bec3bd026875576dfd88483c5c73b2fd8", + "sha256:7cd13a2e3ddeed6913a65e66e94b51d80a041145a026c27e6bb76c31a853c6ab", + "sha256:7ed9e526742851e8d5cc9e6cf41427dfc6068d4f5a3bb03659444b4cabf6bc26", + "sha256:7f04c839ed0b6b98b1a7501a002144b76c18fb1c1850c8b98d458ac269e26ed2", + "sha256:802fe99cca7457642125a8a88a084cef28ff0cf9407060f7b93dca5aa25480db", + "sha256:80402cd6ee291dcb72644d6eac93785fe2c8b9cb30893c1af5b8fdd753b9d40f", + "sha256:8465322196c8b4d7ab6d1e049e4c5cb460d0394da4a27d23cc242fbf0034b6b5", + "sha256:86216b5cee4b06df986d214f664305142d9c76df9b6512be2738aa72a2048f99", + "sha256:87d1351268731db79e0f8e745d92493ee2841c974128ef629dc518b937d9194c", + "sha256:8bdb58ff7ba23002a4c5808d608e4e6c687175724f54a5dade5fa8c67b604e4d", + "sha256:8c622a5fe39a48f78944a87d4fb8a53ee07344641b0562c540d840748571b811", + "sha256:8d756e44e94489e49571086ef83b2bb8ce311e730092d2c34ca8f7d925cb20aa", + "sha256:8f4a014bc36d3c57402e2977dada34f9c12300af536839dc38c0beab8878f38a", + "sha256:9063e24fdb1e498ab71cb7419e24622516c4a04476b17a2dab57e8baa30d6e03", + "sha256:90d558489962fd4918143277a773316e56c72da56ec7aa3dc3dbbe20fdfed15b", + "sha256:923c0c831b7cfcb071580d3f46c4baf50f174be571576556269530f4bbd79d04", + "sha256:95f2a5796329323b8f0512e09dbb7a1860c46a39da62ecb2324f116fa8fdc85c", + "sha256:96b02a3dc4381e5494fad39be677abcb5e6634bf7b4fa83a6dd3112607547001", + "sha256:9f96df6923e21816da7e0ad3fd47dd8f94b2a5ce594e00677c0013018b813458", + "sha256:a10af20b82360ab00827f916a6058451b723b4e65030c5a18577c8b2de5b3389", + "sha256:a50aebfa173e157099939b17f18600f72f84eed3049e743b68ad15bd69b6bf99", + "sha256:a981a536974bbc7a512cf44ed14938cf01030a99e9b3a06dd59578882f06f985", + "sha256:a9a8e9031d613fd2009c182b69c7b2c1ef8239a0efb1df3f7c8da66d5dd3d537", + "sha256:ae5f4161f18c61806f411a13b0310bea87f987c7d2ecdbdaad0e94eb2e404238", + "sha256:aed38f6e4fb3f5d6bf81bfa990a07806be9d83cf7bacef998ab1a9bd660a581f", + "sha256:b01b88d45a6fcb69667cd6d2f7a9aeb4bf53760d7fc536bf679ec94fe9f3ff3d", + "sha256:b261ccdec7821281dade748d088bb6e9b69e6d15b30652b74cbbac25e280b796", + "sha256:b2b0a0c0517616b6869869f8c581d4eb2dd83a4d79e0ebcb7d373ef9956aeb0a", + "sha256:b4a23f61ce87adf89be746c8a8974fe1c823c891d8f86eb218bb957c924bb143", + "sha256:bd8f7df7d12c2db9fab40bdd87a7c09b1530128315d047a086fa3ae3435cb3a8", + "sha256:beb58fe5cdb101e3a055192ac291b7a21e3b7ef4f67fa1d74e331a7f2124341c", + "sha256:c002b4ffc0be611f0d9da932eb0f704fe2602a9a949d1f738e4c34c75b0863d5", + "sha256:c083af607d2515612056a31f0a8d9e0fcb5876b7bfc0abad3ecd275bc4ebc2d5", + "sha256:c180f51afb394e165eafe4ac2936a14bee3eb10debc9d9e4db8958fe36afe711", + "sha256:c235ebd9baae02f1b77bcea61bce332cb4331dc3617d254df3323aa01ab47bd4", + "sha256:cd70574b12bb8a4d2aaa0094515df2463cb429d8536cfb6c7ce983246983e5a6", + "sha256:d0eccceffcb53201b5bfebb52600a5fb483a20b61da9dbc885f8b103cbe7598c", + "sha256:d965bba47ddeec8cd560687584e88cf699fd28f192ceb452d1d7ee807c5597b7", + "sha256:db364eca23f876da6f9e16c9da0df51aa4f104a972735574842618b8c6d999d4", + "sha256:ddbb2551d7e0102e7252db79ba445cdab71b26640817ab1e3e3648dad515003b", + "sha256:deb6be0ac38ece9ba87dea880e438f25ca3eddfac8b002a2ec3d9183a454e8ae", + "sha256:e06ed3eb3218bc64786f7db41917d4e686cc4856944f53d5bdf83a6884432e12", + "sha256:e27ad930a842b4c5eb8ac0016b0a54f5aebbe679340c26101df33424142c143c", + "sha256:e537484df0d8f426ce2afb2d0f8e1c3d0b114b83f8850e5f2fbea0e797bd82ae", + "sha256:eb00ed941194665c332bf8e078baf037d6c35d7c4f3102ea2d4f16ca94a26dc8", + "sha256:eb6904c354526e758fda7167b33005998fb68c46fbc10e013ca97f21ca5c8887", + "sha256:eb8821e09e916165e160797a6c17edda0679379a4be5c716c260e836e122f54b", + "sha256:efcb3f6676480691518c177e3b465bcddf57cea040302f9f4e6e191af91174d4", + "sha256:f27273b60488abe721a075bcca6d7f3964f9f6f067c8c4c605743023d7d3944f", + "sha256:f30c3cb33b24454a82faecaf01b19c18562b1e89558fb6c56de4d9118a032fd5", + "sha256:fb69256e180cb6c8a894fee62b3afebae785babc1ee98b81cdf68bbca1987f33", + "sha256:fd1abc0d89e30cc4e02e4064dc67fcc51bd941eb395c502aac3ec19fab46b519", + "sha256:ff8fa367d09b717b2a17a052544193ad76cd49979c805768879cb63d9ca50561" + ], + "markers": "python_full_version >= '3.7.0'", + "version": "==3.3.2" + }, + "idna": { + "hashes": [ + "sha256:9ecdbbd083b06798ae1e86adcbfe8ab1479cf864e4ee30fe4e46a003d12491ca", + "sha256:c05567e9c24a6b9faaa835c4821bad0590fbb9d5779e7caa6e1cc4978e7eb24f" + ], + "markers": "python_version >= '3.5'", + "version": "==3.6" + }, + "libcst": { + "hashes": [ + "sha256:0cb92398236566f0b73a0c73f8a41a9c4906c793e8f7c2745f30e3fb141a34b5", + "sha256:13ca9fe82326d82feb2c7b0f5a320ce7ed0d707c32919dd36e1f40792459bf6f", + "sha256:1b5fecb2b26fa3c1efe6e05ef1420522bd31bb4dae239e4c41fdf3ddbd853aeb", + "sha256:1d45718f7e7a1405a16fd8e7fc75c365120001b6928bfa3c4112f7e533990b9a", + "sha256:2bbb4e442224da46b59a248d7d632ed335eae023a921dea1f5c72d2a059f6be9", + "sha256:38fbd56f885e1f77383a6d1d798a917ffbc6d28dc6b1271eddbf8511c194213e", + "sha256:3c7c0edfe3b878d64877671261c7b3ffe9d23181774bfad5d8fcbdbbbde9f064", + "sha256:4973a9d509cf1a59e07fac55a98f70bc4fd35e09781dffb3ec93ee32fc0de7af", + "sha256:5c0d548d92c6704bb07ce35d78c0e054cdff365def0645c1b57c856c8e112bb4", + "sha256:5e54389abdea995b39ee96ad736ed1b0b8402ed30a7956b7a279c10baf0c0294", + "sha256:6dd388c74c04434b41e3b25fc4a0fafa3e6abf91f97181df55e8f8327fd903cc", + "sha256:71dd69fff76e7edaf8fae0f63ffcdbf5016e8cd83165b1d0688d6856aa48186a", + "sha256:7f4919978c2b395079b64d8a654357854767adbabab13998b39c1f0bc67da8a7", + "sha256:82373a35711a8bb2a664dba2b7aeb20bbcce92a4db40af964e9cb2b976f989e7", + "sha256:8b56130f18aca9a98b3bcaf5962b2b26c2dcdd6d5132decf3f0b0b635f4403ba", + "sha256:968b93400e66e6711a29793291365e312d206dbafd3fc80219cfa717f0f01ad5", + "sha256:b4066dcadf92b183706f81ae0b4342e7624fc1d9c5ca2bf2b44066cb74bf863f", + "sha256:ba24b8cf789db6b87c6e23a6c6365f5f73cb7306d929397581d5680149e9990c", + "sha256:c0149d24a455536ff2e41b3a48b16d3ebb245e28035013c91bd868def16592a0", + "sha256:c80f36f4a02d530e28eac7073aabdea7c6795fc820773a02224021d79d164e8b", + "sha256:dded0e4f2e18150c4b07fedd7ef84a9abc7f9bd2d47cc1c485248ee1ec58e5cc", + "sha256:dece0362540abfc39cd2cf5c98cde238b35fd74a1b0167e2563e4b8bb5f47489", + "sha256:e01879aa8cd478bb8b1e4285cfd0607e64047116f7ab52bc2a787cde584cd686", + "sha256:f080e9af843ff609f8f35fc7275c8bf08b02c31115e7cd5b77ca3b6a56c75096", + "sha256:f2342634f6c61fc9076dc0baf21e9cf5ef0195a06e1e95c0c9dc583ba3a30d00" + ], + "index": "pypi", + "markers": "python_version >= '3.9'", + "version": "==1.2.0" + }, + "mypy-extensions": { + "hashes": [ + "sha256:4392f6c0eb8a5668a69e23d168ffa70f0be9ccfd32b5cc2d26a34ae5b844552d", + "sha256:75dbf8955dc00442a438fc4d0666508a9a97b6bd41aa2f0ffe9d2f2725af0782" + ], + "markers": "python_version >= '3.5'", + "version": "==1.0.0" + }, + "pyvcg": { + "hashes": [ + "sha256:cf0ddec9a80f5880836bfe93214641e83fedf279311ad6182bb85b726d896e47", + "sha256:eaa7c054c3fae21706855aa314761f139080661c63fa9712c48340c563513199" + ], + "markers": "python_version >= '3.8'", + "version": "==1.0.6" + }, + "pyyaml": { + "hashes": [ + "sha256:04ac92ad1925b2cff1db0cfebffb6ffc43457495c9b3c39d3fcae417d7125dc5", + "sha256:062582fca9fabdd2c8b54a3ef1c978d786e0f6b3a1510e0ac93ef59e0ddae2bc", + "sha256:0d3304d8c0adc42be59c5f8a4d9e3d7379e6955ad754aa9d6ab7a398b59dd1df", + "sha256:1635fd110e8d85d55237ab316b5b011de701ea0f29d07611174a1b42f1444741", + "sha256:184c5108a2aca3c5b3d3bf9395d50893a7ab82a38004c8f61c258d4428e80206", + "sha256:18aeb1bf9a78867dc38b259769503436b7c72f7a1f1f4c93ff9a17de54319b27", + "sha256:1d4c7e777c441b20e32f52bd377e0c409713e8bb1386e1099c2415f26e479595", + "sha256:1e2722cc9fbb45d9b87631ac70924c11d3a401b2d7f410cc0e3bbf249f2dca62", + "sha256:1fe35611261b29bd1de0070f0b2f47cb6ff71fa6595c077e42bd0c419fa27b98", + "sha256:28c119d996beec18c05208a8bd78cbe4007878c6dd15091efb73a30e90539696", + "sha256:326c013efe8048858a6d312ddd31d56e468118ad4cdeda36c719bf5bb6192290", + "sha256:40df9b996c2b73138957fe23a16a4f0ba614f4c0efce1e9406a184b6d07fa3a9", + "sha256:42f8152b8dbc4fe7d96729ec2b99c7097d656dc1213a3229ca5383f973a5ed6d", + "sha256:49a183be227561de579b4a36efbb21b3eab9651dd81b1858589f796549873dd6", + "sha256:4fb147e7a67ef577a588a0e2c17b6db51dda102c71de36f8549b6816a96e1867", + "sha256:50550eb667afee136e9a77d6dc71ae76a44df8b3e51e41b77f6de2932bfe0f47", + "sha256:510c9deebc5c0225e8c96813043e62b680ba2f9c50a08d3724c7f28a747d1486", + "sha256:5773183b6446b2c99bb77e77595dd486303b4faab2b086e7b17bc6bef28865f6", + "sha256:596106435fa6ad000c2991a98fa58eeb8656ef2325d7e158344fb33864ed87e3", + "sha256:6965a7bc3cf88e5a1c3bd2e0b5c22f8d677dc88a455344035f03399034eb3007", + "sha256:69b023b2b4daa7548bcfbd4aa3da05b3a74b772db9e23b982788168117739938", + "sha256:6c22bec3fbe2524cde73d7ada88f6566758a8f7227bfbf93a408a9d86bcc12a0", + "sha256:704219a11b772aea0d8ecd7058d0082713c3562b4e271b849ad7dc4a5c90c13c", + "sha256:7e07cbde391ba96ab58e532ff4803f79c4129397514e1413a7dc761ccd755735", + "sha256:81e0b275a9ecc9c0c0c07b4b90ba548307583c125f54d5b6946cfee6360c733d", + "sha256:855fb52b0dc35af121542a76b9a84f8d1cd886ea97c84703eaa6d88e37a2ad28", + "sha256:8d4e9c88387b0f5c7d5f281e55304de64cf7f9c0021a3525bd3b1c542da3b0e4", + "sha256:9046c58c4395dff28dd494285c82ba00b546adfc7ef001486fbf0324bc174fba", + "sha256:9eb6caa9a297fc2c2fb8862bc5370d0303ddba53ba97e71f08023b6cd73d16a8", + "sha256:a08c6f0fe150303c1c6b71ebcd7213c2858041a7e01975da3a99aed1e7a378ef", + "sha256:a0cd17c15d3bb3fa06978b4e8958dcdc6e0174ccea823003a106c7d4d7899ac5", + "sha256:afd7e57eddb1a54f0f1a974bc4391af8bcce0b444685d936840f125cf046d5bd", + "sha256:b1275ad35a5d18c62a7220633c913e1b42d44b46ee12554e5fd39c70a243d6a3", + "sha256:b786eecbdf8499b9ca1d697215862083bd6d2a99965554781d0d8d1ad31e13a0", + "sha256:ba336e390cd8e4d1739f42dfe9bb83a3cc2e80f567d8805e11b46f4a943f5515", + "sha256:baa90d3f661d43131ca170712d903e6295d1f7a0f595074f151c0aed377c9b9c", + "sha256:bc1bf2925a1ecd43da378f4db9e4f799775d6367bdb94671027b73b393a7c42c", + "sha256:bd4af7373a854424dabd882decdc5579653d7868b8fb26dc7d0e99f823aa5924", + "sha256:bf07ee2fef7014951eeb99f56f39c9bb4af143d8aa3c21b1677805985307da34", + "sha256:bfdf460b1736c775f2ba9f6a92bca30bc2095067b8a9d77876d1fad6cc3b4a43", + "sha256:c8098ddcc2a85b61647b2590f825f3db38891662cfc2fc776415143f599bb859", + "sha256:d2b04aac4d386b172d5b9692e2d2da8de7bfb6c387fa4f801fbf6fb2e6ba4673", + "sha256:d483d2cdf104e7c9fa60c544d92981f12ad66a457afae824d146093b8c294c54", + "sha256:d858aa552c999bc8a8d57426ed01e40bef403cd8ccdd0fc5f6f04a00414cac2a", + "sha256:e7d73685e87afe9f3b36c799222440d6cf362062f78be1013661b00c5c6f678b", + "sha256:f003ed9ad21d6a4713f0a9b5a7a0a79e08dd0f221aff4525a2be4c346ee60aab", + "sha256:f22ac1c3cac4dbc50079e965eba2c1058622631e526bd9afd45fedd49ba781fa", + "sha256:faca3bdcf85b2fc05d06ff3fbc1f83e1391b3e724afa3feba7d13eeab355484c", + "sha256:fca0e3a251908a499833aa292323f32437106001d436eca0e6e7833256674585", + "sha256:fd1592b3fdf65fff2ad0004b5e363300ef59ced41c2e6b3a99d4089fa8c5435d", + "sha256:fd66fc5d0da6d9815ba2cebeb4205f95818ff4b79c3ebe268e75d961704af52f" + ], + "markers": "python_version >= '3.6'", + "version": "==6.0.1" + }, + "requests": { + "hashes": [ + "sha256:58cd2187c01e70e6e26505bca751777aa9f2ee0b7f4300988b709f44e013003f", + "sha256:942c5a758f98d790eaed1a29cb6eefc7ffb0d1cf7af05c3d2791656dbd6ad1e1" + ], + "index": "pypi", + "markers": "python_version >= '3.7'", + "version": "==2.31.0" + }, + "trlc": { + "hashes": [ + "sha256:ac76cba6850a8d96a725177fd94e4b58668a5c8330ec9ea7d01ab3a6fd37a0be", + "sha256:b2b4c408c873f7209d3189cf41feada5d909c300ee11fe7e7fff1b70fbbc6446" + ], + "index": "pypi", + "markers": "python_version >= '3.8' and python_version < '4'", + "version": "==1.2.2" + }, + "typing-extensions": { + "hashes": [ + "sha256:69b1a937c3a517342112fb4c6df7e72fc39a38e7891a5730ed4985b5214b5475", + "sha256:b0abd7c89e8fb96f98db18d86106ff1d90ab692004eb746cf6eda2682f91b3cb" + ], + "markers": "python_version >= '3.8'", + "version": "==4.10.0" + }, + "typing-inspect": { + "hashes": [ + "sha256:9ee6fc59062311ef8547596ab6b955e1b8aa46242d854bfc78f4f6b0eff35f9f", + "sha256:b23fc42ff6f6ef6954e4852c1fb512cdd18dbea03134f91f856a95ccc9461f78" + ], + "version": "==0.9.0" + }, + "urllib3": { + "hashes": [ + "sha256:450b20ec296a467077128bff42b73080516e71b56ff59a60a02bef2232c4fa9d", + "sha256:d0570876c61ab9e520d776c38acbbb5b05a776d3f9ff98a5c8fd5162a444cf19" + ], + "markers": "python_version >= '3.8'", + "version": "==2.2.1" + } + }, + "develop": { + "astroid": { + "hashes": [ + "sha256:951798f922990137ac090c53af473db7ab4e70c770e6d7fae0cec59f74411819", + "sha256:ac248253bfa4bd924a0de213707e7ebeeb3138abeb48d798784ead1e56d419d4" + ], + "markers": "python_full_version >= '3.8.0'", + "version": "==3.1.0" + }, + "dill": { + "hashes": [ + "sha256:3ebe3c479ad625c4553aca177444d89b486b1d84982eeacded644afc0cf797ca", + "sha256:c36ca9ffb54365bdd2f8eb3eff7d2a21237f8452b57ace88b1ac615b7e815bd7" + ], + "markers": "python_version >= '3.11'", + "version": "==0.3.8" + }, + "isort": { + "hashes": [ + "sha256:48fdfcb9face5d58a4f6dde2e72a1fb8dcaf8ab26f95ab49fab84c2ddefb0109", + "sha256:8ca5e72a8d85860d5a3fa69b8745237f2939afe12dbf656afbcb47fe72d947a6" + ], + "markers": "python_full_version >= '3.8.0'", + "version": "==5.13.2" + }, + "mccabe": { + "hashes": [ + "sha256:348e0240c33b60bbdf4e523192ef919f28cb2c3d7d5c7794f74009290f236325", + "sha256:6c2d30ab6be0e4a46919781807b4f0d834ebdd6c6e3dca0bda5a15f863427b6e" + ], + "markers": "python_version >= '3.6'", + "version": "==0.7.0" + }, + "platformdirs": { + "hashes": [ + "sha256:0614df2a2f37e1a662acbd8e2b25b92ccf8632929bc6d43467e17fe89c75e068", + "sha256:ef0cc731df711022c174543cb70a9b5bd22e5a9337c8624ef2c2ceb8ddad8768" + ], + "markers": "python_version >= '3.8'", + "version": "==4.2.0" + }, + "pycodestyle": { + "hashes": [ + "sha256:41ba0e7afc9752dfb53ced5489e89f8186be00e599e712660695b7a75ff2663f", + "sha256:44fe31000b2d866f2e41841b18528a505fbd7fef9017b04eff4e2648a0fadc67" + ], + "index": "pypi", + "markers": "python_version >= '3.8'", + "version": "==2.11.1" + }, + "pylint": { + "hashes": [ + "sha256:507a5b60953874766d8a366e8e8c7af63e058b26345cfcb5f91f89d987fd6b74", + "sha256:6a69beb4a6f63debebaab0a3477ecd0f559aa726af4954fc948c51f7a2549e23" + ], + "index": "pypi", + "markers": "python_full_version >= '3.8.0'", + "version": "==3.1.0" + }, + "setuptools": { + "hashes": [ + "sha256:02fa291a0471b3a18b2b2481ed902af520c69e8ae0919c13da936542754b4c56", + "sha256:5c0806c7d9af348e6dd3777b4f4dbb42c7ad85b190104837488eab9a7c945cf8" + ], + "index": "pypi", + "markers": "python_version >= '3.8'", + "version": "==69.1.1" + }, + "tomlkit": { + "hashes": [ + "sha256:75baf5012d06501f07bee5bf8e801b9f343e7aac5a92581f20f80ce632e6b5a4", + "sha256:b0a645a9156dc7cb5d3a1f0d4bab66db287fcb8e0430bdd4664a095ea16414ba" + ], + "markers": "python_version >= '3.7'", + "version": "==0.12.3" + } + } +} diff --git a/README.md b/README.md index bb39cad8..5ca852cf 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,7 @@ $ pip3 install bmw-lobster The following requirements frameworks are supported: -* [TRLC](work-in-progress) (only some use cases supported right now) +* [TRLC](packages/lobster-tool-trlc/README.md) (only some use cases supported right now) * [Codebeamer](packages/lobster-tool-codebeamer/README.md) (only some use cases supported right now) @@ -61,6 +61,7 @@ The individual packages that `bmw-lobster` depends on are: * `bmw-lobster-core` the core API and various report generators. All other tools depend on this. * `bmw-lobster-tool-cpp` (for C/C++ code) +* `bmw-lobster-tool-cpp_raw` (for C/C++ code) -> simple version, without the clang-tidy hack * `bmw-lobster-tool-gtest` (for GoogleTest tests) * `bmw-lobster-tool-python` (for Python3 code) * `bmw-lobster-tool-beamer` (for requirements in Codebeamer) diff --git a/lobster/tools/cpp/cpp.py b/lobster/tools/cpp/cpp.py index cb2f87da..2adc66d0 100755 --- a/lobster/tools/cpp/cpp.py +++ b/lobster/tools/cpp/cpp.py @@ -164,7 +164,7 @@ def main(): kind = kind, name = function_name) - db[tag.key].just_up.append(reason) + db[tag.key()].just_up.append(reason) continue diff --git a/lobster/tools/cpp_raw/__init__.py b/lobster/tools/cpp_raw/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/lobster/tools/cpp_raw/cpp_raw.py b/lobster/tools/cpp_raw/cpp_raw.py new file mode 100755 index 00000000..0d2804a0 --- /dev/null +++ b/lobster/tools/cpp_raw/cpp_raw.py @@ -0,0 +1,221 @@ +#!/usr/bin/env python3 +# +# lobster_cpp_raw - Extract C/C++ tracing tags for LOBSTER +# Copyright (C) 2023 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public +# License along with this program. If not, see +# . + +import os.path +import re +import sys + +from argparse import ArgumentParser, Namespace +from io import TextIOWrapper +from typing import Callable, Dict, List, Tuple +from lobster.io import lobster_write +from lobster.items import Tracing_Tag, Implementation +from lobster.location import File_Reference + + +class MisplacedTagException(Exception): + def __init__(self, message: str) -> None: + super().__init__(message) + + +class CppRawArgumentParser(ArgumentParser): + def __init__(self) -> None: + super().__init__() + self.add_argument("files", + nargs="+", + metavar="FILE|DIR") + self.add_argument("--only-tagged-functions", + default=False, + action="store_true", + help="only trace functions with tags") + self.add_argument("--out", + default=None, + help=("write output to this file; otherwise output " + "to to stdout")) + + +def get_valid_files(file_dir: List[str], + argument_parser: CppRawArgumentParser) -> List[str]: + file_list = [] + for item in file_dir: + if os.path.isfile(item): + file_list.append(item) + elif os.path.isdir(item): + for path, _, files in os.walk(item): + for filename in files: + _, ext = os.path.splitext(filename) + if ext in (".cpp", ".cc", ".c", ".h"): + file_list.append(os.path.join(path, filename)) + else: + argument_parser.error("%s is not a file or directory" % item) + return file_list + + +def extract_function_name(all_lines: List[str], trace_line: int) -> str: + if trace_line < len(all_lines): + function_name_match = re.search(r'\b(\w+)\(', + all_lines[trace_line + 1]) + if function_name_match: + return function_name_match.group(1) + else: + return None + + +def write_to_file(options: Namespace, data: Dict[str, Implementation]) -> None: + with open(options.out, "w", encoding="UTF-8") as file: + lobster_write(file, Implementation, "lobster-cpp_raw", data.values()) + print("Written output for %u items to %s" % (len(data), options.out)) + + +def find_lobster_traces(all_lines: List[str]) -> List[Tuple[re.Match, int]]: + matches = [] + i = 0 + while i < len(all_lines): + line = all_lines[i] + match = re.search(r'lobster-trace:\s*(\w+\.\w+)', line) + if match: + matches.append((match, i)) + i += 1 + return matches + + +def find_lobster_excludes(all_lines: List[str]) -> List[Tuple[re.Match, int]]: + matches = [] + i = 0 + while i < len(all_lines): + line = all_lines[i] + match = re.search(r'lobster-exclude:\s*(.*)', line) + if match: + matches.append((match, i)) + i += 1 + return matches + + +def find_all_function_decl(file_content: str) -> List[Tuple[re.Match, int]]: + function_matches = [] + matches = re.finditer(r'(\w+)\s*\([^;]*\)\s*\{', file_content) + for match in matches: + start_pos = match.start() + line_number = file_content.count('\n', 0, start_pos) + 1 + function_matches.append((match, line_number)) + return function_matches + + +def create_raw_entry(data: Dict[str, Implementation], file_name: str, + name: str, line_number: int) -> Tracing_Tag: + tag = Tracing_Tag("cpp", f"{file_name}::{name}::{line_number}") + loc = File_Reference(file_name, line_number) + data[tag.key()] = Implementation( + tag = tag, + location = loc, + language = "C/C++", + kind = "function", + name = name) + return tag + + +def create_entry(match: Tuple[re.Match, int], + data: Dict[str, Implementation], + all_lines: List[str], file: TextIOWrapper, + tag_type: str) -> Tracing_Tag: + line = match[1] + function_line = line + 1 + name = extract_function_name(all_lines, line) + if name is None: + raise MisplacedTagException("ERROR: No function declaration " + "found following the " + f"'{tag_type}' in line {line + 1}") + return create_raw_entry(data, file.name, name, function_line + 1) + + +def create_trace_entry(match: Tuple[re.Match, int], + data: Dict[str, Implementation], + all_lines: List[str], file: TextIOWrapper) -> None: + tag = create_entry(match, data, all_lines, file, "lobster-trace") + data[tag.key()].add_tracing_target(Tracing_Tag("req", match[0].group(1))) + + +def create_exclude_entry(match: Tuple[re.Match, int], + data: Dict[str, Implementation], + all_lines: List[str], file: TextIOWrapper) -> None: + tag = create_entry(match, data, all_lines, file, "lobster-exclude") + data[tag.key()].just_up.append(match[0].group(1)) + + +def create_remaining_function_decl(data: Dict[str, Implementation], + file_content: str, + file: TextIOWrapper) -> None: + function_matches = find_all_function_decl(file_content) + for match in function_matches: + create_raw_entry(data, file.name, match[0].group(1), match[1]) + + +def create_lobster_entries(data: Dict[str, Implementation], + all_lines: List[str], + file: TextIOWrapper, find_function: Callable, + create_type_entry: Callable) -> List[int]: + tracing_matches = find_function(all_lines) + lines_of_creation = [] + for match in tracing_matches: + lines_of_creation.append(match[1]) + create_type_entry(match, data, all_lines, file) + return lines_of_creation + + +def main() -> int: + argument_parser = CppRawArgumentParser() + options = argument_parser.parse_args() + file_list = get_valid_files(options.files, argument_parser) + data = {} + + for file_path in file_list: + with open(file_path, 'r', encoding="UTF-8") as file: + file_content = file.read() + all_lines = file_content.split('\n') + try: + lines_to_remove = create_lobster_entries(data, all_lines, file, + find_lobster_traces, + create_trace_entry) + if options.only_tagged_functions: + continue + lines_to_remove.extend( + create_lobster_entries(data, all_lines, file, + find_lobster_excludes, + create_exclude_entry)) + for line in lines_to_remove: + all_lines[line] = "" + all_lines[line + 1] = "" + remaining_content = '\n'.join(all_lines) + create_remaining_function_decl(data, remaining_content, file) + except MisplacedTagException as e: + print(f"{e}\nERROR: Misplaced LOBSTER tag " + f"in file {file.name}") + return 1 + + if options.out: + write_to_file(options, data) + else: + lobster_write(sys.stdout, Implementation, "lobster-cpp_raw", + data.values()) + print() + return 0 + + +if __name__ == "__main__": + sys.exit(main()) diff --git a/packages/lobster-metapackage/README.md b/packages/lobster-metapackage/README.md index 2b2038e3..3de27b4c 100644 --- a/packages/lobster-metapackage/README.md +++ b/packages/lobster-metapackage/README.md @@ -11,6 +11,7 @@ LOBSTER packages as a convenience: * [bmw-lobster-core](https://pypi.org/project/bmw-lobster-core) * [bmw-lobster-tool-codebeamer](https://pypi.org/project/bmw-lobster-tool-codebeamer) * [bmw-lobster-tool-cpp](https://pypi.org/project/bmw-lobster-tool-cpp) +* [bmw-lobster-tool-cpp_raw](https://pypi.org/project/bmw-lobster-tool-cpp_raw) * [bmw-lobster-tool-gtest](https://pypi.org/project/bmw-lobster-tool-gtest) * [bmw-lobster-tool-json](https://pypi.org/project/bmw-lobster-tool-json) * [bmw-lobster-tool-python](https://pypi.org/project/bmw-lobster-tool-python) diff --git a/packages/lobster-metapackage/setup.py b/packages/lobster-metapackage/setup.py index ce6f8a78..4494383b 100644 --- a/packages/lobster-metapackage/setup.py +++ b/packages/lobster-metapackage/setup.py @@ -2,7 +2,6 @@ import os import re -import sys import setuptools import glob diff --git a/packages/lobster-monolithic/setup.py b/packages/lobster-monolithic/setup.py index cb71e2fa..09a76e20 100644 --- a/packages/lobster-monolithic/setup.py +++ b/packages/lobster-monolithic/setup.py @@ -2,9 +2,7 @@ import os import re -import sys import setuptools -import glob from lobster import version diff --git a/packages/lobster-tool-codebeamer/setup.py b/packages/lobster-tool-codebeamer/setup.py index 1d55e4d2..c9292c93 100644 --- a/packages/lobster-tool-codebeamer/setup.py +++ b/packages/lobster-tool-codebeamer/setup.py @@ -1,7 +1,6 @@ #!/usr/bin/env python3 import re -import sys import setuptools from lobster import version diff --git a/packages/lobster-tool-cpp/setup.py b/packages/lobster-tool-cpp/setup.py index e386b090..f063f80e 100644 --- a/packages/lobster-tool-cpp/setup.py +++ b/packages/lobster-tool-cpp/setup.py @@ -1,7 +1,6 @@ #!/usr/bin/env python3 import re -import sys import setuptools from lobster import version diff --git a/packages/lobster-tool-cpp_raw/Makefile b/packages/lobster-tool-cpp_raw/Makefile new file mode 100644 index 00000000..4fb8a462 --- /dev/null +++ b/packages/lobster-tool-cpp_raw/Makefile @@ -0,0 +1,5 @@ +package: + rm -rf lobster + mkdir -p lobster/tools + cp -Rv $(LOBSTER_ROOT)/lobster/tools/cpp_raw lobster/tools + @python3 setup.py sdist bdist_wheel diff --git a/packages/lobster-tool-cpp_raw/README.md b/packages/lobster-tool-cpp_raw/README.md new file mode 100644 index 00000000..decc0103 --- /dev/null +++ b/packages/lobster-tool-cpp_raw/README.md @@ -0,0 +1,27 @@ +# LOBSTER + +The **L**ightweight **O**pen **B**MW **S**oftware **T**raceability +**E**vidence **R**eport allows you to demonstrate software traceability +and requirements coverage, which is essential for meeting standards +such as ISO 26262. + +This package contains a tool extract tracing tags from ISO C or C++ +source code. + +This tool searches for tracing tags `lobster-trace` +and extracts the name information of the function occurrence. +To be able to extract the information, the tracing tag has to be +placed in a comment line directly above the function declaration. + +## Tools + +* `lobster-cpp_raw`: Extract requirements from C/C++ code using a + a simple text extracting algorithm and a regex to identify + function declarations. + +## Copyright & License information + +The copyright holder of LOBSTER is the Bayerische Motoren Werke +Aktiengesellschaft (BMW AG), and LOBSTER is published under the [GNU +Affero General Public License, Version +3](https://github.com/bmw-software-engineering/lobster/blob/main/LICENSE.md). diff --git a/packages/lobster-tool-cpp_raw/entrypoints b/packages/lobster-tool-cpp_raw/entrypoints new file mode 100644 index 00000000..cc1a94da --- /dev/null +++ b/packages/lobster-tool-cpp_raw/entrypoints @@ -0,0 +1 @@ +lobster-cpp_raw = lobster.tools.cpp_raw.cpp_raw:main \ No newline at end of file diff --git a/packages/lobster-tool-cpp_raw/requirements b/packages/lobster-tool-cpp_raw/requirements new file mode 100644 index 00000000..e69de29b diff --git a/packages/lobster-tool-cpp_raw/setup.py b/packages/lobster-tool-cpp_raw/setup.py new file mode 100644 index 00000000..717455ee --- /dev/null +++ b/packages/lobster-tool-cpp_raw/setup.py @@ -0,0 +1,71 @@ +#!/usr/bin/env python3 + +import re +import setuptools + +from lobster import version + +gh_root = "https://github.com" +gh_project = "bmw-software-engineering/lobster" + +with open("README.md", "r") as fd: + long_description = fd.read() + +with open("requirements", "r") as fd: + package_requirements = [line + for line in fd.read().splitlines() + if line.strip()] +package_requirements.append("bmw-lobster-core>=%s" % version.LOBSTER_VERSION) +with open("entrypoints", "r") as fd: + entrypoints = [line + for line in fd.read().splitlines() + if line.strip()] + +# For the readme to look right on PyPI we need to translate any +# relative links to absolute links to github. +fixes = [] +for match in re.finditer(r"\[(.*)\]\((.*)\)", long_description): + if not match.group(2).startswith("http"): + fixes.append((match.span(0)[0], match.span(0)[1], + "[%s](%s/%s/blob/main/%s)" % (match.group(1), + gh_root, + gh_project, + match.group(2)))) + +for begin, end, text in reversed(fixes): + long_description = (long_description[:begin] + + text + + long_description[end:]) + +project_urls = { + "Bug Tracker" : "%s/%s/issues" % (gh_root, gh_project), + "Documentation" : "%s/pages/%s/" % (gh_root, gh_project), + "Source Code" : "%s/%s" % (gh_root, gh_project), +} + +setuptools.setup( + name="bmw-lobster-tool-cpp_raw", + version=version.LOBSTER_VERSION, + author="Bayerische Motoren Werke Aktiengesellschaft (BMW AG)", + author_email="philipp.wullstein-kammler@bmw.de", + description="LOBSTER Tool for ISO C/C++", + long_description=long_description, + long_description_content_type="text/markdown", + url=project_urls["Source Code"], + project_urls=project_urls, + license="GNU Affero General Public License v3", + packages=["lobster.tools.cpp_raw"], + install_requires=package_requirements, + python_requires=">=3.7, <4", + classifiers=[ + "Development Status :: 5 - Production/Stable", + "Environment :: Console", + "Intended Audience :: Developers", + "License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)", + "Topic :: Documentation", + "Topic :: Software Development", + ], + entry_points={ + "console_scripts": entrypoints, + }, +) diff --git a/packages/lobster-tool-json/setup.py b/packages/lobster-tool-json/setup.py index 62734202..7ba52010 100644 --- a/packages/lobster-tool-json/setup.py +++ b/packages/lobster-tool-json/setup.py @@ -1,7 +1,6 @@ #!/usr/bin/env python3 import re -import sys import setuptools from lobster import version diff --git a/packages/lobster-tool-python/setup.py b/packages/lobster-tool-python/setup.py index e81b46fe..155e4ce6 100644 --- a/packages/lobster-tool-python/setup.py +++ b/packages/lobster-tool-python/setup.py @@ -1,7 +1,6 @@ #!/usr/bin/env python3 import re -import sys import setuptools from lobster import version diff --git a/packages/lobster-tool-trlc/setup.py b/packages/lobster-tool-trlc/setup.py index 4812ed94..3e34e29b 100644 --- a/packages/lobster-tool-trlc/setup.py +++ b/packages/lobster-tool-trlc/setup.py @@ -1,7 +1,6 @@ #!/usr/bin/env python3 import re -import sys import setuptools from lobster import version diff --git a/test-unit/test_json.py b/test-unit/test_json.py index ddf4d1a8..f77cd305 100644 --- a/test-unit/test_json.py +++ b/test-unit/test_json.py @@ -1,5 +1,4 @@ import unittest -import re from pathlib import PurePosixPath, PureWindowsPath from lobster.tools.json import json From 748fdcd00b3e266325e73f37909f8a3ef67dc941 Mon Sep 17 00:00:00 2001 From: christophkloeffel Date: Wed, 24 Apr 2024 10:37:17 +0200 Subject: [PATCH 2/3] minor review changes --- Pipfile | 17 -- Pipfile.lock | 355 ------------------------ lobster/tools/cpp_raw/cpp_raw.py | 2 +- packages/lobster-tool-cpp_raw/README.md | 5 +- 4 files changed, 4 insertions(+), 375 deletions(-) delete mode 100644 Pipfile delete mode 100644 Pipfile.lock diff --git a/Pipfile b/Pipfile deleted file mode 100644 index 349d0ada..00000000 --- a/Pipfile +++ /dev/null @@ -1,17 +0,0 @@ -[[source]] -url = "https://pypi.org/simple" -verify_ssl = true -name = "pypi" - -[packages] -trlc = "*" -libcst = "*" -requests = "*" - -[dev-packages] -setuptools = "*" -pycodestyle = "*" -pylint = "*" - -[requires] -python_version = "3.12" diff --git a/Pipfile.lock b/Pipfile.lock deleted file mode 100644 index 08c833f9..00000000 --- a/Pipfile.lock +++ /dev/null @@ -1,355 +0,0 @@ -{ - "_meta": { - "hash": { - "sha256": "77173743c2a74dafb5aab75d47e6b9b588bc333f339ac04a15bc1e3a4104c0ab" - }, - "pipfile-spec": 6, - "requires": { - "python_version": "3.12" - }, - "sources": [ - { - "name": "pypi", - "url": "https://pypi.org/simple", - "verify_ssl": true - } - ] - }, - "default": { - "certifi": { - "hashes": [ - "sha256:0569859f95fc761b18b45ef421b1290a0f65f147e92a1e5eb3e635f9a5e4e66f", - "sha256:dc383c07b76109f368f6106eee2b593b04a011ea4d55f652c6ca24a754d1cdd1" - ], - "markers": "python_version >= '3.6'", - "version": "==2024.2.2" - }, - "charset-normalizer": { - "hashes": [ - "sha256:06435b539f889b1f6f4ac1758871aae42dc3a8c0e24ac9e60c2384973ad73027", - "sha256:06a81e93cd441c56a9b65d8e1d043daeb97a3d0856d177d5c90ba85acb3db087", - "sha256:0a55554a2fa0d408816b3b5cedf0045f4b8e1a6065aec45849de2d6f3f8e9786", - "sha256:0b2b64d2bb6d3fb9112bafa732def486049e63de9618b5843bcdd081d8144cd8", - "sha256:10955842570876604d404661fbccbc9c7e684caf432c09c715ec38fbae45ae09", - "sha256:122c7fa62b130ed55f8f285bfd56d5f4b4a5b503609d181f9ad85e55c89f4185", - "sha256:1ceae2f17a9c33cb48e3263960dc5fc8005351ee19db217e9b1bb15d28c02574", - "sha256:1d3193f4a680c64b4b6a9115943538edb896edc190f0b222e73761716519268e", - "sha256:1f79682fbe303db92bc2b1136016a38a42e835d932bab5b3b1bfcfbf0640e519", - "sha256:2127566c664442652f024c837091890cb1942c30937add288223dc895793f898", - "sha256:22afcb9f253dac0696b5a4be4a1c0f8762f8239e21b99680099abd9b2b1b2269", - "sha256:25baf083bf6f6b341f4121c2f3c548875ee6f5339300e08be3f2b2ba1721cdd3", - "sha256:2e81c7b9c8979ce92ed306c249d46894776a909505d8f5a4ba55b14206e3222f", - "sha256:3287761bc4ee9e33561a7e058c72ac0938c4f57fe49a09eae428fd88aafe7bb6", - "sha256:34d1c8da1e78d2e001f363791c98a272bb734000fcef47a491c1e3b0505657a8", - "sha256:37e55c8e51c236f95b033f6fb391d7d7970ba5fe7ff453dad675e88cf303377a", - "sha256:3d47fa203a7bd9c5b6cee4736ee84ca03b8ef23193c0d1ca99b5089f72645c73", - "sha256:3e4d1f6587322d2788836a99c69062fbb091331ec940e02d12d179c1d53e25fc", - "sha256:42cb296636fcc8b0644486d15c12376cb9fa75443e00fb25de0b8602e64c1714", - "sha256:45485e01ff4d3630ec0d9617310448a8702f70e9c01906b0d0118bdf9d124cf2", - "sha256:4a78b2b446bd7c934f5dcedc588903fb2f5eec172f3d29e52a9096a43722adfc", - "sha256:4ab2fe47fae9e0f9dee8c04187ce5d09f48eabe611be8259444906793ab7cbce", - "sha256:4d0d1650369165a14e14e1e47b372cfcb31d6ab44e6e33cb2d4e57265290044d", - "sha256:549a3a73da901d5bc3ce8d24e0600d1fa85524c10287f6004fbab87672bf3e1e", - "sha256:55086ee1064215781fff39a1af09518bc9255b50d6333f2e4c74ca09fac6a8f6", - "sha256:572c3763a264ba47b3cf708a44ce965d98555f618ca42c926a9c1616d8f34269", - "sha256:573f6eac48f4769d667c4442081b1794f52919e7edada77495aaed9236d13a96", - "sha256:5b4c145409bef602a690e7cfad0a15a55c13320ff7a3ad7ca59c13bb8ba4d45d", - "sha256:6463effa3186ea09411d50efc7d85360b38d5f09b870c48e4600f63af490e56a", - "sha256:65f6f63034100ead094b8744b3b97965785388f308a64cf8d7c34f2f2e5be0c4", - "sha256:663946639d296df6a2bb2aa51b60a2454ca1cb29835324c640dafb5ff2131a77", - "sha256:6897af51655e3691ff853668779c7bad41579facacf5fd7253b0133308cf000d", - "sha256:68d1f8a9e9e37c1223b656399be5d6b448dea850bed7d0f87a8311f1ff3dabb0", - "sha256:6ac7ffc7ad6d040517be39eb591cac5ff87416c2537df6ba3cba3bae290c0fed", - "sha256:6b3251890fff30ee142c44144871185dbe13b11bab478a88887a639655be1068", - "sha256:6c4caeef8fa63d06bd437cd4bdcf3ffefe6738fb1b25951440d80dc7df8c03ac", - "sha256:6ef1d82a3af9d3eecdba2321dc1b3c238245d890843e040e41e470ffa64c3e25", - "sha256:753f10e867343b4511128c6ed8c82f7bec3bd026875576dfd88483c5c73b2fd8", - "sha256:7cd13a2e3ddeed6913a65e66e94b51d80a041145a026c27e6bb76c31a853c6ab", - "sha256:7ed9e526742851e8d5cc9e6cf41427dfc6068d4f5a3bb03659444b4cabf6bc26", - "sha256:7f04c839ed0b6b98b1a7501a002144b76c18fb1c1850c8b98d458ac269e26ed2", - "sha256:802fe99cca7457642125a8a88a084cef28ff0cf9407060f7b93dca5aa25480db", - "sha256:80402cd6ee291dcb72644d6eac93785fe2c8b9cb30893c1af5b8fdd753b9d40f", - "sha256:8465322196c8b4d7ab6d1e049e4c5cb460d0394da4a27d23cc242fbf0034b6b5", - "sha256:86216b5cee4b06df986d214f664305142d9c76df9b6512be2738aa72a2048f99", - "sha256:87d1351268731db79e0f8e745d92493ee2841c974128ef629dc518b937d9194c", - "sha256:8bdb58ff7ba23002a4c5808d608e4e6c687175724f54a5dade5fa8c67b604e4d", - "sha256:8c622a5fe39a48f78944a87d4fb8a53ee07344641b0562c540d840748571b811", - "sha256:8d756e44e94489e49571086ef83b2bb8ce311e730092d2c34ca8f7d925cb20aa", - "sha256:8f4a014bc36d3c57402e2977dada34f9c12300af536839dc38c0beab8878f38a", - "sha256:9063e24fdb1e498ab71cb7419e24622516c4a04476b17a2dab57e8baa30d6e03", - "sha256:90d558489962fd4918143277a773316e56c72da56ec7aa3dc3dbbe20fdfed15b", - "sha256:923c0c831b7cfcb071580d3f46c4baf50f174be571576556269530f4bbd79d04", - "sha256:95f2a5796329323b8f0512e09dbb7a1860c46a39da62ecb2324f116fa8fdc85c", - "sha256:96b02a3dc4381e5494fad39be677abcb5e6634bf7b4fa83a6dd3112607547001", - "sha256:9f96df6923e21816da7e0ad3fd47dd8f94b2a5ce594e00677c0013018b813458", - "sha256:a10af20b82360ab00827f916a6058451b723b4e65030c5a18577c8b2de5b3389", - "sha256:a50aebfa173e157099939b17f18600f72f84eed3049e743b68ad15bd69b6bf99", - "sha256:a981a536974bbc7a512cf44ed14938cf01030a99e9b3a06dd59578882f06f985", - "sha256:a9a8e9031d613fd2009c182b69c7b2c1ef8239a0efb1df3f7c8da66d5dd3d537", - "sha256:ae5f4161f18c61806f411a13b0310bea87f987c7d2ecdbdaad0e94eb2e404238", - "sha256:aed38f6e4fb3f5d6bf81bfa990a07806be9d83cf7bacef998ab1a9bd660a581f", - "sha256:b01b88d45a6fcb69667cd6d2f7a9aeb4bf53760d7fc536bf679ec94fe9f3ff3d", - "sha256:b261ccdec7821281dade748d088bb6e9b69e6d15b30652b74cbbac25e280b796", - "sha256:b2b0a0c0517616b6869869f8c581d4eb2dd83a4d79e0ebcb7d373ef9956aeb0a", - "sha256:b4a23f61ce87adf89be746c8a8974fe1c823c891d8f86eb218bb957c924bb143", - "sha256:bd8f7df7d12c2db9fab40bdd87a7c09b1530128315d047a086fa3ae3435cb3a8", - "sha256:beb58fe5cdb101e3a055192ac291b7a21e3b7ef4f67fa1d74e331a7f2124341c", - "sha256:c002b4ffc0be611f0d9da932eb0f704fe2602a9a949d1f738e4c34c75b0863d5", - "sha256:c083af607d2515612056a31f0a8d9e0fcb5876b7bfc0abad3ecd275bc4ebc2d5", - "sha256:c180f51afb394e165eafe4ac2936a14bee3eb10debc9d9e4db8958fe36afe711", - "sha256:c235ebd9baae02f1b77bcea61bce332cb4331dc3617d254df3323aa01ab47bd4", - "sha256:cd70574b12bb8a4d2aaa0094515df2463cb429d8536cfb6c7ce983246983e5a6", - "sha256:d0eccceffcb53201b5bfebb52600a5fb483a20b61da9dbc885f8b103cbe7598c", - "sha256:d965bba47ddeec8cd560687584e88cf699fd28f192ceb452d1d7ee807c5597b7", - "sha256:db364eca23f876da6f9e16c9da0df51aa4f104a972735574842618b8c6d999d4", - "sha256:ddbb2551d7e0102e7252db79ba445cdab71b26640817ab1e3e3648dad515003b", - "sha256:deb6be0ac38ece9ba87dea880e438f25ca3eddfac8b002a2ec3d9183a454e8ae", - "sha256:e06ed3eb3218bc64786f7db41917d4e686cc4856944f53d5bdf83a6884432e12", - "sha256:e27ad930a842b4c5eb8ac0016b0a54f5aebbe679340c26101df33424142c143c", - "sha256:e537484df0d8f426ce2afb2d0f8e1c3d0b114b83f8850e5f2fbea0e797bd82ae", - "sha256:eb00ed941194665c332bf8e078baf037d6c35d7c4f3102ea2d4f16ca94a26dc8", - "sha256:eb6904c354526e758fda7167b33005998fb68c46fbc10e013ca97f21ca5c8887", - "sha256:eb8821e09e916165e160797a6c17edda0679379a4be5c716c260e836e122f54b", - "sha256:efcb3f6676480691518c177e3b465bcddf57cea040302f9f4e6e191af91174d4", - "sha256:f27273b60488abe721a075bcca6d7f3964f9f6f067c8c4c605743023d7d3944f", - "sha256:f30c3cb33b24454a82faecaf01b19c18562b1e89558fb6c56de4d9118a032fd5", - "sha256:fb69256e180cb6c8a894fee62b3afebae785babc1ee98b81cdf68bbca1987f33", - "sha256:fd1abc0d89e30cc4e02e4064dc67fcc51bd941eb395c502aac3ec19fab46b519", - "sha256:ff8fa367d09b717b2a17a052544193ad76cd49979c805768879cb63d9ca50561" - ], - "markers": "python_full_version >= '3.7.0'", - "version": "==3.3.2" - }, - "idna": { - "hashes": [ - "sha256:9ecdbbd083b06798ae1e86adcbfe8ab1479cf864e4ee30fe4e46a003d12491ca", - "sha256:c05567e9c24a6b9faaa835c4821bad0590fbb9d5779e7caa6e1cc4978e7eb24f" - ], - "markers": "python_version >= '3.5'", - "version": "==3.6" - }, - "libcst": { - "hashes": [ - "sha256:0cb92398236566f0b73a0c73f8a41a9c4906c793e8f7c2745f30e3fb141a34b5", - "sha256:13ca9fe82326d82feb2c7b0f5a320ce7ed0d707c32919dd36e1f40792459bf6f", - "sha256:1b5fecb2b26fa3c1efe6e05ef1420522bd31bb4dae239e4c41fdf3ddbd853aeb", - "sha256:1d45718f7e7a1405a16fd8e7fc75c365120001b6928bfa3c4112f7e533990b9a", - "sha256:2bbb4e442224da46b59a248d7d632ed335eae023a921dea1f5c72d2a059f6be9", - "sha256:38fbd56f885e1f77383a6d1d798a917ffbc6d28dc6b1271eddbf8511c194213e", - "sha256:3c7c0edfe3b878d64877671261c7b3ffe9d23181774bfad5d8fcbdbbbde9f064", - "sha256:4973a9d509cf1a59e07fac55a98f70bc4fd35e09781dffb3ec93ee32fc0de7af", - "sha256:5c0d548d92c6704bb07ce35d78c0e054cdff365def0645c1b57c856c8e112bb4", - "sha256:5e54389abdea995b39ee96ad736ed1b0b8402ed30a7956b7a279c10baf0c0294", - "sha256:6dd388c74c04434b41e3b25fc4a0fafa3e6abf91f97181df55e8f8327fd903cc", - "sha256:71dd69fff76e7edaf8fae0f63ffcdbf5016e8cd83165b1d0688d6856aa48186a", - "sha256:7f4919978c2b395079b64d8a654357854767adbabab13998b39c1f0bc67da8a7", - "sha256:82373a35711a8bb2a664dba2b7aeb20bbcce92a4db40af964e9cb2b976f989e7", - "sha256:8b56130f18aca9a98b3bcaf5962b2b26c2dcdd6d5132decf3f0b0b635f4403ba", - "sha256:968b93400e66e6711a29793291365e312d206dbafd3fc80219cfa717f0f01ad5", - "sha256:b4066dcadf92b183706f81ae0b4342e7624fc1d9c5ca2bf2b44066cb74bf863f", - "sha256:ba24b8cf789db6b87c6e23a6c6365f5f73cb7306d929397581d5680149e9990c", - "sha256:c0149d24a455536ff2e41b3a48b16d3ebb245e28035013c91bd868def16592a0", - "sha256:c80f36f4a02d530e28eac7073aabdea7c6795fc820773a02224021d79d164e8b", - "sha256:dded0e4f2e18150c4b07fedd7ef84a9abc7f9bd2d47cc1c485248ee1ec58e5cc", - "sha256:dece0362540abfc39cd2cf5c98cde238b35fd74a1b0167e2563e4b8bb5f47489", - "sha256:e01879aa8cd478bb8b1e4285cfd0607e64047116f7ab52bc2a787cde584cd686", - "sha256:f080e9af843ff609f8f35fc7275c8bf08b02c31115e7cd5b77ca3b6a56c75096", - "sha256:f2342634f6c61fc9076dc0baf21e9cf5ef0195a06e1e95c0c9dc583ba3a30d00" - ], - "index": "pypi", - "markers": "python_version >= '3.9'", - "version": "==1.2.0" - }, - "mypy-extensions": { - "hashes": [ - "sha256:4392f6c0eb8a5668a69e23d168ffa70f0be9ccfd32b5cc2d26a34ae5b844552d", - "sha256:75dbf8955dc00442a438fc4d0666508a9a97b6bd41aa2f0ffe9d2f2725af0782" - ], - "markers": "python_version >= '3.5'", - "version": "==1.0.0" - }, - "pyvcg": { - "hashes": [ - "sha256:cf0ddec9a80f5880836bfe93214641e83fedf279311ad6182bb85b726d896e47", - "sha256:eaa7c054c3fae21706855aa314761f139080661c63fa9712c48340c563513199" - ], - "markers": "python_version >= '3.8'", - "version": "==1.0.6" - }, - "pyyaml": { - "hashes": [ - "sha256:04ac92ad1925b2cff1db0cfebffb6ffc43457495c9b3c39d3fcae417d7125dc5", - "sha256:062582fca9fabdd2c8b54a3ef1c978d786e0f6b3a1510e0ac93ef59e0ddae2bc", - "sha256:0d3304d8c0adc42be59c5f8a4d9e3d7379e6955ad754aa9d6ab7a398b59dd1df", - "sha256:1635fd110e8d85d55237ab316b5b011de701ea0f29d07611174a1b42f1444741", - "sha256:184c5108a2aca3c5b3d3bf9395d50893a7ab82a38004c8f61c258d4428e80206", - "sha256:18aeb1bf9a78867dc38b259769503436b7c72f7a1f1f4c93ff9a17de54319b27", - "sha256:1d4c7e777c441b20e32f52bd377e0c409713e8bb1386e1099c2415f26e479595", - "sha256:1e2722cc9fbb45d9b87631ac70924c11d3a401b2d7f410cc0e3bbf249f2dca62", - "sha256:1fe35611261b29bd1de0070f0b2f47cb6ff71fa6595c077e42bd0c419fa27b98", - "sha256:28c119d996beec18c05208a8bd78cbe4007878c6dd15091efb73a30e90539696", - "sha256:326c013efe8048858a6d312ddd31d56e468118ad4cdeda36c719bf5bb6192290", - "sha256:40df9b996c2b73138957fe23a16a4f0ba614f4c0efce1e9406a184b6d07fa3a9", - "sha256:42f8152b8dbc4fe7d96729ec2b99c7097d656dc1213a3229ca5383f973a5ed6d", - "sha256:49a183be227561de579b4a36efbb21b3eab9651dd81b1858589f796549873dd6", - "sha256:4fb147e7a67ef577a588a0e2c17b6db51dda102c71de36f8549b6816a96e1867", - "sha256:50550eb667afee136e9a77d6dc71ae76a44df8b3e51e41b77f6de2932bfe0f47", - "sha256:510c9deebc5c0225e8c96813043e62b680ba2f9c50a08d3724c7f28a747d1486", - "sha256:5773183b6446b2c99bb77e77595dd486303b4faab2b086e7b17bc6bef28865f6", - "sha256:596106435fa6ad000c2991a98fa58eeb8656ef2325d7e158344fb33864ed87e3", - "sha256:6965a7bc3cf88e5a1c3bd2e0b5c22f8d677dc88a455344035f03399034eb3007", - "sha256:69b023b2b4daa7548bcfbd4aa3da05b3a74b772db9e23b982788168117739938", - "sha256:6c22bec3fbe2524cde73d7ada88f6566758a8f7227bfbf93a408a9d86bcc12a0", - "sha256:704219a11b772aea0d8ecd7058d0082713c3562b4e271b849ad7dc4a5c90c13c", - "sha256:7e07cbde391ba96ab58e532ff4803f79c4129397514e1413a7dc761ccd755735", - "sha256:81e0b275a9ecc9c0c0c07b4b90ba548307583c125f54d5b6946cfee6360c733d", - "sha256:855fb52b0dc35af121542a76b9a84f8d1cd886ea97c84703eaa6d88e37a2ad28", - "sha256:8d4e9c88387b0f5c7d5f281e55304de64cf7f9c0021a3525bd3b1c542da3b0e4", - "sha256:9046c58c4395dff28dd494285c82ba00b546adfc7ef001486fbf0324bc174fba", - "sha256:9eb6caa9a297fc2c2fb8862bc5370d0303ddba53ba97e71f08023b6cd73d16a8", - "sha256:a08c6f0fe150303c1c6b71ebcd7213c2858041a7e01975da3a99aed1e7a378ef", - "sha256:a0cd17c15d3bb3fa06978b4e8958dcdc6e0174ccea823003a106c7d4d7899ac5", - "sha256:afd7e57eddb1a54f0f1a974bc4391af8bcce0b444685d936840f125cf046d5bd", - "sha256:b1275ad35a5d18c62a7220633c913e1b42d44b46ee12554e5fd39c70a243d6a3", - "sha256:b786eecbdf8499b9ca1d697215862083bd6d2a99965554781d0d8d1ad31e13a0", - "sha256:ba336e390cd8e4d1739f42dfe9bb83a3cc2e80f567d8805e11b46f4a943f5515", - "sha256:baa90d3f661d43131ca170712d903e6295d1f7a0f595074f151c0aed377c9b9c", - "sha256:bc1bf2925a1ecd43da378f4db9e4f799775d6367bdb94671027b73b393a7c42c", - "sha256:bd4af7373a854424dabd882decdc5579653d7868b8fb26dc7d0e99f823aa5924", - "sha256:bf07ee2fef7014951eeb99f56f39c9bb4af143d8aa3c21b1677805985307da34", - "sha256:bfdf460b1736c775f2ba9f6a92bca30bc2095067b8a9d77876d1fad6cc3b4a43", - "sha256:c8098ddcc2a85b61647b2590f825f3db38891662cfc2fc776415143f599bb859", - "sha256:d2b04aac4d386b172d5b9692e2d2da8de7bfb6c387fa4f801fbf6fb2e6ba4673", - "sha256:d483d2cdf104e7c9fa60c544d92981f12ad66a457afae824d146093b8c294c54", - "sha256:d858aa552c999bc8a8d57426ed01e40bef403cd8ccdd0fc5f6f04a00414cac2a", - "sha256:e7d73685e87afe9f3b36c799222440d6cf362062f78be1013661b00c5c6f678b", - "sha256:f003ed9ad21d6a4713f0a9b5a7a0a79e08dd0f221aff4525a2be4c346ee60aab", - "sha256:f22ac1c3cac4dbc50079e965eba2c1058622631e526bd9afd45fedd49ba781fa", - "sha256:faca3bdcf85b2fc05d06ff3fbc1f83e1391b3e724afa3feba7d13eeab355484c", - "sha256:fca0e3a251908a499833aa292323f32437106001d436eca0e6e7833256674585", - "sha256:fd1592b3fdf65fff2ad0004b5e363300ef59ced41c2e6b3a99d4089fa8c5435d", - "sha256:fd66fc5d0da6d9815ba2cebeb4205f95818ff4b79c3ebe268e75d961704af52f" - ], - "markers": "python_version >= '3.6'", - "version": "==6.0.1" - }, - "requests": { - "hashes": [ - "sha256:58cd2187c01e70e6e26505bca751777aa9f2ee0b7f4300988b709f44e013003f", - "sha256:942c5a758f98d790eaed1a29cb6eefc7ffb0d1cf7af05c3d2791656dbd6ad1e1" - ], - "index": "pypi", - "markers": "python_version >= '3.7'", - "version": "==2.31.0" - }, - "trlc": { - "hashes": [ - "sha256:ac76cba6850a8d96a725177fd94e4b58668a5c8330ec9ea7d01ab3a6fd37a0be", - "sha256:b2b4c408c873f7209d3189cf41feada5d909c300ee11fe7e7fff1b70fbbc6446" - ], - "index": "pypi", - "markers": "python_version >= '3.8' and python_version < '4'", - "version": "==1.2.2" - }, - "typing-extensions": { - "hashes": [ - "sha256:69b1a937c3a517342112fb4c6df7e72fc39a38e7891a5730ed4985b5214b5475", - "sha256:b0abd7c89e8fb96f98db18d86106ff1d90ab692004eb746cf6eda2682f91b3cb" - ], - "markers": "python_version >= '3.8'", - "version": "==4.10.0" - }, - "typing-inspect": { - "hashes": [ - "sha256:9ee6fc59062311ef8547596ab6b955e1b8aa46242d854bfc78f4f6b0eff35f9f", - "sha256:b23fc42ff6f6ef6954e4852c1fb512cdd18dbea03134f91f856a95ccc9461f78" - ], - "version": "==0.9.0" - }, - "urllib3": { - "hashes": [ - "sha256:450b20ec296a467077128bff42b73080516e71b56ff59a60a02bef2232c4fa9d", - "sha256:d0570876c61ab9e520d776c38acbbb5b05a776d3f9ff98a5c8fd5162a444cf19" - ], - "markers": "python_version >= '3.8'", - "version": "==2.2.1" - } - }, - "develop": { - "astroid": { - "hashes": [ - "sha256:951798f922990137ac090c53af473db7ab4e70c770e6d7fae0cec59f74411819", - "sha256:ac248253bfa4bd924a0de213707e7ebeeb3138abeb48d798784ead1e56d419d4" - ], - "markers": "python_full_version >= '3.8.0'", - "version": "==3.1.0" - }, - "dill": { - "hashes": [ - "sha256:3ebe3c479ad625c4553aca177444d89b486b1d84982eeacded644afc0cf797ca", - "sha256:c36ca9ffb54365bdd2f8eb3eff7d2a21237f8452b57ace88b1ac615b7e815bd7" - ], - "markers": "python_version >= '3.11'", - "version": "==0.3.8" - }, - "isort": { - "hashes": [ - "sha256:48fdfcb9face5d58a4f6dde2e72a1fb8dcaf8ab26f95ab49fab84c2ddefb0109", - "sha256:8ca5e72a8d85860d5a3fa69b8745237f2939afe12dbf656afbcb47fe72d947a6" - ], - "markers": "python_full_version >= '3.8.0'", - "version": "==5.13.2" - }, - "mccabe": { - "hashes": [ - "sha256:348e0240c33b60bbdf4e523192ef919f28cb2c3d7d5c7794f74009290f236325", - "sha256:6c2d30ab6be0e4a46919781807b4f0d834ebdd6c6e3dca0bda5a15f863427b6e" - ], - "markers": "python_version >= '3.6'", - "version": "==0.7.0" - }, - "platformdirs": { - "hashes": [ - "sha256:0614df2a2f37e1a662acbd8e2b25b92ccf8632929bc6d43467e17fe89c75e068", - "sha256:ef0cc731df711022c174543cb70a9b5bd22e5a9337c8624ef2c2ceb8ddad8768" - ], - "markers": "python_version >= '3.8'", - "version": "==4.2.0" - }, - "pycodestyle": { - "hashes": [ - "sha256:41ba0e7afc9752dfb53ced5489e89f8186be00e599e712660695b7a75ff2663f", - "sha256:44fe31000b2d866f2e41841b18528a505fbd7fef9017b04eff4e2648a0fadc67" - ], - "index": "pypi", - "markers": "python_version >= '3.8'", - "version": "==2.11.1" - }, - "pylint": { - "hashes": [ - "sha256:507a5b60953874766d8a366e8e8c7af63e058b26345cfcb5f91f89d987fd6b74", - "sha256:6a69beb4a6f63debebaab0a3477ecd0f559aa726af4954fc948c51f7a2549e23" - ], - "index": "pypi", - "markers": "python_full_version >= '3.8.0'", - "version": "==3.1.0" - }, - "setuptools": { - "hashes": [ - "sha256:02fa291a0471b3a18b2b2481ed902af520c69e8ae0919c13da936542754b4c56", - "sha256:5c0806c7d9af348e6dd3777b4f4dbb42c7ad85b190104837488eab9a7c945cf8" - ], - "index": "pypi", - "markers": "python_version >= '3.8'", - "version": "==69.1.1" - }, - "tomlkit": { - "hashes": [ - "sha256:75baf5012d06501f07bee5bf8e801b9f343e7aac5a92581f20f80ce632e6b5a4", - "sha256:b0a645a9156dc7cb5d3a1f0d4bab66db287fcb8e0430bdd4664a095ea16414ba" - ], - "markers": "python_version >= '3.7'", - "version": "==0.12.3" - } - } -} diff --git a/lobster/tools/cpp_raw/cpp_raw.py b/lobster/tools/cpp_raw/cpp_raw.py index 0d2804a0..a835be7c 100755 --- a/lobster/tools/cpp_raw/cpp_raw.py +++ b/lobster/tools/cpp_raw/cpp_raw.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 # # lobster_cpp_raw - Extract C/C++ tracing tags for LOBSTER -# Copyright (C) 2023 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) +# Copyright (C) 2024 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as diff --git a/packages/lobster-tool-cpp_raw/README.md b/packages/lobster-tool-cpp_raw/README.md index decc0103..091697ff 100644 --- a/packages/lobster-tool-cpp_raw/README.md +++ b/packages/lobster-tool-cpp_raw/README.md @@ -15,9 +15,10 @@ placed in a comment line directly above the function declaration. ## Tools -* `lobster-cpp_raw`: Extract requirements from C/C++ code using a +* `lobster-cpp_raw`: Extract requirements from C/C++ code using a simple text extracting algorithm and a regex to identify - function declarations. + function declarations. Use this tool if you are not able to + provide the clang tidy version needed for the superior `lobster-cpp` tool. ## Copyright & License information From aa302880b416a14ef16ba9549bb854a223c10776 Mon Sep 17 00:00:00 2001 From: christophkloeffel Date: Fri, 14 Jun 2024 10:41:25 +0200 Subject: [PATCH 3/3] adds functionality to parse a list of traces --- lobster/tools/core/online_report.py | 1 + lobster/tools/cpp_raw/cpp_raw.py | 16 +++++++++------- lobster/tools/trlc/trlc.py | 1 + 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/lobster/tools/core/online_report.py b/lobster/tools/core/online_report.py index 0b6afdd0..24ce9dca 100755 --- a/lobster/tools/core/online_report.py +++ b/lobster/tools/core/online_report.py @@ -122,6 +122,7 @@ def main(): rel_path_from_root = os.path.relpath(item.location.filename, repo_root) + # pylint: disable=possibly-used-before-assignment actual_repo = gh_root actual_sha = options.commit actual_path = rel_path_from_root diff --git a/lobster/tools/cpp_raw/cpp_raw.py b/lobster/tools/cpp_raw/cpp_raw.py index a835be7c..de2f3511 100755 --- a/lobster/tools/cpp_raw/cpp_raw.py +++ b/lobster/tools/cpp_raw/cpp_raw.py @@ -83,14 +83,15 @@ def write_to_file(options: Namespace, data: Dict[str, Implementation]) -> None: print("Written output for %u items to %s" % (len(data), options.out)) -def find_lobster_traces(all_lines: List[str]) -> List[Tuple[re.Match, int]]: +def find_lobster_traces(all_lines: List[str]) -> List[Tuple[List[str], int]]: matches = [] i = 0 while i < len(all_lines): line = all_lines[i] - match = re.search(r'lobster-trace:\s*(\w+\.\w+)', line) + match = re.search(r'lobster-trace:\s*(.*)', line) if match: - matches.append((match, i)) + items = match.group(1).split(',') + matches.append(([item.strip() for item in items], i)) i += 1 return matches @@ -119,7 +120,7 @@ def find_all_function_decl(file_content: str) -> List[Tuple[re.Match, int]]: def create_raw_entry(data: Dict[str, Implementation], file_name: str, name: str, line_number: int) -> Tracing_Tag: - tag = Tracing_Tag("cpp", f"{file_name}::{name}::{line_number}") + tag = Tracing_Tag("cpp", f"{file_name}:{name}:{line_number}") loc = File_Reference(file_name, line_number) data[tag.key()] = Implementation( tag = tag, @@ -130,7 +131,7 @@ def create_raw_entry(data: Dict[str, Implementation], file_name: str, return tag -def create_entry(match: Tuple[re.Match, int], +def create_entry(match: Tuple[List[str], int], data: Dict[str, Implementation], all_lines: List[str], file: TextIOWrapper, tag_type: str) -> Tracing_Tag: @@ -144,11 +145,12 @@ def create_entry(match: Tuple[re.Match, int], return create_raw_entry(data, file.name, name, function_line + 1) -def create_trace_entry(match: Tuple[re.Match, int], +def create_trace_entry(match: Tuple[List[str], int], data: Dict[str, Implementation], all_lines: List[str], file: TextIOWrapper) -> None: tag = create_entry(match, data, all_lines, file, "lobster-trace") - data[tag.key()].add_tracing_target(Tracing_Tag("req", match[0].group(1))) + for req in match[0]: + data[tag.key()].add_tracing_target(Tracing_Tag("req", req)) def create_exclude_entry(match: Tuple[re.Match, int], diff --git a/lobster/tools/trlc/trlc.py b/lobster/tools/trlc/trlc.py index ef9905c2..801a411c 100644 --- a/lobster/tools/trlc/trlc.py +++ b/lobster/tools/trlc/trlc.py @@ -410,6 +410,7 @@ def main(): ok = False if ok: stab = sm.process() + # pylint: disable=possibly-used-before-assignment if not ok or stab is None: print("lobster-trlc: aborting due to earlier error") return 1