Package: calcipy
calcipycalcipyis a Python package that implements best practices such as code style (linting, auto-fixes), documentation, CI/CD, and logging. Like the calcium carbonate in hard coral, packages can be built on thecalcipyfoundation.calcipyhas some configurability, but is tailored for my particular use cases. If you want the same sort of functionality, there are a number of alternatives to consider:pyscaffoldis a much more mature project that aims for the same goals, but with a slightly different approach and tech stack (tox vs. nox, cookiecutter vs. copier, etc.)tidypy,pylama, andcodecheckoffer similar functionality of bundling and running static checkers, but makes far fewer assumptionspytoilis a general CLI tool for developer automationAnd many more such aspyta,prospector,wemake-python-styleguide/cjolowicz/cookiecutter-hypermodern-python,formate,johnthagen/python-blueprint,oxsecurity/megalinter, etc.InstallationCalcipy needs a few static files managed using copier and a template project:kyleking/calcipy_templateYou can quickly use the template to create a new project or add calcipy to an existing one:# Install copier. pipx is recommendedpipxinstallcopier# To create a new projectcopiercopygh:KyleKing/calcipy_templatenew_projectcdnew_project# Or convert/update an existing onecdmy_project
copiercopygh:KyleKing/calcipy_template.
copierupdateCalcipy CLIAdditionally,calcipycan be run as a CLI application without adding the package as a dependency.Quick Start:# For the CLI, only install a few of the extras which can be used from a few different CLI commandspipxinstall'calcipy[flake8,lint,tags]'# Use 'tags' to create a CODE_TAG_SUMMARY of the specified directorycalcipy-tagstags--help
calcipy-tagstags--base-dir=~/path/to/my_project# You can list all provided CLI commands withpipxlistvenvs are in ~/.local/pipx/venvs
apps are exposed on your $PATH at ~/.local/bin
   package calcipy 1.4.0, installed using Python 3.11.4
    - calcipy
    - calcipy-lint
    - calcipy-pack
    - calcipy-tags
    - calcipy-typesNote: the CLI output below is compressed for readability, but you can try running each of these commands locally to see the most up-to-date documentation and the full set of options. The "Usage", "Core options", and "Global Task Options" are the same for each subsequent command, so they are excluded for brevity.> calcipy-lint
Usage: calcipy-lint [--core-opts] <subcommand> [--subcommand-opts] ...

Core options:

  --complete                         Print tab-completion candidates for given parse remainder.
  --hide=STRING                      Set default value of run()'s 'hide' kwarg.
  --print-completion-script=STRING   Print the tab-completion script for your preferred shell (bash|zsh|fish).
  --prompt-for-sudo-password         Prompt user at start of session for the sudo.password config value.
  --write-pyc                        Enable creation of .pyc files.
  -d, --debug                        Enable debug output.
  -D INT, --list-depth=INT           When listing tasks, only show the first INT levels.
  -e, --echo                         Echo executed commands before running.
  -f STRING, --config=STRING         Runtime configuration file to use.
  -F STRING, --list-format=STRING    Change the display format used when listing tasks. Should be one of: flat (default), nested, json.
  -h [STRING], --help[=STRING]       Show core or per-task help and exit.
  -l [STRING], --list[=STRING]       List available tasks, optionally limited to a namespace.
  -p, --pty                          Use a pty when executing shell commands.
  -R, --dry                          Echo commands instead of running.
  -T INT, --command-timeout=INT      Specify a global command execution timeout, in seconds.
  -V, --version                      Show version and exit.
  -w, --warn-only                    Warn, instead of failing, when shell commands fail.

Subcommands:

  lint.autopep8       Run autopep8.
  lint.check (lint)   Run ruff as check-only.
  lint.fix            Run ruff and apply fixes.
  lint.flake8         Run flake8.
  lint.pre-commit     Run pre-commit.
  lint.pylint         Run pylint.
  lint.security       Attempt to identify possible security vulnerabilities.
  lint.watch          Run ruff as check-only.

Global Task Options:

  *file_args             List of Paths available globally to all tasks. Will resolve paths with working_dir
  --keep-going           Continue running tasks even on failure
  --working_dir=STRING   Set the cwd for the program. Example: "../run --working-dir .. lint test"
  -v,-vv,-vvv            Globally configure logger verbosity (-vvv for most verbose)

> calcipy-pack

Subcommands:

  pack.check-licenses   Check licenses for compatibility with `licensecheck`.
  pack.install-extras   Run poetry install with all extras.
  pack.lock             Ensure poetry.lock is  up-to-date.
  pack.publish          Build the distributed format(s) and publish.

> calcipy-tags

Subcommands:

  tags.collect-code-tags (tags)   Create a `CODE_TAG_SUMMARY.md` with a table          for TODO- and FIXME-style code comments.

> calcipy-types

Subcommands:

  types.mypy      Run mypy.
  types.pyright   Run pyright.Calcipy Pre-Commitcalcipycan also be used as apre-committask by adding the below snippet to yourpre-commitfile:repos:-repo:https://github.com/KyleKing/calcipyrev:mainhooks:-id:tags-id:lint-fix-id:typesProject StatusSee theOpen Issuesand/or theCODE_TAG_SUMMARY. For release history, see theCHANGELOG.ContributingWe welcome pull requests! For your pull request to be accepted smoothly, we suggest that you first open a GitHub issue to discuss your idea. For resources on getting started with the code base, see the below documentation:DEVELOPER_GUIDESTYLE_GUIDECode of ConductWe follow theContributor Covenant Code of Conduct.Open Source StatusWe try to reasonably meet most aspects of the "OpenSSF scorecard" fromOpen Source InsightsResponsible DisclosureIf you have any security issue to report, please contact the project maintainers privately. You can reach us atdev.act.kyle@gmail.com.LicenseLICENSE