Skip to main content

fprime-fpp-format

A formatter for the F Prime Prime (FPP) modeling language.

This package ships the fpp-format executable, a pretty-printer for .fpp source files.

Usage

# Format files in place
fpp-format path/to/model.fpp

# Check formatting without modifying (exit 1 if not formatted)
fpp-format --check path/to/model.fpp

# Format from stdin to stdout
cat path/to/model.fpp | fpp-format --stdin

Options

Option Description
--check Check formatting without writing; exit 1 if a file is unformatted.
--stdin Read from stdin and write to stdout (default when no files given).
--recursive-includes Also follow include specifiers and format reachable .fppi fragments.
--entry <RULE> Select the parser entrypoint / grammar rule (see below).
--help Print usage.

Entrypoint rule (--entry)

The formatter parses input starting from a specific grammar rule. A whole .fpp file is a module (the default), but other rules are needed when formatting include fragments.

Supported rules:

  • module (default)
  • component
  • topology
  • tlm-packet
  • tlm-packet-set

Recursive include formatting (--recursive-includes)

By default fpp-format formats only the files you name and does not touch .fppi fragments referenced via include. Pass --recursive-includes to also follow every include specifier and format the referenced fragments (recursively):

# Formats model.fpp and every .fppi it (transitively) includes
fpp-format --recursive-includes path/to/model.fpp

With --recursive-includes, include paths are resolved relative to the including file (matching the parser), each fragment is formatted exactly once even if included from several places, and include cycles are detected and reported as an error. The entrypoint for each fragment is derived from the context of its include — a fragment included in a component { ... } body is formatted as component members, one in a topology { ... } body as topology members, and so on, so you do not need --entry for fragments reached this way.

State-machine includes have no standalone entrypoint and are left untouched.

Note: the language-server integration never follows includes; it only ever formats the current document buffer.

Formatting a bare .fppi file

An .fppi file is not a standalone module — it is a fragment that is spliced in via an include specifier. When you format a fragment directly (rather than reaching it from a root .fpp), there is no include context to infer the rule from, so pass --entry to select the matching entrypoint:

# An .fppi included inside a `module { ... }` body (module-level members)
fpp-format --entry module commands.fppi

# An .fppi included inside a `component { ... }` body
fpp-format --entry component ports.fppi

# An .fppi included inside a `topology { ... }` body
fpp-format --entry topology connections.fppi

If you omit --entry, the module rule is used, which is correct for normal .fpp files and for .fppi fragments containing module-level members.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fprime_fpp_format-3.3.0.tar.gz (117.2 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

fprime_fpp_format-3.3.0-py3-none-win_amd64.whl (413.8 kB view details)

Uploaded Python 3Windows x86-64

fprime_fpp_format-3.3.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (510.1 kB view details)

Uploaded Python 3manylinux: glibc 2.17+ x86-64

fprime_fpp_format-3.3.0-py3-none-macosx_11_0_arm64.whl (463.9 kB view details)

Uploaded Python 3macOS 11.0+ ARM64

File details

Details for the file fprime_fpp_format-3.3.0.tar.gz.

File metadata

  • Download URL: fprime_fpp_format-3.3.0.tar.gz
  • Upload date:
  • Size: 117.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for fprime_fpp_format-3.3.0.tar.gz
Algorithm Hash digest
SHA256 5d2d931f7cee977b892035b71efa74d6078bb934c60e9e42255e7d99a7026d39
MD5 f4f4f17e23d589c8f62923969277c178
BLAKE2b-256 2979d7204fdc6a0eee263dd0d0ceb2da2317680be6506d753c759dbe1dc9a62b

See more details on using hashes here.

Provenance

The following attestation bundles were made for fprime_fpp_format-3.3.0.tar.gz:

Publisher: pip.yml on fprime-community/fpp-tools

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file fprime_fpp_format-3.3.0-py3-none-win_amd64.whl.

File metadata

File hashes

Hashes for fprime_fpp_format-3.3.0-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 95e19af07cdd71fddc0f593708e1e70c9eea33047f21f7c0284da08326e873e5
MD5 3aa9a7f0693d33cfbc732abac66fb0ec
BLAKE2b-256 ab017c611e80f590645a1192a7fee3ea69d9c619c6ed288acf2a9ea7deecef48

See more details on using hashes here.

Provenance

The following attestation bundles were made for fprime_fpp_format-3.3.0-py3-none-win_amd64.whl:

Publisher: pip.yml on fprime-community/fpp-tools

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file fprime_fpp_format-3.3.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for fprime_fpp_format-3.3.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 da34ab858171d4333cb30e2a8b5995e1d06c933ef84f523b92cbeba280f51991
MD5 310fd3dae13c2ee5bf16706a2a8a878e
BLAKE2b-256 65904102e2cebe2504e7098056d693f96a3c146b37775061f127ed172ab12316

See more details on using hashes here.

Provenance

The following attestation bundles were made for fprime_fpp_format-3.3.0-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: pip.yml on fprime-community/fpp-tools

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file fprime_fpp_format-3.3.0-py3-none-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for fprime_fpp_format-3.3.0-py3-none-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 3e35c6487c3738afb3c052e9c2f71f69c80e8b479aa75490f62dd872c063e1b4
MD5 e9cb3cc1137671aaa38b77e01f05ed37
BLAKE2b-256 c17158b3b2f678eb7d090f3b7860838732d07d8b0290dd86fffab9b31ac2b906

See more details on using hashes here.

Provenance

The following attestation bundles were made for fprime_fpp_format-3.3.0-py3-none-macosx_11_0_arm64.whl:

Publisher: pip.yml on fprime-community/fpp-tools

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

3.3.10

4 files

3.3.9

4 files

3.3.8

4 files

3.3.7

4 files

3.3.6

4 files

3.3.5

4 files

3.3.4

4 files

3.3.3

4 files

3.3.2

4 files

3.3.1

4 files

This release

3.3.0 This release

4 files

3.0.0

4 files

2.3.1

4 files

2.3.0

4 files

2.2.1

4 files

2.2.0

4 files

2.1.0

4 files

2.0.2

4 files

2.0.1

4 files

2.0.0

4 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page