BSD Ports

devel/py-shandy-sqlfmt 0.32.0_1 FreeBSD

Sqlfmt formats your dbt SQL files so you don't have to

System
FreeBSD
Repository
FreeBSD ports
Maintainer
[email protected]
Last update
Commit
c56222c8a0
License
APACHE20
Categories
devel, python
Package size
133.8 KiB, 708.3 KiB installed

Description

sqlfmt formats your dbt SQL files so you don't have to. It is similar in nature to black, gofmt, and rustfmt (but for SQL).

sqlfmt promotes collaboration. An auto-formatter makes it easier to collaborate with your team and solicit contributions from new people. You will never have to mention (or argue about) code style in code reviews again. sqlfmt is fast. Forget about formatting your code, and spend your time on business logic instead. sqlfmt processes hundreds of files per second and only operates on files that have changed since the last run. sqlfmt works with Jinja. It formats the code that users look at, and therefore doesn't need to know anything about what happens after the templates are rendered. sqlfmt integrates with your workflow. As a CLI written in Python, it's easy to install locally on any OS and run in CI. Plays well with dbt, pre-commit, SQLFluff, VSCode, and GitHub Actions. sqlfmt powers the dbt Cloud IDE's Format button. sqlfmt is not configurable, except for line length. It enforces a single style. sqlfmt maintains comments and some extra newlines, but largely ignores all indentation and line breaks in the input file.

sqlfmt is not a linter. It does not parse your code into an AST; it just lexes it and tracks a small subset of tokens that impact formatting. This lets us "do one thing and do it well:" sqlfmt is very fast, and easier to maintain and extend than linters that need a full SQL grammar.

For now, sqlfmt only works on select, delete, grant, revoke, and create function statements (which is all you need if you use sqlfmt with a dbt project). It is being extended to additional DDL and DML. Visit this tracking issue for more information.

In the other systems

SystemPortVersion
FreeBSDdevel/py-shandy-sqlfmt0.32.0_1
HardenedBSDdevel/py-shandy-sqlfmt0.32.0
GhostBSDdevel/py-shandy-sqlfmt0.32.0

Install

Binary package:

pkg install py312-shandy-sqlfmt

From the ports tree:

cd /usr/ports/devel/py-shandy-sqlfmt/ && make install clean

To depend on this port in another port's Makefile:

RUN_DEPENDS=	py312-shandy-sqlfmt>0:devel/py-shandy-sqlfmt

Packages

The version each package repository carries. “-” means the repository builds no package of it, “n/a” that there is no such repository.

Repositoryaarch64amd64armv6armv7i386
FreeBSD:14:latest0.32.00.32.0_1-0.26.00.32.0_1
FreeBSD:14:quarterly0.32.00.32.0n/a0.26.00.32.0
FreeBSD:15:latest0.32.0_10.32.0_1n/a0.26.00.26.0
FreeBSD:15:quarterly0.32.00.32.0n/an/an/a
FreeBSD:16:latest0.32.00.32.0_1n/an/an/a
FreeBSD:16:quarterlyn/an/an/an/an/a

Dependencies

As this port's Makefile names them.

Build 1

Runtime 5

The full lists below include those, and their dependencies in turn.

Build dependencies 19
Run dependencies 23

Configuration

No options to configure.

USES
python
Service scripts
none

Files

distinfo 1
FileSizeSHA256
tconbeer-sqlfmt-0.32.0-v0.32.0_GH0.tar.gz2386496bcf4c29f2f803751cf1d9250d20a6dc687b61412e18b4f6e48b5c3e3dfe54ad

Commit history 3

DateCommitCreditsLog message
c56222c8a0 Hajimu UMEMOTO devel/py-shandy-sqlfmt: Add settings for test.
b0e36b0191 Hajimu UMEMOTO devel/py-shandy-sqlfmt: Update to 0.32.0
07bcf0b020 Hajimu UMEMOTO devel/py-shandy-sqlfmt: Update to 0.31.0