Metadata-Version: 2.4
Name: turtle-canon
Version: 0.1.1
Summary: A tool for canonizing Turtle (`.ttl`) ontology files.
Project-URL: Home, https://CasperWA.github.io/turtle-canon
Project-URL: Documentation, https://CasperWA.github.io/turtle-canon
Project-URL: Source, https://github.com/CasperWA/turtle-canon
Project-URL: Issue Tracker, https://github.com/CasperWA/turtle-canon/issues
Project-URL: Changelog, https://github.com/CasperWA/turtle-canon/blob/main/CHANGELOG.md
Project-URL: Package, https://pypi.org/project/turtle-canon
Author-email: Casper Welzel Andersen <casper.w.andersen@sintef.no>
Maintainer-email: Casper Welzel Andersen <casper.w.andersen@sintef.no>, "Tor S. Haugland" <tor.haugland@sintef.no>
License: MIT License
        
        Copyright (c) 2021-2025 Casper Welzel Andersen & SINTEF
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
License-File: LICENSE
Keywords: ontology,turtle
Classifier: Development Status :: 2 - Pre-Alpha
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Natural Language :: English
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development
Classifier: Topic :: Software Development :: Pre-processors
Classifier: Topic :: Software Development :: Testing
Classifier: Topic :: Software Development :: Version Control
Classifier: Topic :: Text Processing
Classifier: Topic :: Utilities
Requires-Python: ~=3.10
Requires-Dist: rdflib<8,>=6.0.1
Provides-Extra: dev
Requires-Dist: mike~=2.0; extra == 'dev'
Requires-Dist: mkdocs-awesome-pages-plugin~=2.9; extra == 'dev'
Requires-Dist: mkdocs-material~=9.5; extra == 'dev'
Requires-Dist: mkdocs-minify-plugin~=0.8.0; extra == 'dev'
Requires-Dist: mkdocstrings[python]~=0.28.0; extra == 'dev'
Requires-Dist: mkdocs~=1.5; extra == 'dev'
Requires-Dist: pre-commit~=4.0; extra == 'dev'
Requires-Dist: pytest-cov~=6.0; extra == 'dev'
Requires-Dist: pytest~=8.0; extra == 'dev'
Provides-Extra: docs
Requires-Dist: mike~=2.0; extra == 'docs'
Requires-Dist: mkdocs-awesome-pages-plugin~=2.9; extra == 'docs'
Requires-Dist: mkdocs-material~=9.5; extra == 'docs'
Requires-Dist: mkdocs-minify-plugin~=0.8.0; extra == 'docs'
Requires-Dist: mkdocstrings[python]~=0.28.0; extra == 'docs'
Requires-Dist: mkdocs~=1.5; extra == 'docs'
Description-Content-Type: text/markdown

# Turtle Canon

<!-- markdownlint-disable-next-line MD036 -->
*It's turtles all the way down*

[![Codecov main](https://img.shields.io/codecov/c/github/CasperWA/turtle-canon/main)](https://app.codecov.io/gh/CasperWA/turtle-canon)
[![CI main](https://github.com/CasperWA/turtle-canon/actions/workflows/ci_tests.yml/badge.svg?branch=main)](https://github.com/CasperWA/turtle-canon/actions/workflows/ci_tests.yml?query=branch%3Amain)

A tool for canonizing Turtle (`.ttl`) ontology files.

The domain standardized tool for editing and creating ontologies is [Protégé](https://protege.stanford.edu/).
The Turtle (`.ttl`) file format is a format based on XML and OWL, which is considered one of the most readable formats for OWL ontology files.
However, Protégé writes the order of ontology entities differently depending on the version, this tool mitigates this by running the file through a canonizing parser that ensures the classes are sorted and listed in the same way, always.

The main use case for developing this tool is when developing ontologies utilizing versioning tools such as `git`, `svn` or similar, which are single character diff-sensitive.

## Install

The tool is written for Python 3.10, so one needs at minimum Python 3.10 installed to run it at this stage.
The plan is to make a stand-alone executable for each of the major OS'.

Install via PyPI (stable version, recommended):

```shell
python3.10 -m pip install turtle-canon
```

Install via GitHub (development version):

```shell
python3.10 -m pip install git+https://github.com/CasperWA/turtle-canon#egg=turtle-canon
```

## Usage

To run the tool, simply run:

```shell
turtle-canon path/to/my_ontology_file.ttl
```

For more information about the tool and the options available, run `turtle-canon --help`.  
To check the version run `turtle-canon --version`.

The currently latest stable version is **0.1.1**.

## License & copyright

This tool is [MIT Licensed](LICENSE) and copyright &copy; 2021 Casper Welzel Andersen ([GitHub](https://github.com/CasperWA), [GitLab](https://gitlab.com/CasperWA), [website](https://casper.welzel.nu)) & SINTEF.
