Skip to main content
Archived

This project has been archived by its maintainers, and is no longer receiving any updates.

Statick Planning Plugins

Unit Tests PyPI version Codecov Python Versions License Checked with mypy Daily Downloads Weekly Downloads Monthly Downloads

This is a set of plugins for Statick that will discover planning files and perform static analysis on those files.

The current plugins will discover planning files in a project and can be configured to check those files using Validate. Custom exceptions can be applied the same way they are with Statick exceptions.

Deprecated

This set of plugins was merged into the main [Statick] repository and Python package. All future development will happen in that repository.

Installation

The recommended method to install these Statick plugins is via pip:

python3 -m pip install statick-planning

You can also clone the repository and use it locally.

The Validate tool has compilation instructions on their Github repository. The way this tool has been used and tested with Statick is by obtaining the binaries via zip file and putting the binaries at /opt/val/. The important part is to get the path to the Validate binary. In our typical setup this binary is at /opt/val/bin/Validate. If you have that binary in a different location you will have to update the commands in the rest of this documentation. An example of where to obtain the zip file is https://dev.azure.com/schlumberger/4e6bcb11-cd68-40fe-98a2-e3777bfec0a6/_apis/build/builds/52/artifacts?artifactName=linux64&api-version=6.0&%24format=zip.

Usage

Pip Install

The most common usage is to use statick and statick-planning from pip. In that case your directory structure will look like the following:

  • project
  • output

To run with the default configuration for the statick-planning tools use:

statick project/ --output-directory output/ --profile planning-profile.yaml --validate-bin /opt/val/bin/Validate

Pip Install and Custom Configuration

At times you will want to have a custom Statick configuration. Typically, this is to run a different set of tools than used in the default profile, or to add exceptions. For this case you will have to add the new Statick configuration somewhere. This example will have custom exceptions in the project, such that the directory structure is:

  • project
    • statick-config
      • rsc
        • exceptions.yaml
  • output

For this setup you will run the following:

statick project/ --output-directory output/ --user-paths project/statick-config/ --profile planning-profile.yaml --config planning-config.yaml --val-validate-bin /opt/val/bin/Validate <!-- markdownlint-disable MD013 -->

Source Install and Custom Configuration

Another setup will be to have all the tools available from cloning repositories, not installing from pip. The directory structure will look like:

  • /home/user
    • package
    • output
    • statick
    • statick-planning

Using the example where we want to override the default exceptions with custom ones in the project, the command to run would be:

/home/user/statick/statick /home/user/package --output-directory output --user-paths /home/user/statick-planning/,/home/user/statick-planning/src/statick_planning/ --profile planning-profile.yaml --config planning-config.yaml --validate-bin /opt/val/bin/Validate <!-- markdownlint-disable MD013 -->

Tests and Contributing

If you write a new feature for Statick or are fixing a bug, you are strongly encouraged to add unit tests for your contribution. In particular, it is much easier to test whether a bug is fixed (and identify future regressions) if you can add a small unit test which replicates the bug.

Before submitting a change, please run tox to check that you have not introduced any regressions or violated any code style guidelines.

Mypy

Statick uses mypy to check that type hints are being followed properly. Type hints are described in PEP 484 and allow for static typing in Python. To determine if proper types are being used in Statick plugins the following command will show any errors, and create several types of reports that can be viewed with a text editor or web browser.

python3 -m pip install mypy
mkdir report
mypy --ignore-missing-imports --strict src/

Formatting

Statick code is formatted using black. To fix locally use

python3 -m pip install black
black src

Metadata

Release files for statick-planning 0.4.0

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

Source distribution (sdist)

Source distribution for statick-planning 0.4.0
File Size Uploaded
statick_planning-0.4.0.tar.gz 8.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for statick-planning 0.4.0
File Interpreter ABI Platform
statick_planning-0.4.0-py3-none-any.whl Python 3 none any Details

Total release size: 19.6 kB

Release files / statick_planning-0.4.0.tar.gz

Download URL statick_planning-0.4.0.tar.gz
Size 8.7 kB
Tags Source
SHA-256 checksum
How to use checksums
4d7148cd1fa4e2c31c74fb3cdebc0b52e99f2c8844058fb978c69d396aaab5b2
BLAKE2b-256 checksum
How to use checksums
756c491faa139ccc8bab608052a2a368471e7b7d4220708f00982e22a39ecccc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.8

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Feb 14, 2025.

Transparency log

Release files / statick_planning-0.4.0-py3-none-any.whl

Download URL statick_planning-0.4.0-py3-none-any.whl
Size 10.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
29016d14a831b5402219f460350d802f3843088efd90b2f86bf635748d9591c5
BLAKE2b-256 checksum
How to use checksums
02894ea9e304a666450016a5c43ac71481554fc6d3258accf671d3692a103f56
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.8

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Feb 14, 2025.

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