Skip to main content

Inspektor

Inspektor is a program used to verify the code of your python project. It evolved from a set of scripts used to check patches and code of python projects of the autotest organization [1]. As the project grew and new modules started to be developed, we noticed the same scripts had to be copied to each new project repo, creating a massive headache when we needed to update said scripts.

Inspektor knows how to:

  1. Check code with the help of pylint.

  2. Check indentation of your code with the help of pycodestyle, correcting it if you so deem appropriate.

  3. Check whether your code is PEP8 compliant, correcting it if necessary (only works if you have autopep8 installed) if you so deem appropriate.

  4. If your project is hosted on the autotest github area, it can apply pull requests made against it, and check if it introduced any regression from the metrics outlined above.

This all assumes you’re working on a version control checkout of your code. Currently inspektor knows how to handle subversion and git.

Installing inspektor

You can get inspektor through pip:

$ sudo pip install inspektor

But you should avoid doing that if possible. A virtual environment deployment tends to be better, since each installation is restricted to each environment:

$ virtualenv .venv
$ source .venv/bin/activate
$ pip install inspektor

If you are developing inspektor, you can install it in your virtual environment as an editable package. From this source code tree root:

$ pip install -e .

Usage

  1. Go to the root of your project source code clone

  2. If you want to check code with pylint:

inspekt lint
  1. If you want to check indentation:

inspekt indent
  1. If you want to check compliance to the PEP8:

inspekt style
  1. If you want to check PR #123 for a project inside the autotest github area:

inspekt github 123

[1] http://autotest.github.io/

Release files for inspektor 0.5.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for inspektor 0.5.3
File Size Uploaded
inspektor-0.5.3.tar.gz 27.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for inspektor 0.5.3
File Interpreter ABI Platform
inspektor-0.5.3-py3-none-any.whl Python 3 none any Details

Total release size: 67.7 kB

Release files / inspektor-0.5.3.tar.gz

Download URL inspektor-0.5.3.tar.gz
Size 27.0 kB
Tags Source
SHA-256 checksum
How to use checksums
17f622a1516826cec0a3c6a3e514cace6ff30e31c1b9482fb78be34ad26ac3da
BLAKE2b-256 checksum
How to use checksums
b5e73a54e5b1f7bd978977e3ddd63325469d271bd103fd3e008d150d3a3c9f86
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.6.0 importlib_metadata/4.6.3 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.1 CPython/3.10.0

Release files / inspektor-0.5.3-py3-none-any.whl

Download URL inspektor-0.5.3-py3-none-any.whl
Size 40.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
692463793de6ade8f1f958272230800e7ea85ec671afb524dbf87bfa22df2150
BLAKE2b-256 checksum
How to use checksums
334cee331b61f0602f1ebd0f972291dc27daf51f0d987fbf97ad8568e8ab9dfe
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.6.0 importlib_metadata/4.6.3 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.1 CPython/3.10.0

Release history Release notifications | RSS feed

This release

0.5.3 This release

2 release files

0.5.2

1 release file

0.5.1

1 release file

0.5.0

1 release file

0.4.5

1 release file

0.4.0

1 release file

0.3.0

1 release file

0.2.2

1 release file

0.2.1

1 release file

0.2.0

1 release file

0.1.19

1 release file

0.1.18

1 release file

0.1.16

1 release file

0.1.15

1 release file

0.1.14

1 release file

0.1.13

1 release file

0.1.12

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page