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 psss/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 and František Nečas.

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

fmf-0.15.2-py3-none-any.whl (35.3 kB view details)

Uploaded Python 3

fmf-0.15.2-py2-none-any.whl (35.3 kB view details)

Uploaded Python 2

File details

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

File metadata

  • Download URL: fmf-0.15.2-py3-none-any.whl
  • Upload date:
  • Size: 35.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.4.0 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.8.8

File hashes

Hashes for fmf-0.15.2-py3-none-any.whl
Algorithm Hash digest
SHA256 5bd458cf4b91f1082aea5477afeab232f4522d3691ed0b4730e24b7bca624212
MD5 31cf881aa74af645463d1531ab3ff429
BLAKE2b-256 8be2cff16124261f4294ffbdea2b60d0db475685e571eec03a25ede0ad293618

See more details on using hashes here.

File details

Details for the file fmf-0.15.2-py2-none-any.whl.

File metadata

  • Download URL: fmf-0.15.2-py2-none-any.whl
  • Upload date:
  • Size: 35.3 kB
  • Tags: Python 2
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/2.7.18

File hashes

Hashes for fmf-0.15.2-py2-none-any.whl
Algorithm Hash digest
SHA256 c886e9490b26e8c0184f0182a862fad9babde656510894698bf03f207df97227
MD5 27d58c964695976c4663db898314e87d
BLAKE2b-256 d9111e763241cd58f7bcdede5a24bd5e1a508cf513af003442359cb1eff0b854

See more details on using hashes here.

Supported by

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