simtools-generate-default-metadata#
Generate a default simtools metadata file from a json schema.
Command line arguments
- schema_file (str, optional)
Schema file describing the input data (default: simtools/schemas/metadata.metaschema.yml)
- output_file (str, optional)
Output file name.
Example
simtools-generate-default-metadata \\
--schema_file simtools/schemas/metadata.metaschema.yml \\
--output_file default_metadata.yml
Command line arguments#
options#
- –help
show this help message and exit
- –schema_file
Schema file describing input data
Required.
- –output_file
output file name (if not given: print to stdout)
application#
- –show_options
Print available values for a supported option and exit.
Examples#
Generate default metadata as JSON#
Create a JSON metadata document populated with defaults from the simtools metadata metaschema.
Application: simtools-generate-default-metadata
Integration test: generate_default_metadata_to_json_file.yml
Command
simtools-generate-default-metadata --config tests/integration_tests/config/generate_default_metadata_to_json_file.yml
Configuration
output_file: test.json
output_path: simtools-output
schema_file: metadata.metaschema.yml
Generate default metadata as YAML#
Create a YAML metadata document populated with defaults from the simtools metadata metaschema.
Application: simtools-generate-default-metadata
Integration test: generate_default_metadata_to_yml_file.yml
Command
simtools-generate-default-metadata --config tests/integration_tests/config/generate_default_metadata_to_yml_file.yml
Configuration
output_file: test.yml
output_path: simtools-output
schema_file: metadata.metaschema.yml