LOBSTER Tool for Python3
Project description
LOBSTER
The Lightweight Open BMW Software Traceability Evidence Report allows you to demonstrate software traceability and requirements coverage, which is essential for meeting standards such as ISO 26262.
This package contains a tool to extract tracing tags from Python3 source code.
Tools
lobster-python
: Extract requirements from Python3 code
Usage
This tool supports both Python code and PyUnit/unittest unit tests.
For either code or tests you can embedd tracing tags like this:
def potato(self):
# lobster-trace: something.example
return "potato"
You can add justifications as well:
def potato(self):
# lobster-exclude: a very good reason is here
return "potato"
For classes, you have a choice on how you trace them: you either annotate the class itself, or each individual method. If you choose to annotate the class itself, then you will get warnings for each method with an annotation.
For normal code the usage is:
lobster-python FILES_OR_DIRS
Note that FILES_OR_DIRS
should not contain any tests.
They will be treated as regular code otherwise.
For tests (pyunit
or unittest
) the usage is:
lobster-python --activity FILES_OR_DIRS
Here FILES_OR_DIRS
may contain additional code (like the implementation of mock classes), but it will be ignored.
For pyunit
and unittest
the tool automatically ignores any class function that is
not explicitly a test (i.e. you don't need to manually exclude your
setup or tear down code, only individual tests will be included).
Please note that the generated output json files always use PyTest
as framework indicator, even if unittest
is used:
{
"framework": "PyUnit",
"kind": "Test"
}
Known Issues
The resulting lobster file does not use the method names, but instead uses the class name together with an integer counter for consecutive methods. This only affects methods in a class. It does not affect functions. For details see issue 89. It will be fixed with the next release.
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
File details
Details for the file bmw_lobster_tool_python-0.9.19-py3-none-any.whl
.
File metadata
- Download URL: bmw_lobster_tool_python-0.9.19-py3-none-any.whl
- Upload date:
- Size: 8.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d234480c421be562ce63125094744532e25f86a656aebb00458b0b525748f86b |
|
MD5 | 14cc17619a67544aa0fea11b555d1f0a |
|
BLAKE2b-256 | 8d12cc3ec759fa7c43e00453baff68431595a5827bee98d822012884154ff78d |
Provenance
The following attestation bundles were made for bmw_lobster_tool_python-0.9.19-py3-none-any.whl
:
Publisher:
package.yml
on bmw-software-engineering/lobster
-
Statement type:
https://in-toto.io/Statement/v1
- Predicate type:
https://docs.pypi.org/attestations/publish/v1
- Subject name:
bmw_lobster_tool_python-0.9.19-py3-none-any.whl
- Subject digest:
d234480c421be562ce63125094744532e25f86a656aebb00458b0b525748f86b
- Sigstore transparency entry: 148098434
- Sigstore integration time:
- Predicate type: