Skip to main content

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 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bmw_lobster_tool_python-0.9.18.tar.gz (8.0 kB view details)

Uploaded Source

Built Distribution

bmw_lobster_tool_python-0.9.18-py3-none-any.whl (8.0 kB view details)

Uploaded Python 3

File details

Details for the file bmw_lobster_tool_python-0.9.18.tar.gz.

File metadata

File hashes

Hashes for bmw_lobster_tool_python-0.9.18.tar.gz
Algorithm Hash digest
SHA256 ae32f21e013d8767184d726aa395c3ec1da6748f9e82ddd6698396527da3c20d
MD5 4037d6f3fb66138670a3341aa7567378
BLAKE2b-256 180033938955f02b7faf43c2c61c62838f4245b1eb3f32167d4539f6602a1185

See more details on using hashes here.

Provenance

File details

Details for the file bmw_lobster_tool_python-0.9.18-py3-none-any.whl.

File metadata

File hashes

Hashes for bmw_lobster_tool_python-0.9.18-py3-none-any.whl
Algorithm Hash digest
SHA256 9dcf37da5bdb3721796599e05c958e621a62d89244a22a00d153f4c27b9e7056
MD5 a8adcedee39ef038e00f02ae6e50624e
BLAKE2b-256 dc4e4d50dd5b0a9a628c3c3771d9e3d4e86a03e4d571eb4dd08c36bbac9bea3d

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page