Skip to main content

Flexible Metadata Format

Project description

Flexible Metadata Format

Description

The fmf Python module and command line tool implement a flexible format for defining metadata in plain text files which can be stored close to the source code and structured in a hierarchical way with support for inheritance.

Although the proposal initially originated from user stories centered around test execution, the format is general and thus can be used in broader scenarios, e.g. test coverage mapping.

Using this approach it’s also possible to combine both test execution metadata and test coverage information. Thanks to elasticity and hierarchy it provides ability to organize data into well-sized text documents while preventing duplication.

Synopsis

Command line usage is straightforward:

fmf command [options]

There are following commands available:

fmf ls      List identifiers of available objects
fmf show    Show metadata of available objects
fmf init    Initialize a new metadata tree
fmf clean   Remove cache directory and its content

Examples

List names of all objects stored in the metadata tree:

fmf ls

Show all test metadata (with ‘test’ attribute defined):

fmf show --key test

Show metadata for all tree nodes (not only leaves):

fmf show --key test --whole

List all attributes for the /recursion tests:

fmf show --key test --name /recursion

Show all covered requirements:

fmf show --key requirement --key coverage

Search for all tests with the Tier1 tag defined and show a brief summary of what was found:

fmf show --key test --filter tags:Tier1 --verbose

Use arbitrary Python expressions to access deeper objects and create more complex conditions:

fmf show --condition "execute['how'] == 'shell'"

Initialize a new metadata tree in the current directory:

fmf init

Check help message of individual commands for the full list of available options.

Options

Here is the list of the most frequently used options.

Select

Limit which metadata should be listed.

--key=KEYS

Key content definition (required attributes)

--name=NAMES

List objects with name matching regular expression

--filter=FLTRS

Apply advanced filter when selecting objects

--condition=EXPR

Use arbitrary Python expression for filtering

--whole

Consider the whole tree (leaves only by default)

For filtering regular expressions can be used as well. See pydoc fmf.filter for advanced filtering options.

Format

Choose the best format for showing the metadata.

--format=FMT

Custom output format using the {} expansion

--value=VALUES

Values for the custom formatting string

See online documentation for details about custom format.

Utils

Various utility options.

--path PATHS

Path to the metadata tree (default: current directory)

--verbose

Print additional information standard error output

--debug

Turn on debugging output, do not catch exceptions

Check help message of individual commands for the full list of available options.

Install

The fmf package is available in Fedora and EPEL:

dnf install fmf

Install the latest version from the Copr repository:

dnf copr enable @teemtee/fmf
dnf install fmf

or use PIP:

pip install fmf

See documentation for more details about installation options.

Variables

Here is the list of environment variables understood by fmf:

FMF_CACHE_DIRECTORY

Directory used to cache git clone calls for fmf identifiers.

Authors

Petr Šplíchal, Miro Hrončok, Jakub Krysl, Jan Ščotka, Alois Mahdal, Cleber Rosa, Miroslav Vadkerti, Lukáš Zachar, František Nečas, Evgeny Fedin, Pablo Martin, Zhaojuan Guo, Laura Barcziová, Petr Matyáš, Filip Vágner, Cristian Le, Ondrej Moriš, Martin Hoyer and Karel Šrot.

Project details


Download files

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

Source Distribution

fmf-1.7.0.tar.gz (90.5 kB view details)

Uploaded Source

Built Distribution

fmf-1.7.0-py3-none-any.whl (40.9 kB view details)

Uploaded Python 3

File details

Details for the file fmf-1.7.0.tar.gz.

File metadata

  • Download URL: fmf-1.7.0.tar.gz
  • Upload date:
  • Size: 90.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for fmf-1.7.0.tar.gz
Algorithm Hash digest
SHA256 131b557786b912f99d49d8dcc84196e3c2f39c5ce5ffe8b78e48150afd380dc3
MD5 444b3f095130b6b19624d1c464a29711
BLAKE2b-256 2cfeaed3f3befc18d725776c10fe621790002671d0c4d50a6287d71fa371cf90

See more details on using hashes here.

Provenance

The following attestation bundles were made for fmf-1.7.0.tar.gz:

Publisher: release.yml on teemtee/fmf

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

File details

Details for the file fmf-1.7.0-py3-none-any.whl.

File metadata

  • Download URL: fmf-1.7.0-py3-none-any.whl
  • Upload date:
  • Size: 40.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for fmf-1.7.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c3a877a498f66b9f2668644c76a0c4484ddbc44129da8520eabaa2e45e387ad2
MD5 acb34911f5ac87585cb1e478263c86c5
BLAKE2b-256 b0ef55edab91b0ffb9c27c482e061b986bdbc3af6ed7c0cd8f3a32a17d9e07bc

See more details on using hashes here.

Provenance

The following attestation bundles were made for fmf-1.7.0-py3-none-any.whl:

Publisher: release.yml on teemtee/fmf

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

Supported by

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