Skip to main content

Documentation engine for YAML.

Project description

Documentation Engine for YAML

PyPI version CircleCI codecov Downloads

This package converts a YAML file into markdown, formatting values and associated metadata in a doxygen-like way. To get started, check out the documentation and tutorials.

Installation

pip install yamldoc

This will install the python package, which contains a command line interface yamldoc. To see usage instructions, invoke the --help flag:

yamldoc -h

Philosophy

Many programs and utilities use YAML (YAML Ain't Markup Language) as a human and machine readable interface to configuration parameters and other values. More broadly, many kinds of data can be stored in YAML with minimal effort from the user. However, often a configuration file accumulates a highly specific set of configurations marked up with vague, difficult to interpret comments. It is the goal of this package to provide an easy interface for developers to document data in their YAML files as well as the expected types from a JSON YAML schema validator. Doing so will allow a transparent interface between the developer's expectations and the user's configurations.

Specific Application to Snakemake

This package was designed specifically to document the possible configuration options of a Snakemake pipeline. In this application, the developer of the pipeline encodes many different specific options that the user may configure at run time, but these are often poorly documented. When they are, it is easy for the documentation to fall out of sync with the actual options in the configuration file. yamldoc automatically documents all configuration paramters as well as taking types from a schema file. The package will also read any comments that are present above each paramter and insert them into a parameter table for easy reference.

For more details on using YAML to configure Snakemake pipelines, see here.

Example Files

For a minimal example of yamldoc, see the files in /test/yaml and /test/schema.

Usage

For a basic report, point the command line interface to a YAML file.

yamldoc test/yaml/basic.yaml

You can also include type information from a schema file.

yamldoc test/yaml/basic.yaml -s test/schema/basic.schema

Other Options

yamldoc defaults to using #' as a special marker, but you can choose this character yourself if you wish. Just set it on the command line at parse-time:

yamldoc test/yaml/basic.yaml -c "YOURCHAR"

yamldoc also includes support for certain special declarations in the schema file. Right now these include:

  • _yamldoc_title: This specifies the overall title of the markdown page generated.
  • _yamldoc_description: A description to follow the title.

These are picked out of the schema file and reported.

Project details


Download files

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

Source Distribution

yamldoc-0.1.6.tar.gz (9.7 kB view details)

Uploaded Source

Built Distribution

yamldoc-0.1.6-py3-none-any.whl (9.1 kB view details)

Uploaded Python 3

File details

Details for the file yamldoc-0.1.6.tar.gz.

File metadata

  • Download URL: yamldoc-0.1.6.tar.gz
  • Upload date:
  • Size: 9.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.26.0 requests-toolbelt/0.9.1 urllib3/1.26.7 tqdm/4.62.3 importlib-metadata/4.8.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.7.12

File hashes

Hashes for yamldoc-0.1.6.tar.gz
Algorithm Hash digest
SHA256 eb169566e8c1cf732b37b15537af05ce84df37372cdf496986501aa532b7d273
MD5 d9b9d6b2532f1cfa2a932b416043af79
BLAKE2b-256 d7dc4d6c240a8b26ebc01fa791e232b246de1eda1a3cb7c2759321fb3aed26c4

See more details on using hashes here.

File details

Details for the file yamldoc-0.1.6-py3-none-any.whl.

File metadata

  • Download URL: yamldoc-0.1.6-py3-none-any.whl
  • Upload date:
  • Size: 9.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.26.0 requests-toolbelt/0.9.1 urllib3/1.26.7 tqdm/4.62.3 importlib-metadata/4.8.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.7.12

File hashes

Hashes for yamldoc-0.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 ead03fa89f9d736a11b6f627a4a2f48cf32fee27877ad45d966b06749d91fc99
MD5 e287917fdff01198b6a26d57ed62644b
BLAKE2b-256 edc29ac305aefd640a68976e40222fd72c29f4ff8af2473f595830e2263456cc

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