Skip to main content

InspectorTodo is a Python tool to track the status of todos in a software project, assuming that the project uses an issue tracker, e.g. JIRA.

Project description

About

InspectorTodo is a Python tool to track the status of todos in a software project, assuming that the project uses an issue tracker, e.g. JIRA. In its simplest form it searches for all occurrences of the string TODO and checks whether it is followed by an issue reference that is conform to a given regular expression.

Install and update using pip:

pip install inspectortodo

Then you can run InspectorTodo from the command line,

inspectortodo --help

or invoke its API from your Python code (see example below).

If you installed it in a virtualenv (which is recommended), then you always have to activate the virtualenv first.

Example

The source code of InspectorTodo contains a small example project which can be parsed with the command (assuming you are at project root of InspectorTodo)

inspectortodo ./tests/inspectortodo/project_for_testing "IT-\d+" --version-pattern "Release-\d+" --version 2 --versions 1,2,3

Equivalent example in Python:

import inspectortodo

# The inspect() function takes the same arguments as the CLI
inspectortodo.inspect(root_dir="./tests/inspectortodo/project_for_testing", issue_pattern="IT-\d+", version_pattern="Release-\d+", version="2", versions="1,2,3")

Traversing the folder tree

InspectorTodo currently features two ways of traversing the folder tree of your project: iterating over all files on OS level or iterating over all files under git control. The latter is used when the folder passed to InspectorTodo as root dir is a git root.

Config file

To use advanced features you can use a config file by passing a file path via the --configfile option. If the file does not exist a default config is created which you can adapt afterwards.

If issues are tracked in an issue tracker like JIRA, InspectorTodo can validate whether issues that are referenced in a todo are in an allowed status.

JIRA server

Connection settings for a JIRA server.

Issue filter

A filter (currently tailored to Jira) that will only mark todos as invalid, if a field with name filter_key is present and has at least one of filter_values values as its entry. Can be used, e.g. to show only todos pointing to issues belonging to certain teams (e.g. on branches).

Statuses

A list of allowed statuses in the issue tracker, like "Backlog" or "Todo".

Files

If there are files in the project that should not be parsed (e.g. because they belong to another project), you can configure a list of ignored paths here, relative to the project root. Compare the entries from the example config for details.

Copyright & License

InspectorTodo was conceived, written and executed by Martin Fink, Kai Helbig and Wolfgang Münder.

Licensed under the Apache License, Version 2.0 - see LICENSE.md in project root directory.

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

inspectortodo-1.1.0.tar.gz (16.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

inspectortodo-1.1.0-py3-none-any.whl (21.1 kB view details)

Uploaded Python 3

File details

Details for the file inspectortodo-1.1.0.tar.gz.

File metadata

  • Download URL: inspectortodo-1.1.0.tar.gz
  • Upload date:
  • Size: 16.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.13.1

File hashes

Hashes for inspectortodo-1.1.0.tar.gz
Algorithm Hash digest
SHA256 7d12c305b1025a2c8964e59c0da4aa4bad1af7d95c94d9c8f9393a68ab0a452f
MD5 67a98e3319778a5d561dca2ba817bded
BLAKE2b-256 5ccd8b26b4d9b7c6d5456fdf99d23ae7b3315a03e83508fccfa8c049ebaffdcc

See more details on using hashes here.

File details

Details for the file inspectortodo-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: inspectortodo-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 21.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.13.1

File hashes

Hashes for inspectortodo-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2363360fa5ec353fd8e5fdaf7d4dfe706158983a0c648b8ee6c39c4d107c576d
MD5 d4728cf3b7d7d59ae6ef286e797f63b7
BLAKE2b-256 5a3e5b86e1bdfb91c53f2a93d657ab83df6e2c221e573b2d37142211123d8e05

See more details on using hashes here.

Supported by

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