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
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.
Links
Git: https://github.com/psss/fmf
Docs: http://fmf.readthedocs.io/
Issues: https://github.com/psss/fmf/issues
Releases: https://github.com/psss/fmf/releases
Copr: http://copr.fedoraproject.org/coprs/psss/fmf
PIP: https://pypi.org/project/fmf/
Travis: https://travis-ci.org/psss/fmf
Coveralls: https://coveralls.io/github/psss/fmf
Copyright
Copyright (c) 2018 Red Hat, Inc.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
File details
Details for the file fmf-0.8.1-py3-none-any.whl
.
File metadata
- Download URL: fmf-0.8.1-py3-none-any.whl
- Upload date:
- Size: 23.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 70dadba4267c4ddcc5916703e25c1e7a532dcce51f6c01e5121c6c9454ef3db1 |
|
MD5 | 766b9b97729a6163eb0e1d7c25cb5d98 |
|
BLAKE2b-256 | 0b3745f1df5b8abd1cbb9a20a6fc2dc764aa740d514c7c122ccc9bf11badb46c |
File details
Details for the file fmf-0.8.1-py2-none-any.whl
.
File metadata
- Download URL: fmf-0.8.1-py2-none-any.whl
- Upload date:
- Size: 23.6 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/40.8.0 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | eb5cbe63227de5a67ff2651932513a568120829fa280c885e13b6ed4dbbce5d1 |
|
MD5 | 4ecdaa5acf1b379ba94f6c684cb58d71 |
|
BLAKE2b-256 | 97e3c6d416161eb0f158d84f88fabb0224cb33e5f47d4cf09e4575a1862cec3d |