Crackerjack


NameCrackerjack JSON
Version 0.7.30 PyPI version JSON
download
home_pagehttps://github.com/lesleslie/crackerjack
SummaryCrackerjack code style
upload_time2024-04-02 14:18:04
maintainerNone
docs_urlNone
authorNone
requires_python>=3.12
licenseBSD-3-Clause
keywords black ruff mypy creosote refurb
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Crackerjack Python

[![Python: 3.12](https://img.shields.io/badge/python-3.12%2B-blue)](https://docs.python.org/3/)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/ambv/black)
[![Checked with pyright](https://microsoft.github.io/pyright/img/pyright_badge.svg)](https://microsoft.github.io/pyright/)
[![pdm-managed](https://img.shields.io/badge/pdm-managed-blueviolet)](https://pdm.fming.dev)
[![security: bandit](https://img.shields.io/badge/security-bandit-yellow.svg)](https://github.com/PyCQA/bandit)
[![Code style: crackerjack](https://img.shields.io/badge/code%20style-crackerjack-000042)](https://github.com/lesleslie/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.

### **Crackerjack philosophy...**

#### Virtual envs:

Let's face it virtual envs are a mess and a lot of time and resources are
spent maintaining them. [This](https://miro.medium.com/v2/resize:fit:984/format:webp/1*mHrDuetdLskvNHYucD9u3g.png) pretty
much says it all. Enough is enough.

#### Regression testing:

Again, here is what we believe become to be waste of time too. It takes more time to keep codebases compliant
with previous versions of python than it does to just update your code to run the latest versions of python
as they are released (within a liberal-ish timeline of course). Why are you running old versions of python anyway.
There are various easy ways to keep your system python versions up-to-date and
Docker containers for the latest versions are available immediately upon release. Most cloud providers
will support the new versions in their virtual machines and containers shortly after release as well. If your dependencies
break upon upgrade, file a bug report or fix it yourself. Simple enough.

#### ...the Crackerjack solution:

Crackerjack uses PDM with PEP-582 (yes, PEP-582 has been rejected but PDM still supports it and Crackerjack will continue to use it!).
No more virtualenvs. Update your system python versions as they are released and start
migrating your code. Crackerjack, and Crackerjack'd packages, should support the latest
python release's features within 2 month after the release and depend solely on that version. Again, if
something breaks, file a bug report or, even better, fix it yourself (maybe even learn something new things in the process).
Easy-peasy. You just saved yourself a zillion headaches and can sleep
better at night now.

### **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):
  * [pdm-lock-check](https://github.com/pdm-project/pdm)
  * various core [pre-commit-hooks](https://github.com/pre-commit/pre-commit-hooks)
  * [black](https://github.com/psf/black)
  * [ruff](https://github.com/charliermarsh/ruff-pre-commit)
  * [creosote](https://github.com/fredrikaverpil/creosote)
  * [flynt](https://github.com/ikamensh/flynt/)
  * [codespell](https://github.com/codespell-project/codespell)
  * [autotyping](https://github.com/JelleZijlstra/autotyping)
  * [refurb](https://github.com/dosisod/refurb)
  * [bandit](https://github.com/PyCQA/bandit)
  * [pyright](https://github.com/RobertCraigie/pyright-python)
  * ruff (again for sanity checking)
  * black (again for sanity checking)

- 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)

- format with black

- 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

- force single line imports (will support isort Vertical Hanging Indent when ruff does)

- use PDM and PEP-582(proposed) for dependency management and package building/publishing

- use pdoc and mkdocs for producing documentation

- use pytest for testing

- be compliant with the latest python version within 2 months after release



[//]: # (- variable docstrings are supported as outlined in)

[//]: # (  [PEP-224](https://www.python.org/dev/peps/pep-0224/) as well as the module-level)

[//]: # (  __pdoc__ dictionary (see [pdoc docs]()

[//]: # (  https://pdoc3.github.io/pdoc/doc/pdoc/#overriding-docstrings-with-__pdoc__)))


### **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.

### **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

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/lesleslie/crackerjack",
    "name": "Crackerjack",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.12",
    "maintainer_email": "lesleslie <les@wedgwoodwebworks.com>",
    "keywords": "black ruff mypy creosote refurb",
    "author": null,
    "author_email": "lesleslie <les@wedgwoodwebworks.com>",
    "download_url": "https://files.pythonhosted.org/packages/e7/80/2a083fe294055f0ee06516c8973c10a085f9ad77eceaba5d2ebbdfd3695d/crackerjack-0.7.30.tar.gz",
    "platform": null,
    "description": "# Crackerjack Python\n\n[![Python: 3.12](https://img.shields.io/badge/python-3.12%2B-blue)](https://docs.python.org/3/)\n[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/ambv/black)\n[![Checked with pyright](https://microsoft.github.io/pyright/img/pyright_badge.svg)](https://microsoft.github.io/pyright/)\n[![pdm-managed](https://img.shields.io/badge/pdm-managed-blueviolet)](https://pdm.fming.dev)\n[![security: bandit](https://img.shields.io/badge/security-bandit-yellow.svg)](https://github.com/PyCQA/bandit)\n[![Code style: crackerjack](https://img.shields.io/badge/code%20style-crackerjack-000042)](https://github.com/lesleslie/crackerjack)\n\nCrackerjack is a python coding style which uses a minimalist approach to produce elegant, easy to read, code.\n\ncrack\u00b7\u200ber\u00b7\u200bjack \u02c8kra-k\u0259r-\u02ccjak\n: a person or thing of marked excellence\n\n### **Why Crackerjack?**\n\nCrackerjack works on the theory that with static typing and explicit class,\nfunction, variable, and other object names - the code should be\nstraight forward to read. Documentation and tests should be able to write themselves using a generative ai.\nCrackerjack provides a set of guidelines and utilities to keep the codebase clean, elegant, standardized, and\neasily readable.\n\n### **Crackerjack philosophy...**\n\n#### Virtual envs:\n\nLet's face it virtual envs are a mess and a lot of time and resources are\nspent maintaining them. [This](https://miro.medium.com/v2/resize:fit:984/format:webp/1*mHrDuetdLskvNHYucD9u3g.png) pretty\nmuch says it all. Enough is enough.\n\n#### Regression testing:\n\nAgain, here is what we believe become to be waste of time too. It takes more time to keep codebases compliant\nwith previous versions of python than it does to just update your code to run the latest versions of python\nas they are released (within a liberal-ish timeline of course). Why are you running old versions of python anyway.\nThere are various easy ways to keep your system python versions up-to-date and\nDocker containers for the latest versions are available immediately upon release. Most cloud providers\nwill support the new versions in their virtual machines and containers shortly after release as well. If your dependencies\nbreak upon upgrade, file a bug report or fix it yourself. Simple enough.\n\n#### ...the Crackerjack solution:\n\nCrackerjack uses PDM with PEP-582 (yes, PEP-582 has been rejected but PDM still supports it and Crackerjack will continue to use it!).\nNo more virtualenvs. Update your system python versions as they are released and start\nmigrating your code. Crackerjack, and Crackerjack'd packages, should support the latest\npython release's features within 2 month after the release and depend solely on that version. Again, if\nsomething breaks, file a bug report or, even better, fix it yourself (maybe even learn something new things in the process).\nEasy-peasy. You just saved yourself a zillion headaches and can sleep\nbetter at night now.\n\n### **What does this package do?**\n\nThis package:\n\n- streamlines and standardizes code style across numerous packages\n\n- installs, or updates, a project's pre-commit tools as well as .gitignore & other config files\n  to comply with evolving crackerjack standards\n\n- runs the following pre-commit hooks (in order):\n  * [pdm-lock-check](https://github.com/pdm-project/pdm)\n  * various core [pre-commit-hooks](https://github.com/pre-commit/pre-commit-hooks)\n  * [black](https://github.com/psf/black)\n  * [ruff](https://github.com/charliermarsh/ruff-pre-commit)\n  * [creosote](https://github.com/fredrikaverpil/creosote)\n  * [flynt](https://github.com/ikamensh/flynt/)\n  * [codespell](https://github.com/codespell-project/codespell)\n  * [autotyping](https://github.com/JelleZijlstra/autotyping)\n  * [refurb](https://github.com/dosisod/refurb)\n  * [bandit](https://github.com/PyCQA/bandit)\n  * [pyright](https://github.com/RobertCraigie/pyright-python)\n  * ruff (again for sanity checking)\n  * black (again for sanity checking)\n\n- converts/creates documentation in Markdown (md) (work in progress)\n\n- runs tests and generates pytest mock stubs if needed (work in progress)\n\n- bumps the project version and publishes it to PyPI\n\n- commits changes to git repositories\n\n### **What are the rules?**\n\n(...more what you'd call \"guidelines\" than actual rules. -Captain Barbossa )\n\n- code is statically typed\n\n- all docstrings, README's, and other documentation is to be done in Markdown (md)\n\n- format with black\n\n- use aiopath.AsyncPath or pathlib.Path not os.path\n\n- import typing as t\n\n- do not capitalize all letters in configuration settings or constants (we diverge from PEP-8 here\n for not other reason than it looks ugly)\n\n- functions that deal with path operations should get passed AsyncPaths or Paths - not strings\n\n- force single line imports (will support isort Vertical Hanging Indent when ruff does)\n\n- use PDM and PEP-582(proposed) for dependency management and package building/publishing\n\n- use pdoc and mkdocs for producing documentation\n\n- use pytest for testing\n\n- be compliant with the latest python version within 2 months after release\n\n\n\n[//]: # (- variable docstrings are supported as outlined in)\n\n[//]: # (  [PEP-224]&#40;https://www.python.org/dev/peps/pep-0224/&#41; as well as the module-level)\n\n[//]: # (  __pdoc__ dictionary &#40;see [pdoc docs]&#40;)\n\n[//]: # (  https://pdoc3.github.io/pdoc/doc/pdoc/#overriding-docstrings-with-__pdoc__&#41;&#41;)\n\n\n### **Installation**\n\nFrom your projects root directory:\n\n```pdm add -d crackerjack```\n\n### **Usage**\n\nFrom your projects root directory:\n\n```python -m crackerjack```\n\nFor a full list of options:\n\n```python -m crackerjack -h```\n\nWhen you ready to publish your project:\n\n``python -m crackerjack -p micro``\n\nThe -p option not only publishes your project but will bump your\nproject version for you. The options are 'micro', 'minor', and 'major'.\nPut the -c option at the end and commit the bumped version to your git\nrepository at the same time.\n\n### **Contributing**\n\nCrackerjack is currently an evolving standard. If you like the idea, but don't like certain things about it, or\nwould like new features added, let me know in Discussions, Issues, or email me.\n\n### **License**\n\nBSD-3-Clause\n",
    "bugtrack_url": null,
    "license": "BSD-3-Clause",
    "summary": "Crackerjack code style",
    "version": "0.7.30",
    "project_urls": {
        "Documentation": "https://github.com/lesleslie/crackerjack",
        "Homepage": "https://github.com/lesleslie/crackerjack",
        "Repository": "https://github.com/lesleslie/crackerjack"
    },
    "split_keywords": [
        "black",
        "ruff",
        "mypy",
        "creosote",
        "refurb"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "0f73ed2402f86c8fa55ba30c6186f40f6f856ea07044d1b394019f86b4b9369b",
                "md5": "27ac9351763a39b290fca41337121fac",
                "sha256": "f5fc2fb71096ec16e71729ba76a35c68bd1268ebd2ce9754218524e231cd801d"
            },
            "downloads": -1,
            "filename": "crackerjack-0.7.30-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "27ac9351763a39b290fca41337121fac",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.12",
            "size": 16246,
            "upload_time": "2024-04-02T14:18:02",
            "upload_time_iso_8601": "2024-04-02T14:18:02.638155Z",
            "url": "https://files.pythonhosted.org/packages/0f/73/ed2402f86c8fa55ba30c6186f40f6f856ea07044d1b394019f86b4b9369b/crackerjack-0.7.30-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "e7802a083fe294055f0ee06516c8973c10a085f9ad77eceaba5d2ebbdfd3695d",
                "md5": "ac4ed8e37ee047247b8d87a9a5381731",
                "sha256": "d98e92615f2b98faa3e5c9d1d43a100dde391a782f40d6f8288536c06aedeba5"
            },
            "downloads": -1,
            "filename": "crackerjack-0.7.30.tar.gz",
            "has_sig": false,
            "md5_digest": "ac4ed8e37ee047247b8d87a9a5381731",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.12",
            "size": 13390,
            "upload_time": "2024-04-02T14:18:04",
            "upload_time_iso_8601": "2024-04-02T14:18:04.459829Z",
            "url": "https://files.pythonhosted.org/packages/e7/80/2a083fe294055f0ee06516c8973c10a085f9ad77eceaba5d2ebbdfd3695d/crackerjack-0.7.30.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-04-02 14:18:04",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "lesleslie",
    "github_project": "crackerjack",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "crackerjack"
}
        
Elapsed time: 0.23057s