FMF(1)

πŸ“¦
version 1.7.0 Β· 4 versions
, in epel 9

πŸ’… fmf(1) β€” Flexible Metadata Format ✨

okay so real talk, this is the manual page for fmf, a User Command type deal β€” the command line tool (and, plot twist, also a Python module) that gives you a Flexible Metadata Format. bestie, it's giving organized-chaos-made-beautiful. let's get into it πŸŽ€


🌸 NAME 🌸

fmf β€” Flexible Metadata Format πŸ’–


πŸ¦‹ DESCRIPTION πŸ¦‹

so the fmf Python module and command line tool implement a flexible format for defining metadata in plain text files β€” and the whole vibe is that you can store these files super close to your source code, structured in a hierarchical way, with full-on support for inheritance. like, your metadata lives with your code. main character energy tbh πŸ‘‘

and like, yeah, the proposal originally came out of user stories that were all about test execution, but ngl the format is general β€” so it works in way broader scenarios too, e.g. test coverage mapping. it's not just a test thing, it's a lifestyle. 🌈

the way this approach works, you can literally combine both test execution metadata and test coverage info in one place. and thanks to the elasticity and hierarchy it gives you, you get the ability to organize your data into well-sized text documents while preventing duplication. no cap. πŸ’…


⭐ SYNOPSIS ⭐

command line usage is straightforward, no notes:

fmf command [options]

there are the following commands available β€” memorize them, bestie:

  • 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 the '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 the help message of individual commands for the full list of available options β€” there's more where that came from.

✨ OPTIONS ✨

here's the list of the most frequently used options. not all of them, but the ones you'll actually reach for 🫢

πŸ” Select

limit which metadata should be listed.

  • --key=KEYS β€” key content definition (required attributes). this is your "must have these, or it doesn't count" list 🎯
  • --name=NAMES β€” list objects with name matching a regular expression
  • --filter=FLTRS β€” apply advanced filter when selecting objects
  • --condition=EXPR β€” use an arbitrary Python expression for filtering. go off, honestly 🐍
  • --whole β€” consider the whole tree (leaves only by default). so by default you're getting just the leaves πŸƒ

for filtering, regular expressions can be used as well. see pydoc fmf.filter for advanced filtering options β€” that's where the deep lore lives πŸ‘‘

πŸŽ€ Format

choose the best format for showing the metadata. slay with presentation ✨

  • --format=FMT β€” custom output format using the {} expansion
  • --value=VALUES β€” values for the custom formatting string

see the online documentation for details about custom format β€” fr fr, it's worth the read.

πŸ› οΈ Utils

various utility options. the little helpers πŸ’œ

  • --path PATHS β€” path to the metadata tree (default: current directory)
  • --verbose β€” print additional information to standard error output
  • --debug β€” turn on debugging output, do not catch exceptions. so like, you will see the raw chaos 😭 handle with care
πŸ’‘ check the 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 the documentation for more details about installation options. pick your fighter πŸ’…


🌈 VARIABLES 🌈

here's the list of environment variables understood by fmf:

  • FMF_CACHE_DIRECTORY β€” directory used to cache git clone calls for fmf identifiers. yes, it's a cache directory and yes, that's exactly the vibe πŸ—‚οΈ


πŸ‘‘ AUTHORS πŸ‘‘

absolute icons, all of them: 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. πŸ«ΆπŸ’–


Copyright (c) 2018-2021 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.


and that's the whole thing, bestie πŸ’€πŸŽ€ this page has been the fmf(1) user command manual, dated January 2018 β€” yeah, she's been iconic since then, we're just catching up. go forth and structure your metadata. periodt. πŸŒΈπŸ’œ

πŸ“¦ where this page comes from