Skip to main content

Rmldoc is a tool that generates documentation of RML mappings

Project description

Project Status: Active – The project has reached a stable, usable state and is being actively developed. License DOI Latest PyPI version

RMLdoc

RMLdoc is a tool designed to simplify the process of generating documentation of mappings used for knowledge graph construction. It automates the documentation generation process, allowing users to easily understand the mapping transformation rules defined within their projects. Given an input mapping file written in R2RML, RML, or YARRRML, RMLdoc will generate a detailed Markdown documentation explaining each mapping with corresponding diagrams, in a human readable manner.

Features

  • Automated Documentation Generation: RMLdoc automatically generates documentation for mappings, eliminating the need for manual documentation efforts.
  • Clear and Readable Output: The generated documentation provides clear and concise descriptions of the input data sources, subject and predicate-object descriptions, along with other components defined within the mappings and their metadata.
  • Command-Line Interface (CLI): RMLdoc provides a simple command-line interface for easy integration into existing workflows and build processes.

Installation

From pypi

RMLdoc is available in pypi!

pip install rmldoc

From source

To install RMLdoc, simply clone this repository and cd in the main folder. Then install the package:

pip install -e .

Usage

rmldoc offers the following options:

usage: rmldoc [-h] -i INPUT_MAPPING_PATH [-o OUTPUT_PATH]

optional arguments:
  -h, --help            show this help message and exit
  
  -i INPUT_MAPPING_PATH, --input_mapping_path INPUT_MAPPING_PATH
                        Path to the input mapping file in RML format.
  -o OUTPUT_PATH, --output_path OUTPUT_PATH
                        Path to save the generated document. Default output in output.md
  -y, --yatter          Enable yatter option to read yarrrml mappings

To generate documentation for your mappings, use the following command, where you would replace path/to/rml/mappings.rml with the path to your RML mapping file and path/to/output/directory/mappings.md with the file where you want the documentation to be generated:

rmldoc -i path/to/rml/mappings.rml - o path/to/output/directory/mappings.md

To automate documentation generation using GNU's make, a typical implementation would involve creating a makefile with the following structure:

doc-rml:  ## Generate documentation for RML
	@echo -e "\033[35m > Generate documentation for RML \033[0m - requires RMLdoc: see https://github.com/oeg-upm/rmldoc"
	@find mapping/ -type f -name *.ttl \
		-printf "\n%f\n" \
		-exec rmldoc -i {} -o {}.md \;
	@echo -e "\033[35m > Done  \033[0m"

Example

The following link shows the result produced by RMLdoc from the following mapping file.

RMLdoc specification

The RMLdoc specification describes the main metadata expected in a RML mapping file. Have a look to create eye-catching documentations!

Contributing

Contributions to RMLdoc are welcome! If you encounter any issues or have suggestions for improvements, please open an issue or submit a pull request on GitHub.

Authors

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

rmldoc-0.1.8.tar.gz (15.9 kB view details)

Uploaded Source

Built Distribution

rmldoc-0.1.8-py3-none-any.whl (17.2 kB view details)

Uploaded Python 3

File details

Details for the file rmldoc-0.1.8.tar.gz.

File metadata

  • Download URL: rmldoc-0.1.8.tar.gz
  • Upload date:
  • Size: 15.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.12.3

File hashes

Hashes for rmldoc-0.1.8.tar.gz
Algorithm Hash digest
SHA256 a058cefc6a6729b6f9c9fff5b23e9b11f47628a3d7131b3ca272e7359888b104
MD5 91db513bbfd41265c3e33eb8e95a481a
BLAKE2b-256 e89369909bed6a5e494264c6c142e27c39ceaf120841d21371b68b91829dfda6

See more details on using hashes here.

File details

Details for the file rmldoc-0.1.8-py3-none-any.whl.

File metadata

  • Download URL: rmldoc-0.1.8-py3-none-any.whl
  • Upload date:
  • Size: 17.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.12.3

File hashes

Hashes for rmldoc-0.1.8-py3-none-any.whl
Algorithm Hash digest
SHA256 956e9680eed7bcdeabf8a73ec920762d040cc6ed457b98d6cf739bcef78fd02b
MD5 e750036f391b008996467fd08cbc11fc
BLAKE2b-256 1e4bf6c0f84cd7c225d77c07f67b363c286ee0e8dc11c0362951008ed594f2e1

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