Crackerjack code formatting style.
Project description
Crackerjack Python
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
Built Distribution
File details
Details for the file crackerjack-0.1.9.tar.gz
.
File metadata
- Download URL: crackerjack-0.1.9.tar.gz
- Upload date:
- Size: 10.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: pdm/2.5.3 CPython/3.11.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 53dd78de69d79b5682da2fcc046785758fbbe9ec7afe4a76373b3831e48d5830 |
|
MD5 | 56350a5737ba8e847c68cbe1da0cb59c |
|
BLAKE2b-256 | a83e87cedab18cf6007223d05d8f0d5446d2d34dd27ca6a03f2792f833765bc6 |
File details
Details for the file crackerjack-0.1.9-py3-none-any.whl
.
File metadata
- Download URL: crackerjack-0.1.9-py3-none-any.whl
- Upload date:
- Size: 11.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: pdm/2.5.3 CPython/3.11.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 972ea3dc51551c381d78d1495f90d78cbbb4cce5999d18df7c0255717b6b3808 |
|
MD5 | 9c1b8adaa0a3c6a2fc0ad7ada0986e7e |
|
BLAKE2b-256 | eab151858f521ce3e112d7bcfbfc92a9e2265bacb4c715c411febe92bd00b47c |