Skip to main content

Crackerjack code formatting style.

Project description

Crackerjack Python

Python: 3.11 Code style: black Code style: crackerjack Checked with pyright

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

crack·​er·​jack ˈkra-kər-ˌjak : a person or thing of marked excellence

Why Crackerjack?

Crackerjack works on the theory that with static typing and explicit class, function, variable, 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

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

  • uses pyright for type checking

  • streamlines code with refurb

  • installs, or updates, a project's 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 replaces them with PDM using PEP 582

  • converts/creates documentation in Markdown (md) - Coming Soon!

  • runs tests and generates pytest mock stubs if needed - Coming Soon!

  • bumps the project version and publishes it to PyPI

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.

For a full list of options:

python -m crackerjack -h

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'.

Acknowledgements

License

BSD-3-Clause

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.2.5.tar.gz (8.4 kB view details)

Uploaded Source

Built Distribution

crackerjack-0.2.5-py3-none-any.whl (9.4 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for crackerjack-0.2.5.tar.gz
Algorithm Hash digest
SHA256 dcdb9644df88b43ed55dfd58fca662b303cc4a26c9a1dd350c8a6ca6decbe040
MD5 8c033ad300a2e1417c6da9c008b97066
BLAKE2b-256 1c9eae990dcfeabcd78d8064387a5dd8e3163b189ddfce538afb1cb01118f4aa

See more details on using hashes here.

File details

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

File metadata

  • Download URL: crackerjack-0.2.5-py3-none-any.whl
  • Upload date:
  • Size: 9.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: pdm/2.7.0 CPython/3.11.3

File hashes

Hashes for crackerjack-0.2.5-py3-none-any.whl
Algorithm Hash digest
SHA256 25bacaac709ccdb8e7946dc6eadd843ab5b55c146ac173aac6f7116ef8b1ab14
MD5 31f260d9e930ba16f065b3fd3cadb5d3
BLAKE2b-256 87a744bb91ac0f55de371974dd9a4bc06b549b9b2f2952c4fa6926a7af38c92b

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