Skip to main content

Crackerjack code formatting style.

Project description

Crackerjack Python

Python: 3.7 Code style: black Code style: crackerjack

Crackerjack is a python coding style which uses a minimalist approach to produce elegant, easy to read, code.

Why Crackerjack?

Crackerjack works on the theory that with static typing and explicit classes, functions, variables, and other object names - the code should be straight forward to read and the documentation should pretty much be able to write itself. Crackerjack provides a set of guidelines and utilities to keep the codebase clean, elegant, standardized, and easily readable.

What does this package do?

This package:

  • identifies and removes unused dependencies with creosote

  • reformats the code with Black

  • uses autotype to add missing type annotations to the code

  • does import sorting, linting, and complexity analysis with ruff

  • uses mypy for type checking

  • streamlines code with refurb

  • converts/creates documentation in Markdown (md)

  • installs, or updates, a projects pre-commit tools and gitignore to comply with evolving crackerjack standards

  • removes pipenv, poetry, and hatch build, dependency management, and virtual environment management packages and replace them with PDM using PEP 582

  • generates pytest mock stubs if needed

What are the rules?

(...more what you'd call "guidelines" than actual rules. -Captain Barbossa )

  • all docstrings, README's, and other documentation is to be done in Markdown (md)

  • format with black

  • use pathlib.Path - not os.path

  • use dataclasses or pydantic models whenever possible

  • force single line imports

  • use PDM and PEP 582 for dependency management and package building/publishing

  • use pdoc and mkdocs for producing documentation

  • use pytest for testing

  • code is statically typed

Installation

From your projects root directory:

pdm add -d crackerjack

Usage

From your projects root directory:

python -m crackerjack

Cracker jack will take care of the rest.

When you ready to publish your project:

python -m crackerjack -p micro

The -p option not only publishes your project but will bump your project version for you. The options are 'micro', 'minor', and 'major'.

Project details


Release history Release notifications | RSS feed

Download files

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

Source Distribution

crackerjack-0.1.11.tar.gz (8.1 kB view details)

Uploaded Source

Built Distribution

crackerjack-0.1.11-py3-none-any.whl (9.5 kB view details)

Uploaded Python 3

File details

Details for the file crackerjack-0.1.11.tar.gz.

File metadata

  • Download URL: crackerjack-0.1.11.tar.gz
  • Upload date:
  • Size: 8.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: pdm/2.6.1 CPython/3.11.3

File hashes

Hashes for crackerjack-0.1.11.tar.gz
Algorithm Hash digest
SHA256 d17cc78794214283f1c4f8ece0a14f30ee46146fb1392bc07176012bbff6e499
MD5 6ca9bba92b9976b14fe413fa0a51e95e
BLAKE2b-256 ee203a49aef59412d6063e9e9a40b5d0427d0709f67c22f70dd60d5243d2f419

See more details on using hashes here.

File details

Details for the file crackerjack-0.1.11-py3-none-any.whl.

File metadata

File hashes

Hashes for crackerjack-0.1.11-py3-none-any.whl
Algorithm Hash digest
SHA256 3bd1f152da53ecf5805b974894fb83749396220fc38c629e33a9df737e0c2c86
MD5 4c5000b441493d223d400f29f5ad5d39
BLAKE2b-256 453a1dd6958dd30ea753f29c62ee4623ef1556ca9a1d5b494e8f8e500725ff7a

See more details on using hashes here.

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