Skip to main content

Default template for PDM package

Project description

Crackerjack Python

Python: 3.13 Ruff Code style: black Checked with pyright pdm-managed uv security: bandit Code style: crackerjack

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. Documentation and tests should be able to write themselves using a generative ai. 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:

  • streamlines and standardizes code style across numerous packages

  • installs, or updates, a project's pre-commit tools as well as .gitignore & other config files to comply with evolving crackerjack standards

  • runs the following pre-commit hooks (in order):

  • converts/creates documentation in Markdown (md) (work in progress)

  • runs tests and generates pytest mock stubs if needed (work in progress)

  • bumps the project version and publishes it to PyPI

  • commits changes to git repositories

What are the rules?

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

  • code is statically typed

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

  • use aiopath.AsyncPath or pathlib.Path not os.path

  • import typing as t

  • do not capitalize all letters in configuration settings or constants (we diverge from PEP-8 here for not other reason than it looks ugly)

  • functions that deal with path operations should get passed AsyncPaths or Paths - not strings

  • use PDM (uv support enabled) for dependency management and package building/publishing

  • use pdoc and mkdocs for producing documentation

  • use pytest for testing

  • be compliant with, and only support, the latest python version within 2 months after release

Installation

From your projects root directory:

pdm add -d crackerjack

Usage

From your projects root directory:

python -m crackerjack

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'. Put the -c option at the end and commit the bumped version to your git repository at the same time:

python -m crackerjack -p micro -c

Contributing

Crackerjack is currently an evolving standard. If you like the idea, but don't like certain things about it, or would like new features added, let me know in Discussions, Issues, or email me.

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

Uploaded Source

Built Distribution

crackerjack-0.10.2-py3-none-any.whl (20.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: crackerjack-0.10.2.tar.gz
  • Upload date:
  • Size: 13.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: pdm/2.20.1 CPython/3.13.0 Darwin/24.1.0

File hashes

Hashes for crackerjack-0.10.2.tar.gz
Algorithm Hash digest
SHA256 216e284f2a22f8c8db33649ffb38f9c2a9014689f252f436a21ec5257689b7d2
MD5 16da58ad150d05e8454c19f518636de8
BLAKE2b-256 e3f04aa45bc8f6dc4e5dab5e954d5db607db64c17bf31f9535b6bd365e673ae5

See more details on using hashes here.

File details

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

File metadata

  • Download URL: crackerjack-0.10.2-py3-none-any.whl
  • Upload date:
  • Size: 20.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: pdm/2.20.1 CPython/3.13.0 Darwin/24.1.0

File hashes

Hashes for crackerjack-0.10.2-py3-none-any.whl
Algorithm Hash digest
SHA256 8e467582a3f43b828cb169f1ebd8f2dbff1ef6918776880850fa84629fb84ec7
MD5 43b7005793be3edcb3e1773e978b81fa
BLAKE2b-256 dcff2cca79160820e4667396c94c32f474488ff74c5e49fc9529978dc47979e1

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