Skip to content

Tool with configurations for the creation of better software

License

Notifications You must be signed in to change notification settings

jamesbraza/configurator

Repository files navigation

configurator

Tool with configurations for the creation of better software.

Non-Python Tool Integrations

Autoformatters

ToolUsed Here?DescriptionInvocationNotes

prettier (docs)

Yes, >=3

Autoformatting files like JSON, Markdown, and YAML.

pre-commit hook mirror

Configure to use four space indent to match Python PEP 8.

toml-sort (docs)

Yes

Formatting TOML

pre-commit hook

pre-commit-hooks

Yes

Miscellaneous file cleanup like end of file newlines

pre-commit hook

When adding rules, try to avoid duplication of other tools like ruff.

Linters

ToolUsed Here?DescriptionInvocationNotes

yamllint (docs)

Yes, >=1.33

Ensuring high quality YAML

pre-commit hook

Configure to coexist with YAML autoformatting of prettier.

codespell

Yes, >=2.3.0

Checking for typos

pre-commit hook

hadolint

Yes

Dockerfile following best practices

pre-commit hook

Python Tool Integrations

Autoformatters

ToolUsed Here?DescriptionInvocationNotes

black (docs)

Yes, >=24.2.0, jupyter extra

black code standard

pre-commit hook mirror

I am a fan of the hug_parens_with_braces_and_square_brackets preview option.

docformatter (docs)

Yes,>=1.7

Formatting docstrings

pre-commit hook

nb-clean

Yes,>=2.4

Cleaning Jupyter Notebooks

pre-commit hook

Paired with black[jupyter], this makes PRs with Jupyter Notebooks easier to read.

Linters

ToolUsed Here?DescriptionInvocationNotes

pylint (docs)

Yes, >=3

Static analysis

Command line

Since pylint is slow, pairing with the ruff partial reimplementation will ensure that pylint runs are more effective.

ruff (docs)

Yes,>=0.6

Static analysis

pre-commit hook mirror

Partially reimplements many other tools like flake8 and pylint.

refurb (docs)

Yes,>=2

Static analysis

Command line

refurb development outpaces its ruff reimplementation.

flake8 (docs)

Yes

Static analysis

pre-commit hook

Pair with Flake8-pyproject for configuration in pyproject.toml.

Mostly reimplemented by ruff, but still useful for partially reimplemented or not yet reimplemented plugins.

pydoclint (docs)

Yes

Checking docstrings

flake8 plugin

pydoclint was created in response to a stalled ruff reimplementation.

Type Checking

ToolUsed Here?DescriptionInvocationNotes

mypy (docs)

Yes, >=1.8

Static type checking

pre-commit hook mirror

Some opt-in rules like ignore-without-code and truthy-iterable are enabled.

typeguard (docs)

Yes

Runtime type checking

pytest plugin (built into typeguard), with --typeguard-packages=mypackage command line argument

beartype (docs)

No

Runtime type checking

pytest plugin pytest-beartype, with beartype_packages = "mypackage" configured

As of Feb. 20th in 2024, Python 3.10's typing.TypeAlias was unsupported.

mypy_clean_slate

No, >=0.2.5

Adopting mypy on a preexisting codebase

Command line

Equivalent of ruff --add-noqa, but for mypy.

Requirements

ToolUsed Here?DescriptionInvocationNotes

uv

Yes, >=0.3.0

Requirements compilation

Command line

pip-compile from pip-tools (docs)

No, >=7.4.0

Requirements compilation

Command line

flake8-requirements

Yes

Checking requirements

flake8 plugin (CI only)

If invoking flake8 as part of pre-commit, run this only in CI because this check isn't relevant for most commits.

validate-pyproject

Yes

Validating pyproject.toml configuration(s)

pre-commit hook

By specifying validate-pyproject-schema-store in additional_dependencies, configurations for mypy, ruff, uv, etc. will also be validated.

Git

.gitignore Creation

curl -s \
  https://raw.githubusercontent.com/github/gitignore/master/{Global/Vim,Global/JetBrains,Global/VisualStudioCode,Global/macOS,Python}.gitignore \
  > .gitignore

About

Tool with configurations for the creation of better software

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published