#!/usr/bin/env bash
#-------------------------------------------------------------------------------
# Copyright (C) 2012-2019 British Crown (Met Office) & Contributors.
#
# This file is part of Rose, a framework for meteorological suites.
#
# Rose 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 3 of the License, or
# (at your option) any later version.
#
# Rose is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Rose. If not, see <http://www.gnu.org/licenses/>.
#-------------------------------------------------------------------------------
# NAME
#     rose metadata-graph
#
# SYNOPSIS
#     rose metadata-graph [OPTIONS] [SECTION ...]
#
# DESCRIPTION
#     Graph configuration metadata.
#
# OPTIONS
#     --config=DIR, -C DIR
#         The directory containing either the configuration or
#         the configuration metadata. If the configuration is
#         given, the metadata will be looked up in the normal
#         way (see also `--meta-path`, `ROSE_META_PATH`). If the
#         configuration metadata is given, there will be no
#         configuration data used in the graphing.
#         If not specified, the current directory will be used.
#     --meta-path=PATH, -M PATH
#         Prepend `PATH` to the metadata search path (look here first).
#         This option can be used repeatedly to load multiple paths.
#     --property=PROPERTY, -p PROPERTY
#         Graph a certain property e.g. `trigger`. If specified,
#         only this property will be graphed.
# ARGUMENTS
#     SECTION
#         One or more configuration sections to graph. If
#         specified, only these sections will be checked.
#
# ENVIRONMENT VARIABLES
#     optional ROSE_META_PATH
#         Prepend `$ROSE_META_PATH` to the metadata search path.
#-------------------------------------------------------------------------------
exec python2 -m rose.metadata_graph "$@"
