Skip to content

About

Python module to inspect any type of functional or non-functional requirements

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

2 stars

Watchers

2 watching

Forks

Latest commit

 

History

645 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Quality Gate Status Bugs Code Smells Coverage Duplicated Lines (%) Lines of Code Reliability Rating Security Rating Maintainability Rating Vulnerabilities

Python module to inspect any type of functional or non-functional requirements

This module uses spaCy v3.8.7 to inspect requirements written in English or German. For each requirement a report will be generated with information about the complexity, usage of weak words, usage of non-passive sentences, etc

Prerequisites

This project requires Python 3.13 or 3.14 and uv for dependency management.

Setup Environment

# Install dependencies (including test dependencies)
uv sync --all-groups

How to test and build

This module can be produced using uv:

uv run pre-commit run -a
uv run tox
uv build

How to install

UV project

uv add https://github.com/SchweizerischeBundesbahnen/python-requirements-inspector/releases/download/4.1.0/python_requirements_inspector-4.1.0-py3-none-any.whl

How to use (example)

Inputs are defined in inputs.json

[
  {
    "id": "requirements1",
    "title": "I'm a title without a processword",
    "description":"I'm a description for testing with a weakword accordingly",
    "language":"en"
  },
  {
    "id": "requirements2",
    "title": "Ich bin ein Titel ohne Processwort",
    "description":"öüäß Ich bin eine Beschreibung mit dem Weakword entsprechend und Umlauts.",
    "language":"de"
  }
]

Execute

uv run inspect-requirements path/to/input/json

The main function only accepts input JSON inside the current working directory. For use in automated processes, import WorkitemAnalyzer directly instead.

Outputs will be returned in /tmp/output_*.json

[
  {"id": "requirements1",
    "language": "en",
    "smellDescription": "In TITLE missingProcessword: Title contains no process word\nIn DESCRIPTION Sentence 1 I'm a\u2026 smellWeakword: accordingly [9] \n",
    "smellComplex": 0,
    "smellPassive": 0,
    "smellWeakword": 1,
    "smellComparative": 0,
    "missingProcessword": true
  },
  {
    "id": "requirements2",
    "language": "de",
    "smellDescription": "In TITLE missingProcessword: Title contains no process word\nIn DESCRIPTION Sentence 1 \u00f6\u00fc\u00e4\u00df Ich bin\u2026 smellWeakword: entsprechend [8] \n",
    "smellComplex": 0,
    "smellPassive": 0,
    "smellWeakword": 1,
    "smellComparative": 0,
    "missingProcessword": true
  }
]

About

Python module to inspect any type of functional or non-functional requirements

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

2 stars

Watchers

2 watching

Forks

Releases

Packages

Used by

Contributors

Languages